unknown пре 5 година
родитељ
комит
dd193ef120

+ 5 - 7
o2web/jsdoc.conf.json

@@ -3,23 +3,22 @@
         "encoding": "utf8",               // same as -e utf8
         "destination": "./o2web/jsdoc/",          // same as -d ./out/
         "recurse": true,                  // same as -r
-        "template" : "./node_modules/better-docs"
+        "template" : "./node_modules/ink-docstrap/template"
         //"template": "templates/default"  // same as -t templates/default
         //        "tutorials": "path/to/tutorials" // same as -u path/to/tutorials
     },
 
     "tags": {
-        "allowUnknownTags": ["optional"]
+        "allowUnknownTags": true
     },
     "source": {
         "include": ["./o2web/source/x_component_process_Xform"],
-        "includePattern": "\\.(jsx|js|ts|tsx)$",
+        "includePattern": ".+\\.js(doc|x)?$",
         "excludePattern": "(^|\\/|\\\\)_"
     },
     "plugins": [
         "plugins/markdown",
-        "plugins/summarize",
-        "./node_modules/better-docs/typescript"
+        "plugins/summarize"
     ],
     "templates": {
         "cleverLinks": false,
@@ -31,7 +30,7 @@
         "footer": "",
         "copyright": "o2 group",
         "navType": "vertical",
-        "theme": "readable", //readable lumen cosmo
+        "theme": "cosmo", //readable lumen cosmo
         "linenums": true,
         "collapseSymbols": false,
         "inverseNav": true,
@@ -44,4 +43,3 @@
     }
 }
 //执行命令: jsdoc -c ./o2web/jsdoc.conf.json
-

+ 12 - 6
o2web/source/x_component_process_Xform/$Input.js

@@ -1,10 +1,11 @@
 MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
-/** Class Input组件 */
-MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class({
+/** @class $Input 组件类,此类为所有输入组件的父类。 */
+MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class(
+    /** @lends MWF.xApplication.process.Xform.$Input*/
+    {
 	Implements: [Events],
 	Extends: MWF.APP$Module,
 	iconStyle: "personfieldIcon",
-
     initialize: function(node, json, form, options){
         this.node = $(node);
         this.node.store("module", this);
@@ -263,6 +264,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class({
 	},
     /**
      * 判断组件值是否为空.
+     * @instance
      * @return {boolean}.
      */
     isEmpty : function(){
@@ -271,6 +273,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class({
     },
     /**
      * 获取组件值.
+     * @instance
      * @return {object/string}.
      */
 	getData: function(when){
@@ -285,14 +288,16 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class({
         }
     },
     /**
-     * 重置组件的值,如果设置了默认值,则设置为默认值,否则置空。
+     * 重置组件的值为默认值或置空。
+     * @instance
      */
     resetData: function(){
         this.setData(this.getValue());
     },
     /**
      * 为控件赋值。
-     *  @param {string/number/jsonObject} .
+     * @instance
+     *  @param data{string/number/jsonObject} .
      */
 	setData: function(data){
         // if (data && data.isAG){
@@ -518,7 +523,8 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class({
     },
     /**
      * 根据组件的校验设置进行校验。
-     *  @param {string} routeName-路由名称.
+     * @instance
+     *  @param {string} routeName - 可选,路由名称.
      *  @return {boolean} 是否通过校验
      */
     validation: function(routeName, opinion){

+ 74 - 0
o2web/source/x_component_process_Xform/Test.js

@@ -0,0 +1,74 @@
+/** @class This class represents a closabe UI window with changeable content. */
+Nem.Ui.Window = new Class(
+    /** @lends Nem.Ui.Window# */
+    {
+        Implements: [Options, Events],
+
+        /** The options that can be set. */
+        options: {
+            /**
+             * Some description for caption.
+             * @memberOf Nem.Ui.Window#
+             * @type String
+             */
+            caption:    "Ventana",
+            /**
+             * ...
+             */
+            icon:       $empty,
+            centered:   true,
+            id:         $empty,
+            width:      $empty,
+            height:     $empty,
+            modal:      false,
+            desktop:    $empty,
+            x:          $empty,
+            y:          $empty,
+            layout:     $empty
+        },
+
+        /**
+         * The constructor. Will be called automatically when a new instance of this class is created.
+         *
+         * @param {Object} options The options to set.
+         */
+        initialize: function(options)
+        {
+            this.setOptions(options);
+            /* ... */
+        },
+
+        /**
+         * Sets the HTML content of the window.
+         *
+         * @param {String} content The content to set.
+         */
+        setHtmlContents: function(content)
+        {
+            /* ... */
+        },
+
+        /**
+         * Sets the inner text of the window.
+         *
+         * @param {String} text The text to set.
+         */
+        setText: function(text)
+        {
+            /* ... */
+        },
+
+        /**
+         * Fired when the window is closed.
+         *
+         * @event
+         * @param {Object} win The closed window.
+         */
+        close: function(win)
+        {
+            /* ... */
+        },
+
+        /* ... */
+
+    });

+ 3 - 0
o2web/source/x_component_process_Xform/Textfield.js

@@ -1,4 +1,7 @@
 MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
+/** @class Textfield 文本输入框类,此类继承至$Input。
+ * @extends MWF.xApplication.process.Xform.$Input
+ */
 MWF.xApplication.process.Xform.Textfield = MWF.APPTextfield =  new Class({
 	Implements: [Events],
 	Extends: MWF.APP$Input,

+ 2 - 1
package.json

@@ -74,6 +74,7 @@
                 "targz": "^1.0.1"
         },
         "devDependencies": {
-                "better-docs": "^2.3.2"
+                "better-docs": "^2.3.2",
+                "jaguarjs-jsdoc": "^1.1.0"
         }
 }