|
@@ -94,7 +94,7 @@ export function Lib(registe: FunctionRegiste) {
|
|
|
* 'system.系统函数名'
|
|
|
* 'format.格式化名'
|
|
|
*/
|
|
|
-export function lookupFn(scope: Scope, event: string): Function {
|
|
|
+export function lookupFn(scope: Scope, event: string, errorWho?: any): Function {
|
|
|
if (window["IS_DESIGN_MODE"]) {
|
|
|
return Ext.emptyFn
|
|
|
}
|
|
@@ -128,7 +128,7 @@ export function lookupFn(scope: Scope, event: string): Function {
|
|
|
const funcResult = func(scope, system, format, ...values)
|
|
|
|
|
|
if (typeof funcResult !== 'function') {
|
|
|
- console.error('无法识别的事件响应类型', event, func)
|
|
|
+ console.error('无法识别的事件响应类型', event, func, errorWho)
|
|
|
throw new TypeError('无法识别的事件响应类型')
|
|
|
}
|
|
|
|
|
@@ -150,6 +150,10 @@ export function lookupScope(extHandle: any): Scope {
|
|
|
// 列上的组件
|
|
|
return extHandle.column.lookupReferenceHolder().yvanScope
|
|
|
}
|
|
|
+ if(_.get(extHandle, 'alias[0]') === 'widget.button'){
|
|
|
+ // 列上的按钮
|
|
|
+ // return extHandle.lookupViewModel().yvanScope
|
|
|
+ }
|
|
|
const vm = extHandle.lookupViewModel()
|
|
|
return vm.yvanScope
|
|
|
}
|