@cc-component/cc-ex-component 1.4.3 → 1.4.4
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
|
|
228
|
+
let event = `,{ event(this:${className}) { } }`
|
|
229
229
|
if (type === "YXCollectionView") {
|
|
230
230
|
event = `, {
|
|
231
|
-
layout
|
|
231
|
+
layout(this:${className}) {
|
|
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
|
|
238
|
+
cellForItemAt(this:${className}, 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
|
|
249
|
+
cellForItemAt(this:${className}, 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
|