@cc-component/cc-ex-component 1.5.1 → 1.5.3
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.
|
@@ -225,17 +225,17 @@ export class ReferenceComponent extends Component {
|
|
|
225
225
|
let name = key[0].toLowerCase() + key.substring(1);
|
|
226
226
|
const type = this.getPropertyType(data.com)
|
|
227
227
|
let bind_pix = `@Bind`
|
|
228
|
-
let event = `,{ event(this:${className}) { } }`
|
|
228
|
+
let event = `,{ event(this:${className}Window) { } }`
|
|
229
229
|
if (type === "YXCollectionView") {
|
|
230
230
|
event = `, {
|
|
231
|
-
layout(this:${className}) {
|
|
231
|
+
layout(this:${className}Window) {
|
|
232
232
|
const layout = new YXFlowLayout();
|
|
233
233
|
layout.horizontalSpacing = 10;
|
|
234
234
|
layout.verticalSpacing = 20;
|
|
235
235
|
layout.itemSize = () => math.size(100, 100);
|
|
236
236
|
return layout;
|
|
237
237
|
},
|
|
238
|
-
cellForItemAt(this:${className}, indexPath, collectionView) {
|
|
238
|
+
cellForItemAt(this:${className}Window, indexPath, collectionView) {
|
|
239
239
|
const node = collectionView.dequeueReusableCell("cell", indexPath);
|
|
240
240
|
//node.getComponent(TableVIewItem).refreshUI(this.viewModel.${name}[indexPath.row])
|
|
241
241
|
return node;
|
|
@@ -246,7 +246,7 @@ export class ReferenceComponent extends Component {
|
|
|
246
246
|
} else if (type === "TableView") {
|
|
247
247
|
event = `, {
|
|
248
248
|
itemSize: () => math.size(100, 100),
|
|
249
|
-
cellForItemAt(this:${className}, indexPath, collectionView) {
|
|
249
|
+
cellForItemAt(this:${className}Window, indexPath, collectionView) {
|
|
250
250
|
const node = collectionView.dequeueReusableCell("cell", indexPath)
|
|
251
251
|
//node.getComponent(TableVIewItem).refreshUI(this.viewModel.${name}[indexPath.row])
|
|
252
252
|
return node
|
|
@@ -323,11 +323,6 @@ ${sx}
|
|
|
323
323
|
//#region ⚠️ ------------数据对象
|
|
324
324
|
class ${data} extends BaseViewModelData implements ${iinterface} {
|
|
325
325
|
${sx}
|
|
326
|
-
|
|
327
|
-
// ✅ 本界面内部调用
|
|
328
|
-
loadData() {
|
|
329
|
-
${sx_this}
|
|
330
|
-
}
|
|
331
326
|
}
|
|
332
327
|
//#endregion END`;
|
|
333
328
|
if (isCopy) {
|
|
@@ -376,7 +371,7 @@ const { ccclass, property } = _decorator;
|
|
|
376
371
|
}
|
|
377
372
|
|
|
378
373
|
start() {
|
|
379
|
-
|
|
374
|
+
|
|
380
375
|
}`
|
|
381
376
|
const classView = `
|
|
382
377
|
@BindViewModel(${className}Data)
|