resolver-egretimp-plus 0.0.49 → 0.0.51
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resolver-egretimp-plus",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"description": "交付体验渲染",
|
|
5
5
|
"main": "./dist/web/index.js",
|
|
6
6
|
"module": "./dist/web/index.js",
|
|
@@ -22,8 +22,7 @@
|
|
|
22
22
|
"@babel/runtime-corejs3": "^7.24.7",
|
|
23
23
|
"@vue/babel-plugin-jsx": "^1.2.2",
|
|
24
24
|
"@vue/cli-plugin-babel": "^5.0.8",
|
|
25
|
-
"@
|
|
26
|
-
"@vueuse/core": "^10.11.1",
|
|
25
|
+
"@vueuse/core": "9.1.0",
|
|
27
26
|
"axios": "^1.7.7",
|
|
28
27
|
"babel-loader": "^9.1.3",
|
|
29
28
|
"consola": "^3.2.3",
|
|
@@ -44,6 +43,8 @@
|
|
|
44
43
|
"qs": "^6.13.0",
|
|
45
44
|
"sass": "1.77.6",
|
|
46
45
|
"sass-loader": "^14.2.1",
|
|
46
|
+
"vue": "^3.5.12",
|
|
47
|
+
"vue-demi": "^0.14.10",
|
|
47
48
|
"vue-loader": "^17.4.2",
|
|
48
49
|
"vue-style-loader": "^4.1.3",
|
|
49
50
|
"vue3-quill": "^0.3.1",
|
|
@@ -10,7 +10,6 @@ module.exports = {
|
|
|
10
10
|
output: {
|
|
11
11
|
clean: true,
|
|
12
12
|
library: {
|
|
13
|
-
// name: 'resolver',
|
|
14
13
|
type: 'module'
|
|
15
14
|
},
|
|
16
15
|
path: path.resolve(__dirname, '../dist'),
|
|
@@ -84,7 +83,7 @@ module.exports = {
|
|
|
84
83
|
'element-plus/es/locale/lang/zh-cn': 'element-plus/es/locale/lang/zh-cn',
|
|
85
84
|
'element-plus/es/locale/lang/en': 'element-plus/es/locale/lang/en'
|
|
86
85
|
},
|
|
87
|
-
externalsType: '
|
|
86
|
+
externalsType: 'umd',
|
|
88
87
|
experiments: {
|
|
89
88
|
outputModule: true,
|
|
90
89
|
},
|
|
@@ -51,20 +51,42 @@ const validate = inject('_validate', () => {})
|
|
|
51
51
|
const routeQuery= route?.query
|
|
52
52
|
|
|
53
53
|
const buttonAction = (...arg) => {
|
|
54
|
-
|
|
54
|
+
const lastClick = () => {
|
|
55
|
+
attrs?.onClick?.(...arg) // 如果配置中有点击事件
|
|
56
|
+
}
|
|
55
57
|
const actionKey = props.config?.clickActionKey || props.config?.buttonActionKey || props.config?.hireRelat
|
|
56
58
|
const actionFn = buttonActions[actionKey]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
|
|
60
|
+
let actionFnRet = null
|
|
61
|
+
if (actionFn) {
|
|
62
|
+
actionFnRet = actionFn(props, {
|
|
63
|
+
dynamicMapComp,
|
|
64
|
+
hireRelatMapRules,
|
|
65
|
+
components,
|
|
66
|
+
selects,
|
|
67
|
+
rootValue: rootValue?.value,
|
|
68
|
+
dataLoad,
|
|
69
|
+
rootForm,
|
|
70
|
+
routeQuery,
|
|
71
|
+
validate,
|
|
72
|
+
lastClick
|
|
73
|
+
}, appContext)
|
|
74
|
+
}
|
|
75
|
+
if (actionFnRet !== null && actionFnRet !== undefined) {
|
|
76
|
+
if (isPromise(actionFnRet)) {
|
|
77
|
+
actionFnRet.then(res => {
|
|
78
|
+
if (res) {
|
|
79
|
+
lastClick()
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
} else {
|
|
83
|
+
if (actionFnRet) {
|
|
84
|
+
lastClick()
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
lastClick()
|
|
89
|
+
}
|
|
68
90
|
}
|
|
69
91
|
</script>
|
|
70
92
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<script setup>
|
|
7
7
|
import { ElButton } from 'element-plus'
|
|
8
8
|
import { defineProps, inject, getCurrentInstance, computed, useAttrs } from 'vue'
|
|
9
|
-
import { commonPropsType } from '../../utils/index.js'
|
|
9
|
+
import { commonPropsType, isPromise } from '../../utils/index.js'
|
|
10
10
|
import { useRoute } from 'vue-router'
|
|
11
11
|
|
|
12
12
|
defineOptions({
|
|
@@ -74,20 +74,41 @@ const validate = inject('_validate', () => {})
|
|
|
74
74
|
const routeQuery= route?.query
|
|
75
75
|
|
|
76
76
|
const buttonAction = async (...arg) => {
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
const lastClick = () => {
|
|
78
|
+
attrs?.onClick?.(...arg)
|
|
79
|
+
}
|
|
79
80
|
const actionKey = props.config?.clickActionKey || props.config?.buttonActionKey || props.config?.hireRelat
|
|
80
81
|
const actionFn = buttonActions[actionKey]
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
82
|
+
|
|
83
|
+
let actionFnRet = null
|
|
84
|
+
if (actionFn) {
|
|
85
|
+
actionFnRet = actionFn(props, {
|
|
86
|
+
dynamicMapComp,
|
|
87
|
+
hireRelatMapRules,
|
|
88
|
+
components,
|
|
89
|
+
selects,
|
|
90
|
+
rootValue: rootValue?.value,
|
|
91
|
+
dataLoad,
|
|
92
|
+
rootForm,
|
|
93
|
+
routeQuery,
|
|
94
|
+
validate,
|
|
95
|
+
lastClick
|
|
96
|
+
}, appContext)
|
|
97
|
+
}
|
|
98
|
+
if (actionFnRet !== null && actionFnRet !== undefined) {
|
|
99
|
+
if (isPromise(actionFnRet)) {
|
|
100
|
+
actionFnRet.then(res => {
|
|
101
|
+
if (res) {
|
|
102
|
+
lastClick()
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
} else {
|
|
106
|
+
if (actionFnRet) {
|
|
107
|
+
lastClick()
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
lastClick()
|
|
112
|
+
}
|
|
92
113
|
}
|
|
93
114
|
</script>
|