瀏覽代碼

注释优化

薛鸿潇 5 年之前
父節點
當前提交
f05c252c0f
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      assets/script/game/component/TableView.ts

+ 5 - 2
assets/script/game/component/TableView.ts

@@ -4,17 +4,20 @@ const { ccclass, property } = cc._decorator;
 /** 动态加载的滚动列表
  * - 滑动列表动态加载
  * - 支持多种类型预制体混合滚动 
+ * 
  * - item脚本需要有函数 setItemData 用于接收数据
+ * 
  * - 多个prefab混合时,要为每条item指定 pfbType
+ * 
  * - item、content锚点y需要为1其他为0.5
  * @author 薛鸿潇
 */
 @ccclass
 export default class TableView extends cc.Component {
 
-    @property({ displayName: '预制条目', type: [cc.Prefab] })
+    @property({ displayName: '预制条目', tooltip: '脚本必须实现 setItemData 方法用于接收数据!', type: [cc.Prefab] })
     private pre_item: cc.Prefab[] = [];
-    @property({ displayName: '脚本名', type: [cc.String] })
+    @property({ displayName: '脚本名', tooltip: '脚本必须实现 setItemData 方法用于接收数据!', type: [cc.String] })
     private scr_item: string[] = [];
     /** 间距 */
     @property({ displayName: '间距' })