guides.json格式说明:
[ { "title": "Ext JS 4 Guides", "items": [ { "name": "getting_started", "url": "guides/getting_started", "title": "Getting Started with Ext JS 4", "description": "This introduction to Ext JS 4 explains how you can get started." }, { "name": "class_system", "url": "guides/class_system", "title": "The Class System", "description": "Creating classes with the new class system in Ext JS 4.x." }, { "name": "custom_url", "url": "guides/custom_file.md", "title": "The Class System", "description": "Creating classes with the new class system in Ext JS 4.x." }, { "title": "Subgroup of guides", "items": [ ... ] } ... ] }, ... ]guids.json内的文档对应目录结构:必须有README.md,README.md放内容,图片引用本地图片
具体参考:https://github.com/senchalabs/jsduck/wiki/Guides
somedir/
guides.json
guides/
getting_started/
README.md
icon.png
some-image.png
class_system/
README.md
icon.png
example.zip
custom_file.md
Detailed docs for using all the builtin tags:
/** * 抽象方法,一般为继承机制中公共的方法提到上一层时使用 * @abstract */ show: function() { alert("not implemented"); }
/** * @cfg {Ext.data.Store} store (required) * 自动生成setter与getter方法,不建议使用 * @accessor */ store: undefined
/** * @class Ext.grid.Panel * 别名的应用 * @alias widget.grid * @alias widget.gridpanel */
/** * @class Ext.panel.Panel * 等同的名称,不建议使用 * @alternateClassName Ext.Panel * @alternateClassName XPanel */
ALTERNATE NAMES
Test2
@author zx
@cfg {Type} name (required)
Documentation for the config option.
@cfg {Type} [name="default value"] Documentation for the config option.
@class
Documentation for the class.
@class ClassName
Documentation for the class.
/** * @class Ext.Panel * The one-and-only panel class. * * @constructor * Creates a new Panel instance. * @param {Object} [config] Configuration. */
"<cfg-name>change"
event of evented config option. Only has an effect when used together with @accessor tag@experimental
Some description...
@experimental 2.0 Some description...
/** * Shows the component * @fires show */ show: function() { this.setVisible(true); this.fireEvent("show", this); },
@ftype foo
is shorthand for @alias feature.foo
@inheritdoc
@inheritdoc ClassName
@inheritdoc #memberName
@inheritdoc ClassName#memberName
@inheritdoc ClassName#static-type-memberName
/** * Adds a listener for an event. * @localdoc See also the {@link #on} shorthand. 这部分不会被引用 * @param {String} event Name of the event to listen. * @param {Function} callback A function to execute. * @param {Object} scope A this value. */ addListener: function(event, callback, scope) { }, /** * @inheritdoc #addListener * @localdoc Shorthand alias for {@link #addListener} 这部分会替代引用中被标识的部分 */ on: function() { this.addListener.apply(this, arguments); }
/** 指定为方法 * @method area * Returns area of a circle * @param {Number} r Radius of the circle. * @return {Number} The area */
@mixins ClassName
在头部中会出现该类,方便快速链接
@param name
Some description...
@param {Type} name
Some description...
@param {Type} [name]
Some description...
@param {Type} [name="default-value"]
Some description...
@param {Type} name.subproperty
Some description...
/** * @param {Array} args (optional) Arguments for the function. */
@property
Documentation for the property.
@property name
Documentation for the property.
@property {Type} name
Documentation for the property.
@property {Type} [name="default value"]
Documentation for the property.
@property {Type} name.subproperty
Documentation for the subproperty.
/** * @class Ext.panel.Table * Basis of both TreePanel and GridPanel. * @requires Ext.selection.RowModel * @requires Ext.grid.header.Container */
/**与param差不多的应用方式 * @return {Object} A user record * @return {String} return.name The name of the user. * @return {String} return.email The email of the user. */
/**可忽略 * Creates an awesome button. * * @param {string} $ui-label The name of the UI being created. * @param {color} [$color=red] Base color for the UI. */ @mixin my-button($ui-label, $color: red) { }
@since Ext JS 4.0 beta 说明从哪个版本开始提供的
@throws
Some description...
@throws {Type}
Some description...
Also for the inline tags:
{@link Class#member link text}
{@img path/to/image.png alt text}
图片显示
Various tags use {TypeDefinitions}
, the syntax for these is described here: