@cc-component/cc-ex-component 1.4.3 → 1.4.5

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}) { } }`
229
229
  if (type === "YXCollectionView") {
230
230
  event = `, {
231
- layout: (this:${className}) => {
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: (this:${className}, indexPath, collectionView) => {
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: (this:${className}, indexPath, collectionView) => {
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
@@ -435,7 +435,7 @@ export class ${className} extends ViewModel(${this.baseWindowName}) {${sx.text}\
435
435
  'Sprite': 'SpriteFrame | { bundle: string, path: string }',
436
436
  'Button': 'boolean', // Button 通常绑定激活状态(true/false)
437
437
  'ProgressBar': 'number', // 进度条应为 number (0~1)
438
- 'Skeleton': 'sp.SkeletonData',
438
+ 'sp.Skeleton': 'sp.SkeletonData | { bundle: string, path: string }',
439
439
  'Slider': 'number',
440
440
  'Toggle': 'boolean',
441
441
  'EditBox': 'string',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-ex-component",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",