resolver-egretimp-plus 0.1.17 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -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 = (cb, eventData) => {
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
- if (cb && typeof cb === 'function') {
90
+ return new Promise((resolve) => {
89
91
  saveButton?.vm?.click({
90
- afterRequestService: createAfterRequestService((ret) => { cb(ret) })
92
+ // 保存成功的回调
93
+ afterRequestService: createAfterRequestService((ret) => { resolve(ret) })
91
94
  })
92
- } else {
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 props = Object.keys(ElTableColumn.props).reduce((ret, key) => {
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
- props['show-overflow-tooltip'] = true
168
- props.showOverflowTooltip = true
167
+ retObj['show-overflow-tooltip'] = true
168
+ retObj.showOverflowTooltip = true
169
169
  } else {
170
- props['show-overflow-tooltip'] = false
171
- props.showOverflowTooltip = false
170
+ retObj['show-overflow-tooltip'] = false
171
+ retObj.showOverflowTooltip = false
172
172
  }
173
- if (!props.prop) {
174
- props.prop = config.metaCode
173
+ if (!retObj.prop) {
174
+ retObj.prop = config.metaCode
175
175
  }
176
176
  if (config.columnWidth) {
177
- props.width = config.columnWidth
177
+ retObj.width = config.columnWidth
178
178
  }
179
- if (!props.width) {
180
- props.minWidth = '160px'
179
+ if (!retObj.width) {
180
+ retObj.minWidth = '160px'
181
181
  }
182
- if (props.width == 0 || props.width == '0px' || config.hidden == '1') {
183
- props.className = 'hidden-column'
184
- props.width = '1px'
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
- props.className = `${props.className || ''} next-hidden-column`
187
+ retObj.className = `${retObj.className || ''} next-hidden-column`
188
188
  }
189
189
  if (isEndConfig) {
190
- props.className = `${props.className || ''} end-show-column`
190
+ retObj.className = `${retObj.className || ''} end-show-column`
191
191
  }
192
192
  if (config.metaType == 'CustomComponentSelectEmployees') {
193
- props.className = `${props.className || ''} clear-index`
193
+ retObj.className = `${retObj.className || ''} clear-index`
194
194
  }
195
195
  if (
196
- isPlainColumn({...config, isColumn: true}, calcDisable(config, props.mode)) &&
196
+ isPlainColumn({...config, isColumn: true}, calcDisable(config, retObj.mode)) &&
197
197
  config.showOverflowTooltip != '0' &&
198
198
  config['show-overflow-tooltip'] != '0'
199
199
  ) {
200
- props['show-overflow-tooltip'] = true
201
- props.showOverflowTooltip = true
200
+ retObj['show-overflow-tooltip'] = true
201
+ retObj.showOverflowTooltip = true
202
202
  }
203
203
  if (config.type === 'selection') {
204
- const orginSelectable = props.selectable
205
- props.selectable = (row, index) => {
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 props
225
+ return retObj
226
226
  }
227
227
 
228
228
  // 获取表格的配置,这边会做一下配置转化,表格中的不需要labelWidth
@@ -3,6 +3,7 @@
3
3
  --el-button-hover-bg-color: #EFF0F1;
4
4
  --el-button-text-color: #1F2329;
5
5
  --el-font-size-base: 14px;
6
+ --el-font-weight-primary: 400;
6
7
  }
7
8
  .el-button--large {
8
9
  padding: 8px 12px;
@@ -23,6 +23,7 @@
23
23
  --el-border-color-lighter: #d0d3d6;
24
24
  --el-fill-color-lighter: #fafafa;
25
25
  --el-fill-color-light: #eff0f1;
26
+ --el-color-danger: #F54A45;
26
27
 
27
28
  --prmary-marign-second: 12px;
28
29
  --prmary-marign: 16px
@@ -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")
@@ -1,7 +1,7 @@
1
1
  @import './components/index.scss';
2
2
  * {
3
3
  font-family: PingFang SC,sans-serif;
4
- font-weight: normal;
4
+ font-weight: inherit;
5
5
  }
6
6
  .custom-form-item.hidden-label {
7
7
  & > .el-form-item__label {