resolver-egretimp-plus 0.1.16 → 0.1.18
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/dist/h5/index.js +1 -1
- package/dist/theme/element/index.css +1 -1
- package/dist/theme/element/src/components/button.scss +1 -0
- package/dist/theme/element/src/components/index.scss +1 -0
- package/dist/theme/element/src/components/input.scss +1 -0
- package/dist/theme/element/src/index.scss +1 -1
- package/dist/web/index.js +1 -1
- package/package.json +1 -1
- package/src/bpm/bpmInstance.js +12 -16
- package/src/components/packages-web/CustomComponentTable.jsx +22 -22
- package/src/theme/element/components/button.scss +1 -0
- package/src/theme/element/components/index.scss +1 -0
- package/src/theme/element/components/input.scss +1 -0
- package/src/theme/element/index.scss +1 -1
package/package.json
CHANGED
package/src/bpm/bpmInstance.js
CHANGED
|
@@ -62,15 +62,17 @@ export class Bpm {
|
|
|
62
62
|
}
|
|
63
63
|
setNativeMethods() {
|
|
64
64
|
const { validate: nativeValidate, dynamicMapComp, bpmSubmitBtn, toExecuteLoadServices } = this.params
|
|
65
|
-
const { getDetailReq, customValidate } = this.bpmConfigs
|
|
65
|
+
const { getDetailReq, customValidate, saveValidate } = this.bpmConfigs
|
|
66
66
|
|
|
67
|
-
const toSave = (
|
|
67
|
+
const toSave = async (eventData) => {
|
|
68
|
+
if (saveValidate && typeof saveValidate === 'function') {
|
|
69
|
+
const saveVliad = await saveValidate()
|
|
70
|
+
if (!saveVliad) {
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
}
|
|
68
74
|
const saveButton = dynamicMapComp[bpmSubmitBtn]
|
|
69
75
|
if (saveButton) {
|
|
70
|
-
if (!eventData && typeof cb !== 'function') {
|
|
71
|
-
eventData = cb
|
|
72
|
-
cb = null
|
|
73
|
-
}
|
|
74
76
|
const createAfterRequestService = (fn) => {
|
|
75
77
|
return async (ret) => {
|
|
76
78
|
const { saveAfter } = this.bpmConfigs
|
|
@@ -85,18 +87,12 @@ export class Bpm {
|
|
|
85
87
|
}, 0);
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
|
-
|
|
90
|
+
return new Promise((resolve) => {
|
|
89
91
|
saveButton?.vm?.click({
|
|
90
|
-
|
|
92
|
+
// 保存成功的回调
|
|
93
|
+
afterRequestService: createAfterRequestService((ret) => { resolve(ret) })
|
|
91
94
|
})
|
|
92
|
-
}
|
|
93
|
-
return new Promise((resolve) => {
|
|
94
|
-
saveButton?.vm?.click({
|
|
95
|
-
// 保存成功的回调
|
|
96
|
-
afterRequestService: createAfterRequestService((ret) => { resolve(ret) })
|
|
97
|
-
})
|
|
98
|
-
})
|
|
99
|
-
}
|
|
95
|
+
})
|
|
100
96
|
} else {
|
|
101
97
|
messageInstance?.warning?.('no set bpmSubmitBtn, or bpmSubmitBtn is invalid, at preset, bpmSubmitBtn:', props.bpmSubmitBtn)
|
|
102
98
|
}
|
|
@@ -157,52 +157,52 @@ export default {
|
|
|
157
157
|
return config.displayType != DISPLAY_HIDDEN && !(config.width == 0 || config.width == '0px' || config.hidden == '1')
|
|
158
158
|
})?.length
|
|
159
159
|
const nextConfig = nextList.find(config => config.displayType != DISPLAY_HIDDEN)
|
|
160
|
-
const
|
|
160
|
+
const retObj = Object.keys(ElTableColumn.props).reduce((ret, key) => {
|
|
161
161
|
if (hasOwn(config, key)) {
|
|
162
162
|
ret[key] = config[key]
|
|
163
163
|
}
|
|
164
164
|
return ret
|
|
165
165
|
}, {})
|
|
166
166
|
if (config.showOverflowTooltip == '1' || config['show-overflow-tooltip'] == '1') {
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
retObj['show-overflow-tooltip'] = true
|
|
168
|
+
retObj.showOverflowTooltip = true
|
|
169
169
|
} else {
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
retObj['show-overflow-tooltip'] = false
|
|
171
|
+
retObj.showOverflowTooltip = false
|
|
172
172
|
}
|
|
173
|
-
if (!
|
|
174
|
-
|
|
173
|
+
if (!retObj.prop) {
|
|
174
|
+
retObj.prop = config.metaCode
|
|
175
175
|
}
|
|
176
176
|
if (config.columnWidth) {
|
|
177
|
-
|
|
177
|
+
retObj.width = config.columnWidth
|
|
178
178
|
}
|
|
179
|
-
if (!
|
|
180
|
-
|
|
179
|
+
if (!retObj.width) {
|
|
180
|
+
retObj.minWidth = '160px'
|
|
181
181
|
}
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
if (retObj.width == 0 || retObj.width == '0px' || config.hidden == '1') {
|
|
183
|
+
retObj.className = 'hidden-column'
|
|
184
|
+
retObj.width = '1px'
|
|
185
185
|
}
|
|
186
186
|
if (nextConfig && (nextConfig.width == 0 || nextConfig.width == '0px' || nextConfig.hidden == '1')) {
|
|
187
|
-
|
|
187
|
+
retObj.className = `${retObj.className || ''} next-hidden-column`
|
|
188
188
|
}
|
|
189
189
|
if (isEndConfig) {
|
|
190
|
-
|
|
190
|
+
retObj.className = `${retObj.className || ''} end-show-column`
|
|
191
191
|
}
|
|
192
192
|
if (config.metaType == 'CustomComponentSelectEmployees') {
|
|
193
|
-
|
|
193
|
+
retObj.className = `${retObj.className || ''} clear-index`
|
|
194
194
|
}
|
|
195
195
|
if (
|
|
196
|
-
isPlainColumn({...config, isColumn: true}, calcDisable(config,
|
|
196
|
+
isPlainColumn({...config, isColumn: true}, calcDisable(config, retObj.mode)) &&
|
|
197
197
|
config.showOverflowTooltip != '0' &&
|
|
198
198
|
config['show-overflow-tooltip'] != '0'
|
|
199
199
|
) {
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
retObj['show-overflow-tooltip'] = true
|
|
201
|
+
retObj.showOverflowTooltip = true
|
|
202
202
|
}
|
|
203
203
|
if (config.type === 'selection') {
|
|
204
|
-
const orginSelectable =
|
|
205
|
-
|
|
204
|
+
const orginSelectable = retObj.selectable
|
|
205
|
+
retObj.selectable = (row, index) => {
|
|
206
206
|
let orginRet = true
|
|
207
207
|
if (orginSelectable && typeof orginSelectable === 'function') {
|
|
208
208
|
orginRet = orginSelectable(row, index, {
|
|
@@ -222,7 +222,7 @@ export default {
|
|
|
222
222
|
return orginRet && parentSelectionsRet
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
return
|
|
225
|
+
return retObj
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
// 获取表格的配置,这边会做一下配置转化,表格中的不需要labelWidth
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.el-input__wrapper {
|
|
13
|
+
padding: 1px 8px;
|
|
13
14
|
.el-input__clear {
|
|
14
15
|
svg path {
|
|
15
16
|
d: path("M 764.288 214.592 L 512 466.88 L 259.712 214.592 a 31.936 31.936 0 0 0 -45.12 45.12 L 466.752 512 L 214.528 764.224 a 31.936 31.936 0 1 0 45.12 45.184 L 512 557.184 l 252.288 252.288 a 31.936 31.936 0 0 0 45.12 -45.12 L 557.12 512.064 l 252.288 -252.352 a 31.936 31.936 0 1 0 -45.12 -45.184 Z")
|