vue2-client 1.8.450 → 1.8.452
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.
package/package.json
CHANGED
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
getComponentByName (name) {
|
|
106
106
|
return this.$refs.main.getComponentByName(name)
|
|
107
107
|
},
|
|
108
|
-
onSubmit () {
|
|
108
|
+
async onSubmit () {
|
|
109
109
|
if (this.$refs.main?.config?.confirmFunction) {
|
|
110
110
|
console.info('执行自定义确认逻辑')
|
|
111
111
|
let func = this.$refs.main?.config?.confirmFunction
|
|
@@ -115,7 +115,7 @@ export default {
|
|
|
115
115
|
const result = executeStrFunctionByContext(this, func, [])
|
|
116
116
|
if (result instanceof Promise) {
|
|
117
117
|
result.then((res) => {
|
|
118
|
-
|
|
118
|
+
if (!res) return
|
|
119
119
|
let messageType = 'success'
|
|
120
120
|
// 如果传递了组件名字 自动调用刷新
|
|
121
121
|
if (res?.name) {
|
|
@@ -126,15 +126,14 @@ export default {
|
|
|
126
126
|
console.warn(`未找到组件${res.name}无法刷新`)
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
// 如果传递了提示信息自动调用提示
|
|
130
|
-
if (res?.message) {
|
|
131
|
-
message = res.message
|
|
132
|
-
}
|
|
133
129
|
// 如果传递消息类型 自动调用消息
|
|
134
130
|
if (res?.messageType) {
|
|
135
131
|
messageType = res.messageType
|
|
136
132
|
}
|
|
137
|
-
|
|
133
|
+
// 如果传递了提示信息自动调用提示
|
|
134
|
+
if (res?.message) {
|
|
135
|
+
this.$message[messageType](res?.message)
|
|
136
|
+
}
|
|
138
137
|
this.close()
|
|
139
138
|
})
|
|
140
139
|
} else {
|
|
@@ -530,16 +530,16 @@ export default {
|
|
|
530
530
|
return handlers
|
|
531
531
|
}
|
|
532
532
|
cell.events.forEach(event => {
|
|
533
|
-
handlers[event.type] = (...args) => {
|
|
533
|
+
handlers[event.type] = async (...args) => {
|
|
534
534
|
console.info('Event handled:', event.type, args)
|
|
535
535
|
let func = event.customFunction
|
|
536
536
|
if (func && func.startsWith('function')) {
|
|
537
537
|
func = func.replace('function', 'async function')
|
|
538
538
|
}
|
|
539
|
-
const result = executeStrFunctionByContext(this, func, args)
|
|
539
|
+
const result = await executeStrFunctionByContext(this, func, args)
|
|
540
540
|
if (result instanceof Promise) {
|
|
541
541
|
result.then((res) => {
|
|
542
|
-
|
|
542
|
+
if (!res) return
|
|
543
543
|
let messageType = 'success'
|
|
544
544
|
// 如果传递了组件名字 自动调用刷新
|
|
545
545
|
if (res?.name) {
|
|
@@ -550,16 +550,14 @@ export default {
|
|
|
550
550
|
console.warn(`未找到组件${res.name}无法刷新`)
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
// 如果传递了提示信息自动调用提示
|
|
554
|
-
if (res?.message) {
|
|
555
|
-
message = res.message
|
|
556
|
-
}
|
|
557
553
|
// 如果传递消息类型 自动调用消息
|
|
558
554
|
if (res?.messageType) {
|
|
559
555
|
messageType = res.messageType
|
|
560
556
|
}
|
|
561
|
-
|
|
562
|
-
|
|
557
|
+
// 如果传递了提示信息自动调用提示
|
|
558
|
+
if (res?.message) {
|
|
559
|
+
this.$message[messageType](res?.message)
|
|
560
|
+
}
|
|
563
561
|
})
|
|
564
562
|
}
|
|
565
563
|
}
|