| 1234567891011121314151617181920212223242526272829 |
- /** 可生产产品列表 */
- import TableView from "../../../game/component/TableView";
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class PlantPanel extends cc.Component {
- @property({ type: TableView, displayName: '滚动视图' })
- private tableView: TableView = null!;
- start() {
- this.initScollView();
- }
- /**
- * 初始化滚动视图
- */
- private initScollView() {
- let list_data = gData.plantData.productArr;
- this.tableView.node.emit('srollview-init', list_data)
- // let index = gData.sign.getItemIndexByCanSign();
- // if (index > 0)
- // index -= 1;
- // this.tableView.contentMoveByIndex(index, 0.1);
- }
- }
|