|
|
@@ -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: '间距' })
|