@cc-component/cc-ex-component 2.0.5 → 2.0.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.
@@ -311,7 +311,11 @@ export function ViewModel<T extends new (...args: any[]) => Component>(Base: T)
311
311
  //绑定的方法
312
312
  const funcName = bindingMapFunc.get(self.className)?.get(key)
313
313
  if (funcName) {
314
- return self[funcName]?.()
314
+ const result = self[funcName]?.(value); // 调用函数获取返回值
315
+ // ✅ 关键:如果返回值不是 undefined,则返回计算值
316
+ if (result !== undefined) {
317
+ return result;
318
+ }
315
319
  }
316
320
  return value;
317
321
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-ex-component",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",