diff --git a/cocos2d/core/platform/CCClassDecorator.js b/cocos2d/core/platform/CCClassDecorator.js index 8c964cbfdc..b9a70a55b3 100644 --- a/cocos2d/core/platform/CCClassDecorator.js +++ b/cocos2d/core/platform/CCClassDecorator.js @@ -319,7 +319,6 @@ var ccclass = checkCtorArgument(function (ctor, name) { * @param {Boolean} [options.editorOnly] * @param {Boolean} [options.override] * @param {Boolean} [options.animatable] - * @param {Any} [options.default] - for TypeScript only. * @example * const {ccclass, property} = cc._decorator; * @@ -389,6 +388,13 @@ var ccclass = checkCtorArgument(function (ctor, name) { * } * }, * + * offset: new cc.Vec2(100, 100) + * + * offsets: { + * default: [], + * type: cc.Vec2 + * } + * * texture: { * default: "", * url: cc.Texture2D @@ -396,7 +402,7 @@ var ccclass = checkCtorArgument(function (ctor, name) { * } * }); * @typescript - * property(options?: {type?: any; url?: typeof cc.RawAsset; visible?: boolean|(() => boolean); displayName?: string; tooltip?: string; multiline?: boolean; readonly?: boolean; min?: number; max?: number; step?: number; range?: number[]; slide?: boolean; serializable?: boolean; editorOnly?: boolean; override?: boolean; animatable?: boolean; default?: any} | any[]|Function|cc.ValueType|number|string|boolean): Function + * property(options?: {type?: any; url?: typeof cc.RawAsset; visible?: boolean|(() => boolean); displayName?: string; tooltip?: string; multiline?: boolean; readonly?: boolean; min?: number; max?: number; step?: number; range?: number[]; slide?: boolean; serializable?: boolean; editorOnly?: boolean; override?: boolean; animatable?: boolean} | any[]|Function|cc.ValueType|number|string|boolean): Function * property(_target: Object, _key: any, _desc?: any): void */ function property (ctorProtoOrOptions, propName, desc) {