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

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.
@@ -346,7 +346,7 @@ ${sx_this}
346
346
  if (!EDITOR_NOT_IN_PREVIEW) return;
347
347
  this.baseWindowName = ExComponentModule.ResetBaseWindow('', true)
348
348
  let importStr = `
349
- import { Label, RichText, ProgressBar, Sprite, EditBox, Toggle, Slider, ToggleContainer, Button, math, SpriteFrame, _decorator , Node} from 'cc';
349
+ import { Label, RichText, ProgressBar, Sprite, EditBox, Toggle, Slider, ToggleContainer, Button, math, SpriteFrame, _decorator , Node, sp} from 'cc';
350
350
  import { ViewModel, BindViewModel, BindTable, BindCollect, Bind, Ref, BaseViewModelData, YXCollectionView, YXFlowLayout, TableView, BaseWindow } from 'db://assets/pkg-export/@cc-component/cc-ex-component';
351
351
  import { ${this.baseWindowName} } from 'db://assets/start/Interface/custom/${this.baseWindowName}';
352
352
  const { ccclass, property } = _decorator;`
@@ -450,10 +450,10 @@ export class ${className} extends ViewModel(${this.baseWindowName}) {${sx.text}\
450
450
  const typeMap: Record<string, string> = {
451
451
  'Label': '"文本"',
452
452
  'RichText': '"文本RichText"',
453
- 'Sprite': 'null',
453
+ 'Sprite': `{ bundle: '"resources", path: "sprite" }`,
454
454
  'Button': 'true', // Button 通常绑定激活状态(true/false)
455
455
  'ProgressBar': '0', // 进度条应为 number (0~1)
456
- 'Skeleton': 'null',
456
+ 'sp.Skeleton': `{ bundle: '"resources", path: "spine" }`,
457
457
  'Slider': '0',
458
458
  'Toggle': 'true',
459
459
  'EditBox': '"文本EditBox"',
@@ -461,6 +461,6 @@ export class ${className} extends ViewModel(${this.baseWindowName}) {${sx.text}\
461
461
  'TableView': '[1,2,3,4,5]', // 列表数据一般为数组
462
462
  'YXCollectionView': '[1,2,3,4,5]'
463
463
  };
464
- return typeMap[compType] ?? 'any'; // 默认 fallback
464
+ return typeMap[compType] ?? 'null'; // 默认 fallback
465
465
  }
466
466
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-ex-component",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",