diff --git a/o2web/jsdoc.conf.json b/o2web/jsdoc.conf.json index 8defcc15ca7199b4d5b35cc61c22163e9a84c34c..0d3fc81826c95402ae3f1a31b596a10ef72597e1 100644 --- a/o2web/jsdoc.conf.json +++ b/o2web/jsdoc.conf.json @@ -1,35 +1,38 @@ { - "opts": { - "encoding": "utf8", // same as -e utf8 - "destination": "./o2web/jsdoc/", // same as -d ./out/ - "recurse": true, // same as -r - "template" : "./node_modules/tidy-jsdoc", - "prism-theme": "prism-custom" - // "tutorials": "./o2web/tutorials" // same as -u path/to/tutorials + "opts": { //命令行参数,在配置文件中配置了就不要敲命令了 + "encoding": "utf8", //文件编码utf8 + "destination": "./o2web/jsdoc/", //输出目标文件夹 + "recurse": true, //是否递归抽取sorce/include配置的文件夹 + "template" : "./node_modules/tidy-jsdoc-o2", //模板路径 + "prism-theme": "prism-custom" //模板中的代码块样式主题 + //"tutorials": "./o2web/tutorials" //如果有教程,对应教程目录 }, "tags": { - "allowUnknownTags": true, - "dictionaries": [ + "allowUnknownTags": true, //允许jsdoc中未命名的标签 + "dictionaries": [ //标签库 "jsdoc", "closure" ] }, "source": { - "include": ["./o2web/source/x_component_process_Xform","./o2web/source/o2_core/o2/xScript"], - "includePattern": ".+\\.js(doc|x)?$", - "excludePattern": "(^|\\/|\\\\)_" + "include": [ //需要抽取文档的源文件夹 + "./o2web/source/x_component_process_Xform", + "./o2web/source/o2_core/o2/xScript" + ], + "includePattern": ".+\\.js(doc|x)?$", //抽取的源文件名称正则表达式 + "excludePattern": "(^|\\/|\\\\)_" //排除的源文件正则表达式 }, - "plugins": [ - "plugins/markdown", - "plugins/summarize" + "plugins": [ //启用插件 + "plugins/markdown", //把markdown转成html + "plugins/summarize" //为每个doclet生成摘要 ], - "templates": { - "cleverLinks": false, + "templates": { //模板参数 + "cleverLinks": false, //@link标签是否呈现为纯文本 "monospaceLinks": false }, "metadata": { - "title": "O2OA前台API" + "title": "O2OA前台API" //最终生成的文档中标题 } } //执行命令: jsdoc -c ./o2web/jsdoc.conf.json \ No newline at end of file diff --git a/o2web/source/x_component_process_Xform/$Input.js b/o2web/source/x_component_process_Xform/$Input.js index 0bcce897fda2ea44c93ac57252cf524595c6bd53..a4b417456b61726e705263732da78d2d5b65ef12 100644 --- a/o2web/source/x_component_process_Xform/$Input.js +++ b/o2web/source/x_component_process_Xform/$Input.js @@ -1,6 +1,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false); /** @class $Input 组件类,此类为所有输入组件的父类 * @hideconstructor + * @category FormComponents * @extends MWF.xApplication.process.Xform.$Module * @abstract */ diff --git a/o2web/source/x_component_process_Xform/$Module.js b/o2web/source/x_component_process_Xform/$Module.js index b4360c7dfb8063d42e790505f51ced8618672fdc..e78674f4b2cf6f8608f755d7ba85d9df7373b5e5 100644 --- a/o2web/source/x_component_process_Xform/$Module.js +++ b/o2web/source/x_component_process_Xform/$Module.js @@ -1,6 +1,7 @@ MWF.require("MWF.widget.Common", null, false); /** @classdesc $Module 组件类,此类为所有组件的父类。 * @class + * @category FormComponents * @hideconstructor * */ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class( diff --git a/o2web/source/x_component_process_Xform/Actionbar.js b/o2web/source/x_component_process_Xform/Actionbar.js index e5a401c10bb115415a2eacc336aae5ac263c6923..2ea014600f2362cd4bcd9f604cd0412041c448b2 100644 --- a/o2web/source/x_component_process_Xform/Actionbar.js +++ b/o2web/source/x_component_process_Xform/Actionbar.js @@ -10,6 +10,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false); * //方法2 * var actionbar = this.target; //在操作条和操作本身的事件脚本中获取 * @extends MWF.xApplication.process.Xform.$Module + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Actionbar = MWF.APPActionbar = new Class( diff --git a/o2web/source/x_component_process_Xform/Address.js b/o2web/source/x_component_process_Xform/Address.js index 0d2a7747477e3b458ff3ff818d4099b73385d69e..a019e5b4a5bd6b6737705bf72e53386d1ee4a289 100644 --- a/o2web/source/x_component_process_Xform/Address.js +++ b/o2web/source/x_component_process_Xform/Address.js @@ -8,6 +8,7 @@ MWF.xDesktop.requireApp("process.Xform", "Combox", null, false); * //方法2 * var address = this.target; //组件本身的事件和脚本中获取 * @extends MWF.xApplication.process.Xform.Combox + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Address = MWF.APPAddress = new Class( diff --git a/o2web/source/x_component_process_Xform/Attachment.js b/o2web/source/x_component_process_Xform/Attachment.js index c9bc46bedf6cf64e4ae683ece0b662c3d636456f..f3e89fb98d64ca624c4e34f486b98240ce03cbe5 100644 --- a/o2web/source/x_component_process_Xform/Attachment.js +++ b/o2web/source/x_component_process_Xform/Attachment.js @@ -1076,6 +1076,7 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({ * //方法2 * var attachment = this.target; //在组件事件脚本中获取 * @extends MWF.xApplication.process.Xform.$Module + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class( diff --git a/o2web/source/x_component_process_Xform/Button.js b/o2web/source/x_component_process_Xform/Button.js index e6f0cc1d162295cd4929b27719c0b95a6670027d..e6b36b84f13d9e774514c1d7d00a766d3fff19c7 100644 --- a/o2web/source/x_component_process_Xform/Button.js +++ b/o2web/source/x_component_process_Xform/Button.js @@ -7,6 +7,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false); * //方法2 * var attachment = this.target; //在组件事件脚本中获取 * @extends MWF.xApplication.process.Xform.$Module + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Button = MWF.APPButton = new Class({ diff --git a/o2web/source/x_component_process_Xform/Calendar.js b/o2web/source/x_component_process_Xform/Calendar.js index c8a41581d93e584b239862a89b663bdaf3dfcbe7..cc240286754868349a28d950549eea4b466445f3 100644 --- a/o2web/source/x_component_process_Xform/Calendar.js +++ b/o2web/source/x_component_process_Xform/Calendar.js @@ -7,6 +7,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Input", null, false); * //方法2 * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等 * @extends MWF.xApplication.process.Xform.$Input + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Calendar = MWF.APPCalendar = new Class( diff --git a/o2web/source/x_component_process_Xform/Checkbox.js b/o2web/source/x_component_process_Xform/Checkbox.js index 6658b73e5b52fcede50dd9d8247fb62e15b27e64..d772c36ffb460074462bcf774bf54f1a62de98fe 100644 --- a/o2web/source/x_component_process_Xform/Checkbox.js +++ b/o2web/source/x_component_process_Xform/Checkbox.js @@ -8,6 +8,7 @@ MWF.require("MWF.widget.UUID", null, false); * //方法2 * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等 * @extends MWF.xApplication.process.Xform.$Input + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class( diff --git a/o2web/source/x_component_process_Xform/Combox.js b/o2web/source/x_component_process_Xform/Combox.js index e9654713d0a211210a2c59c25e914f2dc8f8fd37..aa2e66e097d5bae2ed62d45373cd36e6d5e038ab 100644 --- a/o2web/source/x_component_process_Xform/Combox.js +++ b/o2web/source/x_component_process_Xform/Combox.js @@ -7,6 +7,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Input", null, false); * //方法2 * var field = this.target; //在组件本身的脚本中获取,比如事件脚本、默认值脚本、校验脚本等等 * @extends MWF.xApplication.process.Xform.$Input + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Combox = MWF.APPCombox = new Class( diff --git a/o2web/source/x_component_process_Xform/Common.js b/o2web/source/x_component_process_Xform/Common.js index 6287b98ddd33c415d7e572c34205b42d75cea79e..e752790da623a120ba30c20e596c3f0325e931c7 100644 --- a/o2web/source/x_component_process_Xform/Common.js +++ b/o2web/source/x_component_process_Xform/Common.js @@ -7,6 +7,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false); * //方法2 * var attachment = this.target; //在组件事件脚本中获取 * @extends MWF.xApplication.process.Xform.$Module + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Common = MWF.APPCommon = new Class({ diff --git a/o2web/source/x_component_process_Xform/DatagridMobile.js b/o2web/source/x_component_process_Xform/DatagridMobile.js index 68f00052c1236b0827f92a72cb3320ca736209bd..bd46d0f33620d003e7987f74a7a22525a0100edd 100644 --- a/o2web/source/x_component_process_Xform/DatagridMobile.js +++ b/o2web/source/x_component_process_Xform/DatagridMobile.js @@ -7,6 +7,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false); * //方法2 * var attachment = this.target; //在组件事件脚本中获取 * @extends MWF.xApplication.process.Xform.$Module + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.DatagridMobile = new Class( diff --git a/o2web/source/x_component_process_Xform/DatagridPC.js b/o2web/source/x_component_process_Xform/DatagridPC.js index ee05d21f890dfc66a84b22f958dd10783a9f2538..e73e0728d0071c9ed887dc610fbfddfbfeded357 100644 --- a/o2web/source/x_component_process_Xform/DatagridPC.js +++ b/o2web/source/x_component_process_Xform/DatagridPC.js @@ -55,6 +55,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false); * //方法2 * var attachment = this.target; //在组件事件脚本中获取 * @extends MWF.xApplication.process.Xform.$Module + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.DatagridPC = new Class( diff --git a/o2web/source/x_component_process_Xform/Div.js b/o2web/source/x_component_process_Xform/Div.js index 3826666bbe6dd7e94924061bb892950fbd3258b7..df422bf4b4eb572b442d207a0256b4e15bc97847 100644 --- a/o2web/source/x_component_process_Xform/Div.js +++ b/o2web/source/x_component_process_Xform/Div.js @@ -7,6 +7,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false); * //方法2 * var attachment = this.target; //在组件事件脚本中获取 * @extends MWF.xApplication.process.Xform.$Module + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Div = MWF.APPDiv = new Class({ diff --git a/o2web/source/x_component_process_Xform/Documenteditor.js b/o2web/source/x_component_process_Xform/Documenteditor.js index 84df7c710934002c53db0cbd04b1cf8a82966d47..cae0333c41768d9b2e61738326c0939b557ae050 100644 --- a/o2web/source/x_component_process_Xform/Documenteditor.js +++ b/o2web/source/x_component_process_Xform/Documenteditor.js @@ -7,6 +7,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false); * //方法2 * var attachment = this.target; //在组件事件脚本中获取 * @extends MWF.xApplication.process.Xform.$Module + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Class( diff --git a/o2web/source/x_component_process_Xform/Form.js b/o2web/source/x_component_process_Xform/Form.js index 60f391eb11673621d46a56f0d22f03e8df004672..23435c0e14cfa0a76e733b2de7ae220f6344fe44 100644 --- a/o2web/source/x_component_process_Xform/Form.js +++ b/o2web/source/x_component_process_Xform/Form.js @@ -6,6 +6,7 @@ MWF.xDesktop.requireApp("process.Xform", "lp." + MWF.language, null, false); //MWF.xDesktop.requireApp("process.Xform", "Package", null, false); /** @class Form 表单。 + * @category FormComponents * @example * //可以在脚本中获取表单 * //方法1: diff --git a/o2web/source/x_component_process_Xform/Textfield.js b/o2web/source/x_component_process_Xform/Textfield.js index 203350e9ac8e09f206fdc50c2baa5c6caedcab1b..b357b2d42c17d69d2517ccca7d4eec4b47212994 100644 --- a/o2web/source/x_component_process_Xform/Textfield.js +++ b/o2web/source/x_component_process_Xform/Textfield.js @@ -14,6 +14,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Input", null, false); * var flag = field.isEmpty(); //字段是否为空 * field.resetData(); //重置字段的值为默认值或置空 * @extends MWF.xApplication.process.Xform.$Input + * @category FormComponents * @hideconstructor */ MWF.xApplication.process.Xform.Textfield = MWF.APPTextfield = new Class({ diff --git a/package.json b/package.json index a79bc8698ee42e66709f7134d98b6b35f932aae6..18fe7487e8c414992e92a78368e3401843bdccfb 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "progress-stream": "^2.0.0", "request": "^2.88.2", "single-line-log": "^1.1.2", - "targz": "^1.0.1" + "targz": "^1.0.1", + "tidy-jsdoc-o2": "0.0.1" } }