vue2-client 1.8.451 → 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,6 +115,7 @@ export default {
|
|
|
115
115
|
const result = executeStrFunctionByContext(this, func, [])
|
|
116
116
|
if (result instanceof Promise) {
|
|
117
117
|
result.then((res) => {
|
|
118
|
+
if (!res) return
|
|
118
119
|
let messageType = 'success'
|
|
119
120
|
// 如果传递了组件名字 自动调用刷新
|
|
120
121
|
if (res?.name) {
|
|
@@ -530,15 +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
|
+
if (!res) return
|
|
542
543
|
let messageType = 'success'
|
|
543
544
|
// 如果传递了组件名字 自动调用刷新
|
|
544
545
|
if (res?.name) {
|