resolver-egretimp-plus 0.1.85 → 0.1.87
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/theme/element/index.css +1 -1
- package/dist/theme/element/src/components/collapse.scss +13 -0
- package/dist/theme/element/src/components/select.scss +60 -1
- package/dist/theme/element/src/components/tabs.scss +9 -1
- package/dist/web/index.js +2 -2
- package/package.json +1 -1
- package/src/bpm/bpmInstance.js +8 -1
- package/src/components/options/OptionsDefault.vue +47 -0
- package/src/components/packages-web/ElSelect.jsx +64 -14
- package/src/index.jsx +15 -2
- package/src/theme/element/components/collapse.scss +13 -0
- package/src/theme/element/components/select.scss +60 -1
- package/src/theme/element/components/tabs.scss +9 -1
package/package.json
CHANGED
package/src/bpm/bpmInstance.js
CHANGED
|
@@ -38,7 +38,12 @@ export let bpmInstance = null
|
|
|
38
38
|
|
|
39
39
|
export class Bpm {
|
|
40
40
|
params = {}
|
|
41
|
-
bpmConfigs = {
|
|
41
|
+
bpmConfigs = {
|
|
42
|
+
// getDetailReq, // 保存成功之后获取详情传递的数据
|
|
43
|
+
// customValidate, // 提交的时候需要的 额外的校验
|
|
44
|
+
// saveValidate, // 保存 时候的校验
|
|
45
|
+
// saveAfter // 保存成功之后的回调
|
|
46
|
+
}
|
|
42
47
|
eventData = null
|
|
43
48
|
postOptions = null
|
|
44
49
|
sdkInstance = null
|
|
@@ -141,6 +146,7 @@ export class Bpm {
|
|
|
141
146
|
console.log('submitType==:', submitType)
|
|
142
147
|
console.log('actionType==:', actionType)
|
|
143
148
|
if (MESSAGE_TYPE.GET_FORM_DATA === messageType) {
|
|
149
|
+
// 如果有传入这个类型操作,就用传递进来的这个操作
|
|
144
150
|
let action = this.actions?.[submitType]?.formAction
|
|
145
151
|
if (!action) {
|
|
146
152
|
action = this.getDefaultAction(eventData)
|
|
@@ -168,6 +174,7 @@ export class Bpm {
|
|
|
168
174
|
let closeFlag = true
|
|
169
175
|
closeFlag = ![SUBMIT_TYPE.PROCESS_SHOW, SUBMIT_TYPE.BACK, SUBMIT_TYPE.DRAFT_HANDLE].includes(submitType)
|
|
170
176
|
|
|
177
|
+
// 如果有传入这个类型操作,就用传递进来的这个操作
|
|
171
178
|
let action = this.actions?.[submitType]?.successAction
|
|
172
179
|
if (!action) {
|
|
173
180
|
action = this.getDefaultAction(eventData)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
label: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: ''
|
|
6
|
+
}
|
|
7
|
+
})
|
|
8
|
+
</script>
|
|
9
|
+
<template>
|
|
10
|
+
<div class="option-item">
|
|
11
|
+
<slot>
|
|
12
|
+
{{ label }}
|
|
13
|
+
</slot>
|
|
14
|
+
<div class="multi-checkbox box-checked">
|
|
15
|
+
<el-checkbox :checked="true"></el-checkbox>
|
|
16
|
+
<div class="check-mask"></div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="multi-checkbox box-not-checked">
|
|
19
|
+
<el-checkbox :checked="false"></el-checkbox>
|
|
20
|
+
<div class="check-mask"></div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<style lang="scss" scoped>
|
|
26
|
+
.option-item {
|
|
27
|
+
.multi-checkbox {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 50%;
|
|
30
|
+
right: 4px;
|
|
31
|
+
transform: translateY(-50%);
|
|
32
|
+
height: 32px;
|
|
33
|
+
.check-mask {
|
|
34
|
+
position: absolute;
|
|
35
|
+
left: 0;
|
|
36
|
+
right: 0;
|
|
37
|
+
top: 0;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.box-checked, .box-not-checked {
|
|
43
|
+
display: none;
|
|
44
|
+
margin-right: 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { ElSelect, ElOption } from 'element-plus'
|
|
1
|
+
import { ElSelect, ElOption, ElSelectV2 } from 'element-plus'
|
|
2
2
|
import { computed, inject, onMounted, watch} from 'vue'
|
|
3
3
|
import { commonPropsType, hasOwn, isArray, isNumber, isPlainObject, isString, VALUE_TYPES } from '../../utils/index.js'
|
|
4
|
+
import OptionsDefault from '../options/optionsDefault.vue'
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
inheritAttrs: false,
|
|
7
8
|
props: {
|
|
9
|
+
...ElSelectV2.props,
|
|
8
10
|
...ElSelect.props,
|
|
9
11
|
...commonPropsType,
|
|
10
|
-
multiple: [String, Boolean],
|
|
11
|
-
filterable: [String, Boolean],
|
|
12
|
+
multiple: [String, Boolean, Number],
|
|
13
|
+
filterable: [String, Boolean, Number],
|
|
12
14
|
multipleLimit: [String, Number],
|
|
13
15
|
rangeOptions: Array,
|
|
14
16
|
excludeOptions: Array,
|
|
@@ -16,6 +18,10 @@ export default {
|
|
|
16
18
|
separator: {
|
|
17
19
|
type: [String],
|
|
18
20
|
default: ','
|
|
21
|
+
},
|
|
22
|
+
virtualized: {
|
|
23
|
+
type: [String, Boolean, Number],
|
|
24
|
+
default: ''
|
|
19
25
|
}
|
|
20
26
|
},
|
|
21
27
|
emits: ['update:modelValue'],
|
|
@@ -67,6 +73,9 @@ export default {
|
|
|
67
73
|
|
|
68
74
|
// 是否为多选
|
|
69
75
|
const isMutiple = computed(() => {
|
|
76
|
+
if (typeof props.multiple === 'boolean') {
|
|
77
|
+
return props.multiple
|
|
78
|
+
}
|
|
70
79
|
return props.multiple == '1'
|
|
71
80
|
})
|
|
72
81
|
|
|
@@ -81,6 +90,17 @@ export default {
|
|
|
81
90
|
return list
|
|
82
91
|
})
|
|
83
92
|
|
|
93
|
+
const isVirtualized = computed(() => {
|
|
94
|
+
if (typeof props.virtualized === 'boolean') {
|
|
95
|
+
return props.virtualized
|
|
96
|
+
}
|
|
97
|
+
return props.virtualized == '1'
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
const currentComp = computed(() => {
|
|
101
|
+
return isVirtualized.value ? ElSelectV2 : ElSelect
|
|
102
|
+
})
|
|
103
|
+
|
|
84
104
|
const value = computed({
|
|
85
105
|
get() {
|
|
86
106
|
if (isMutiple.value) {
|
|
@@ -130,14 +150,20 @@ export default {
|
|
|
130
150
|
})
|
|
131
151
|
|
|
132
152
|
const selectProps = computed(() => {
|
|
133
|
-
|
|
153
|
+
// let props = ElSelect.props
|
|
154
|
+
// if (isVirtualized.value) {
|
|
155
|
+
// props = ElSelectV2.props
|
|
156
|
+
// }
|
|
157
|
+
// 不同通过上面注释代码进行赋值,可能是ElSelectV2.props、ElSelect.props不能复制给其他的
|
|
158
|
+
|
|
159
|
+
const attrs = Object.keys(isVirtualized.value ? ElSelectV2.props : ElSelect.props).reduce((ret, key) => {
|
|
134
160
|
ret[key] = props[key]
|
|
135
161
|
return ret
|
|
136
162
|
}, {})
|
|
137
163
|
if (attrs.placeholder === null || attrs.placeholder === undefined) {
|
|
138
164
|
attrs.placeholder = ''
|
|
139
165
|
}
|
|
140
|
-
if (typeof attrs.filterable
|
|
166
|
+
if (typeof attrs.filterable !== 'boolean') {
|
|
141
167
|
attrs.filterable = attrs.filterable == '1'
|
|
142
168
|
}
|
|
143
169
|
if (typeof attrs.multiple === 'string') {
|
|
@@ -148,13 +174,23 @@ export default {
|
|
|
148
174
|
delete attrs['suffix-icon']
|
|
149
175
|
}
|
|
150
176
|
attrs.multipleLimit = Number(parseInt(attrs.multipleLimit || 0))
|
|
177
|
+
if (isVirtualized.value) {
|
|
178
|
+
// 返回虚拟select需要的options
|
|
179
|
+
attrs.options = options.value?.map(option => {
|
|
180
|
+
return {
|
|
181
|
+
...option,
|
|
182
|
+
value: option.columnValue,
|
|
183
|
+
label: lang?.value?.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc,
|
|
184
|
+
disabled: option.columnStatus == '0' || option.columnStatus == '2'
|
|
185
|
+
}
|
|
186
|
+
})
|
|
187
|
+
}
|
|
151
188
|
return attrs
|
|
152
189
|
})
|
|
153
190
|
const lang = inject('lang')
|
|
154
191
|
const clear = () => {
|
|
155
192
|
modelValue.value = ''
|
|
156
193
|
}
|
|
157
|
-
|
|
158
194
|
const getRenderSlots = function () {
|
|
159
195
|
const optionsSlotKeys = {
|
|
160
196
|
optionDefault: 'default'
|
|
@@ -168,9 +204,20 @@ export default {
|
|
|
168
204
|
selectSlots[key] = slots[key]
|
|
169
205
|
}
|
|
170
206
|
})
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
207
|
+
|
|
208
|
+
if (isVirtualized.value) {
|
|
209
|
+
const originDef = selectSlots.default
|
|
210
|
+
selectSlots.default = ({ item: option }) => {
|
|
211
|
+
return (
|
|
212
|
+
<OptionsDefault label={lang?.value?.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc}>
|
|
213
|
+
{
|
|
214
|
+
originDef?.(option)
|
|
215
|
+
}
|
|
216
|
+
</OptionsDefault>
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
} else {
|
|
220
|
+
selectSlots.default = () => options.value?.map(option => {
|
|
174
221
|
return (
|
|
175
222
|
<ElOption
|
|
176
223
|
key={option.columnValue}
|
|
@@ -178,21 +225,24 @@ export default {
|
|
|
178
225
|
value={option.columnValue}
|
|
179
226
|
disabled={option.columnStatus == '0' || option.columnStatus == '2'}
|
|
180
227
|
>
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
|
|
228
|
+
<OptionsDefault label={lang?.value?.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc}>
|
|
229
|
+
{
|
|
230
|
+
optionsSlots?.default?.(option)
|
|
231
|
+
}
|
|
232
|
+
</OptionsDefault>
|
|
184
233
|
</ElOption>
|
|
185
234
|
)
|
|
186
235
|
})
|
|
187
236
|
}
|
|
237
|
+
return selectSlots
|
|
188
238
|
}
|
|
189
239
|
return () => {
|
|
190
240
|
return (
|
|
191
|
-
<
|
|
241
|
+
<currentComp.value class="custom-self-select" { ...{...attrs, ...selectProps.value }} v-model={value.value} onClear={clear}>
|
|
192
242
|
{
|
|
193
243
|
getRenderSlots()
|
|
194
244
|
}
|
|
195
|
-
</
|
|
245
|
+
</currentComp.value>
|
|
196
246
|
)
|
|
197
247
|
}
|
|
198
248
|
}
|
package/src/index.jsx
CHANGED
|
@@ -157,20 +157,33 @@ export default {
|
|
|
157
157
|
default: false
|
|
158
158
|
},
|
|
159
159
|
bpmMessage: {
|
|
160
|
+
// 传递给致远的参数
|
|
160
161
|
type: [Object, Function],
|
|
161
162
|
default: {}
|
|
162
163
|
},
|
|
163
164
|
bpmSubmitBtn: {
|
|
165
|
+
// 配置了保存服务的按钮;例如 a->b->c
|
|
164
166
|
type: [String],
|
|
165
167
|
default: ''
|
|
166
168
|
},
|
|
167
169
|
bpmActions: {
|
|
168
170
|
type: [Object],
|
|
169
|
-
default: {
|
|
171
|
+
default: {
|
|
172
|
+
// [SUBMIT_TYPE.SEND]: {
|
|
173
|
+
// formAction, // 提交为GET_FORM_DATA 时候的 动作
|
|
174
|
+
// postMessageData, // 传递的参数
|
|
175
|
+
// successAction // 提交为PROCESS_ACTION_SUCCESS 时候的 动作
|
|
176
|
+
// }
|
|
177
|
+
}
|
|
170
178
|
},
|
|
171
179
|
bpmConfigs: {
|
|
172
180
|
type: Object,
|
|
173
|
-
default: {
|
|
181
|
+
default: {
|
|
182
|
+
// getDetailReq, // 保存成功之后获取详情传递的数据
|
|
183
|
+
// customValidate, // 提交的时候需要的 额外的校验
|
|
184
|
+
// saveValidate, // 保存 时候的校验
|
|
185
|
+
// saveAfter // 保存成功之后的回调
|
|
186
|
+
}
|
|
174
187
|
},
|
|
175
188
|
bpmBtns: {
|
|
176
189
|
type: Array,
|
|
@@ -127,6 +127,19 @@
|
|
|
127
127
|
margin-bottom: 16px;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
.CustomComponentCollapse.is-card:has(+ .CustomComponentCard.is-card) {
|
|
131
|
+
margin-bottom: 16px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.CustomComponentCard.is-card:has(+ .CustomComponentCollapse.is-card) {
|
|
135
|
+
margin-bottom: 16px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
.CustomComponentCard.is-card:has(+ .CustomComponentCard.is-card) {
|
|
140
|
+
margin-bottom: 16px;
|
|
141
|
+
}
|
|
142
|
+
|
|
130
143
|
// 加权
|
|
131
144
|
.CustomComponentCollapse.CustomComponentCollapse.CustomComponentCollapse:last-child {
|
|
132
145
|
margin-bottom: 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// select样式调整
|
|
3
|
-
.el-select__icon {
|
|
3
|
+
.el-select__icon, .el-input__icon {
|
|
4
4
|
color: #646A73;
|
|
5
5
|
font-size: 18px;
|
|
6
6
|
}
|
|
@@ -10,6 +10,65 @@
|
|
|
10
10
|
margin-left: 0;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
+
.el-select-dropdown {
|
|
14
|
+
.el-select-dropdown__item.is-selected::after {
|
|
15
|
+
content: "";
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 50%;
|
|
18
|
+
right: 4px;
|
|
19
|
+
border-top: none;
|
|
20
|
+
border-right: none;
|
|
21
|
+
background-repeat: no-repeat;
|
|
22
|
+
background-position: center;
|
|
23
|
+
background-color: var(--el-color-primary);
|
|
24
|
+
mask: url("data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E") no-repeat;
|
|
25
|
+
mask-size: 100% 100%;
|
|
26
|
+
transform: translateY(-50%);
|
|
27
|
+
width: 16px;
|
|
28
|
+
height: 16px;
|
|
29
|
+
}
|
|
30
|
+
&.is-multiple {
|
|
31
|
+
.el-select-dropdown__item.is-selected::after {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
.el-select-dropdown__item {
|
|
35
|
+
.box-not-checked {
|
|
36
|
+
display: block;
|
|
37
|
+
}
|
|
38
|
+
.box-checked {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
&.is-selected {
|
|
42
|
+
.box-checked {
|
|
43
|
+
display: block;
|
|
44
|
+
}
|
|
45
|
+
.box-not-checked {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
.el-select-dropdown__list {
|
|
52
|
+
padding: 6px 4px;
|
|
53
|
+
& > div {
|
|
54
|
+
position: relative;
|
|
55
|
+
}
|
|
56
|
+
.el-select-dropdown__item {
|
|
57
|
+
border-radius: 4px;
|
|
58
|
+
padding: 0 32px 0 4px;
|
|
59
|
+
height: 32px;
|
|
60
|
+
line-height: 32px;
|
|
61
|
+
&:hover {
|
|
62
|
+
background: #EFF0F1;
|
|
63
|
+
}
|
|
64
|
+
&:active {
|
|
65
|
+
background: #DEE0E3;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
13
72
|
|
|
14
73
|
/* 覆盖下拉选中文字的样式 */
|
|
15
74
|
.el-select-dropdown__item.is-selected {
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
|
|
23
23
|
.el-tabs {
|
|
24
24
|
--el-text-color-primary: #1F2329;
|
|
25
|
-
|
|
26
25
|
// display: block;
|
|
27
26
|
border-radius: 4px;
|
|
28
27
|
overflow: hidden;
|
|
@@ -30,10 +29,19 @@
|
|
|
30
29
|
padding: var(--prmary-marign-second) var(--prmary-marign) var(--prmary-marign) var(--prmary-marign);
|
|
31
30
|
}
|
|
32
31
|
}
|
|
32
|
+
.el-tabs__active-bar {
|
|
33
|
+
bottom: 1px;
|
|
34
|
+
height: 3px;
|
|
35
|
+
border-radius: 2px;
|
|
36
|
+
}
|
|
33
37
|
.el-tabs__item {
|
|
34
38
|
padding: 0 16px;
|
|
35
39
|
min-height: var(--el-tabs-header-height);
|
|
36
40
|
height: unset;
|
|
41
|
+
font-weight: 400;
|
|
42
|
+
&.is-active {
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
}
|
|
37
45
|
}
|
|
38
46
|
.el-tabs__header {
|
|
39
47
|
margin: 0 0 16px;
|