resolver-egretimp-plus 0.0.288 → 0.0.290
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
|
@@ -113,8 +113,8 @@ export default {
|
|
|
113
113
|
const displayValue = computed(() => {
|
|
114
114
|
return props.showMoney == '1' ? (isFocus.value ? currentVal.value : formatValue(modelValue.value)) : modelValue.value
|
|
115
115
|
})
|
|
116
|
-
const
|
|
117
|
-
return props.config?.lcpPagePopupMapVO
|
|
116
|
+
const isPagePopupAndSearch = computed(() => {
|
|
117
|
+
return props.config?.lcpPagePopupMapVO && inputProps.value.suffixIcon == 'Search'
|
|
118
118
|
})
|
|
119
119
|
// 弹框是否只能支持点击icon进行触发,默认是
|
|
120
120
|
const isOnlyIconClickFlag = computed(() => {
|
|
@@ -128,7 +128,7 @@ export default {
|
|
|
128
128
|
const ret = {
|
|
129
129
|
modelValue: displayValue.value
|
|
130
130
|
}
|
|
131
|
-
if (!(
|
|
131
|
+
if (!(isPagePopupAndSearch.value && !isPagePopupAlwayEdit.value)) {
|
|
132
132
|
ret['onUpdate:modelValue'] = (val) => {
|
|
133
133
|
if (props.showMoney == '1') {
|
|
134
134
|
currentVal.value = val
|
|
@@ -165,7 +165,7 @@ export default {
|
|
|
165
165
|
...attrs
|
|
166
166
|
}
|
|
167
167
|
delete ret.class
|
|
168
|
-
if (
|
|
168
|
+
if (isPagePopupAndSearch.value && isOnlyIconClickFlag.value) {
|
|
169
169
|
delete ret.onClick
|
|
170
170
|
}
|
|
171
171
|
if (ret.onWrapClick) {
|
|
@@ -238,7 +238,7 @@ export default {
|
|
|
238
238
|
const suffixIcon = resolveComponent(inputProps.value.suffixIcon)
|
|
239
239
|
ret.suffix = () => {
|
|
240
240
|
const iconProps = {}
|
|
241
|
-
if (
|
|
241
|
+
if (isPagePopupAndSearch.value) {
|
|
242
242
|
if (!props.disabled) {
|
|
243
243
|
iconProps.onClick = attrs.onClick
|
|
244
244
|
iconProps.style = {
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
<renderNode></renderNode>
|
|
4
4
|
</template>
|
|
5
5
|
<script setup>
|
|
6
|
-
import { ElText } from 'element-plus'
|
|
6
|
+
import { ElText, ElIcon } from 'element-plus'
|
|
7
7
|
import { computed, defineProps, inject, getCurrentInstance, useAttrs, useSlots } from 'vue'
|
|
8
8
|
import { commonPropsType } from '../../utils/index.js'
|
|
9
|
-
import { h } from 'vue'
|
|
9
|
+
import { h, resolveComponent, withModifiers } from 'vue'
|
|
10
10
|
|
|
11
|
+
defineOptions({
|
|
12
|
+
inheritAttrs: false
|
|
13
|
+
})
|
|
11
14
|
const slots = useSlots()
|
|
12
15
|
const lang = inject('lang')
|
|
13
16
|
const modelValue = defineModel()
|
|
@@ -20,6 +23,16 @@ const props = defineProps({
|
|
|
20
23
|
type: [String, Number],
|
|
21
24
|
default: '0'
|
|
22
25
|
},
|
|
26
|
+
suffixIcon: {
|
|
27
|
+
type: [String, Object],
|
|
28
|
+
default: ''
|
|
29
|
+
},
|
|
30
|
+
isPointer: {
|
|
31
|
+
type: [String, Number]
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
const isPagePopup = computed(() => {
|
|
35
|
+
return props.config?.lcpPagePopupMapVO
|
|
23
36
|
})
|
|
24
37
|
const attrs = useAttrs()
|
|
25
38
|
|
|
@@ -53,12 +66,18 @@ const buttonActions = inject('buttonActions', {})
|
|
|
53
66
|
const labelDesc = computed(() => {
|
|
54
67
|
return normalVal.value
|
|
55
68
|
})
|
|
69
|
+
|
|
56
70
|
const renderNode = computed(() => {
|
|
57
71
|
const textNode = h(ElText, {
|
|
58
72
|
...attrs,
|
|
59
73
|
...elTextProps.value,
|
|
60
|
-
onClick: () => {
|
|
74
|
+
onClick: withModifiers(() => {
|
|
61
75
|
clickAction()
|
|
76
|
+
}, [
|
|
77
|
+
'stop'
|
|
78
|
+
]),
|
|
79
|
+
class:{
|
|
80
|
+
cursor: props.isPointer == '1'
|
|
62
81
|
}
|
|
63
82
|
}, {
|
|
64
83
|
default: () => labelDesc.value,
|
|
@@ -66,8 +85,15 @@ const renderNode = computed(() => {
|
|
|
66
85
|
})
|
|
67
86
|
if (props.needWrap == '1') {
|
|
68
87
|
return h('div', {
|
|
69
|
-
class:
|
|
70
|
-
|
|
88
|
+
class: {
|
|
89
|
+
'cust-input-wrap': true,
|
|
90
|
+
'is-disabled': props.disabled
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
}, [
|
|
94
|
+
textNode,
|
|
95
|
+
getSuffixIcon()
|
|
96
|
+
])
|
|
71
97
|
} else {
|
|
72
98
|
return textNode
|
|
73
99
|
}
|
|
@@ -82,7 +108,7 @@ const dataLoad = inject('dataLoad')
|
|
|
82
108
|
const rootForm = inject('rootForm')
|
|
83
109
|
|
|
84
110
|
const clickAction = (e) => {
|
|
85
|
-
attrs?.onClick?.(e) // 如果配置中有点击事件
|
|
111
|
+
// attrs?.onClick?.(e) // 如果配置中有点击事件
|
|
86
112
|
const actionKey = props.config?.clickActionKey || props.config?.buttonActionKey || props.config?.hireRelat
|
|
87
113
|
const actionFn = buttonActions[actionKey]
|
|
88
114
|
actionFn && actionFn(props, {
|
|
@@ -95,6 +121,30 @@ const clickAction = (e) => {
|
|
|
95
121
|
rootForm
|
|
96
122
|
}, appContext)
|
|
97
123
|
}
|
|
124
|
+
function getSuffixIcon() {
|
|
125
|
+
if (props.suffixIcon && !props.disabled) {
|
|
126
|
+
const iconProps = {
|
|
127
|
+
color: '#a8abb2',
|
|
128
|
+
size: 14
|
|
129
|
+
}
|
|
130
|
+
let suffixIcon = props.suffixIcon
|
|
131
|
+
if (typeof suffixIcon === 'string') {
|
|
132
|
+
if (isPagePopup.value && suffixIcon == 'Search') {
|
|
133
|
+
iconProps.onClick = withModifiers(attrs.onClick, [
|
|
134
|
+
'stop'
|
|
135
|
+
]),
|
|
136
|
+
iconProps.style = {
|
|
137
|
+
cursor: 'pointer',
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
suffixIcon = resolveComponent(suffixIcon)
|
|
141
|
+
}
|
|
142
|
+
return h(ElIcon, {
|
|
143
|
+
...iconProps
|
|
144
|
+
}, [h(suffixIcon)])
|
|
145
|
+
}
|
|
146
|
+
return null
|
|
147
|
+
}
|
|
98
148
|
</script>
|
|
99
149
|
<style lang="scss" scoped>
|
|
100
150
|
.cust-input-wrap {
|
|
@@ -107,7 +157,13 @@ const clickAction = (e) => {
|
|
|
107
157
|
box-sizing: border-box;
|
|
108
158
|
border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
|
|
109
159
|
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
|
110
|
-
background: var(--el-disabled-bg-color);
|
|
160
|
+
// background: var(--el-disabled-bg-color);
|
|
111
161
|
cursor: 'not-allowed';
|
|
112
162
|
}
|
|
163
|
+
.is-disabled {
|
|
164
|
+
background: var(--el-disabled-bg-color);
|
|
165
|
+
}
|
|
166
|
+
.cursor {
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
}
|
|
113
169
|
</style>
|
package/src/utils/const.js
CHANGED
|
@@ -36,7 +36,7 @@ export const NOT_NEED_FORM_ITEM_META_TYPE = [
|
|
|
36
36
|
'cmi-dropdown-menu',
|
|
37
37
|
'cmi-divider'
|
|
38
38
|
]
|
|
39
|
-
export const EXECTE_CLICK_EVENT_COMPONENTS = ['ElInput', 'ElButton', 'CmiInput', 'CmiButton']
|
|
39
|
+
export const EXECTE_CLICK_EVENT_COMPONENTS = ['ElInput', 'ElButton', 'CmiInput', 'CmiButton', 'ElText']
|
|
40
40
|
export const TRANS_CELL_COMPONETS = ['CmiInput', 'CmiSelect', 'CmiPicker']
|
|
41
41
|
export const NOT_NEED_COL_ITEM_META_TYPE = ['CustomComponentTabPane', 'CustomComponentDialog', 'CustomComponentCol', 'CustomComponentTabPaneH5']
|
|
42
42
|
export const MULTI_PAGE_META_LIST_TYPES = ['CustomComponentTable']
|