mirror of
https://github.com/Leo501/CocosCreatorTutorial.git
synced 2026-05-08 14:48:40 +08:00
29 lines
493 B
TypeScript
29 lines
493 B
TypeScript
import { ListViewItem } from "./Listview/ListViewItem";
|
|
|
|
const { ccclass, property } = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class TestListViewItems extends ListViewItem {
|
|
|
|
@property(cc.Label)
|
|
label: cc.Label = null;
|
|
|
|
private _data: any;
|
|
onLoad() {
|
|
|
|
}
|
|
|
|
|
|
onSetData(data: any, index: number) {
|
|
cc.log("item设置数据");
|
|
this._data = data;
|
|
this.label.string = `data=${data}/index=${index}`;
|
|
}
|
|
|
|
start() {
|
|
|
|
}
|
|
|
|
// update (dt) {}
|
|
}
|