@cc-component/cc-ex-component 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,11 +5,12 @@ const { ccclass, property } = _decorator;
5
5
 
6
6
  @ccclass('BaseReference')
7
7
  export class BaseReference extends Component {
8
- rc: ReferenceComponent;
9
- isInit: boolean = false;
10
- isLoad: boolean = false;
11
- vmParams: any;
8
+ private rc: ReferenceComponent;
9
+ private isInit: boolean = false;
10
+ private isLoad: boolean = false;
11
+ private vmParams: any;
12
12
  viewModel: BaseViewModelData;
13
+ param: any;
13
14
  initReferenceCollector() {
14
15
  if (this.isInit) return;
15
16
  this.isInit = true;
@@ -9,7 +9,6 @@ import { EditBox, Toggle, Slider, Button, ProgressBar, Node } from 'cc';
9
9
  import { RichText } from 'cc';
10
10
  import { Component } from 'cc';
11
11
  import { js } from 'cc';
12
- import { escape } from 'querystring';
13
12
  import { IIndexPath } from '../lib/tableView/IListView';
14
13
  import { ListView } from '../lib/tableView/ListView';
15
14
  import { TableView } from '../lib/tableView/TableView';
@@ -85,9 +84,7 @@ export function Bind<T extends Component>(dataPath: string, param?: IBindingData
85
84
  dataPath: dataPath, type: null, reset: param?.reset, event: param?.event,
86
85
  itemSize: null,
87
86
  cellForItemAt: null,
88
- numberOfItems: function (): number {
89
- throw new Error('Function not implemented.');
90
- }
87
+ numberOfItems: null,
91
88
  }
92
89
 
93
90
  bindingMap.get(className)!.set(propertyKey, data);
@@ -312,7 +309,7 @@ function updateStatus(data: IBindingData, com: Component, value: any, self: any)
312
309
  com_btn.node.active = value ?? true;
313
310
 
314
311
  //事件
315
- com_btn.node.off(Button.EventType.CLICK, com_btn['btnCall'], self);
312
+ com_btn.node.off(Button.EventType.CLICK, com_btn['btnCall']);
316
313
  tempData.skip = true;
317
314
  const btnCall = (btn) => {
318
315
  tempData.value = btn.node.active
@@ -321,7 +318,7 @@ function updateStatus(data: IBindingData, com: Component, value: any, self: any)
321
318
  self[`onClick_${sx}`]?.(btn)
322
319
  }
323
320
  com_btn['btnCall'] = btnCall
324
- com_btn.node.on(Button.EventType.CLICK, com_btn['btnCall'], self);
321
+ com_btn.node.on(Button.EventType.CLICK, com_btn['btnCall']);
325
322
  break;
326
323
  case 'cc.ProgressBar':
327
324
  if (data.reset) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-ex-component",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",