resolver-egretimp-plus 0.1.91 → 0.1.93
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/web/index.js +1 -1
- package/package.json +1 -1
- package/src/components/packages-H5/CmiPicker.vue +3 -2
- package/src/components/packages-web/CustomComponentPlain.vue +12 -2
- package/src/components/packages-web/ElDatePicker.vue +4 -1
- package/src/resolver-H5.vue +1 -1
- package/src/utils/render.jsx +40 -1
package/package.json
CHANGED
|
@@ -181,14 +181,15 @@ function filterChange(e) {
|
|
|
181
181
|
}
|
|
182
182
|
.filter-header-wrap {
|
|
183
183
|
display: flex;
|
|
184
|
-
justify-content:
|
|
184
|
+
justify-content: flex-start;
|
|
185
185
|
align-items: center;
|
|
186
186
|
width: 100%;
|
|
187
187
|
.filte-title {
|
|
188
188
|
max-width: 50%;
|
|
189
189
|
}
|
|
190
190
|
.filter-input {
|
|
191
|
-
|
|
191
|
+
flex: 1;
|
|
192
|
+
margin-left: 16px;
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
195
|
</style>
|
|
@@ -24,6 +24,16 @@ const props = defineProps({
|
|
|
24
24
|
isPointer: {
|
|
25
25
|
type: [String, Number]
|
|
26
26
|
},
|
|
27
|
+
// 多选的分割符号
|
|
28
|
+
separator: {
|
|
29
|
+
type: [String],
|
|
30
|
+
default: ','
|
|
31
|
+
},
|
|
32
|
+
// 多选显示时候 分隔的符号
|
|
33
|
+
separatorDesc: {
|
|
34
|
+
type: [String],
|
|
35
|
+
default: null
|
|
36
|
+
},
|
|
27
37
|
showMoney: {
|
|
28
38
|
type: [String, Number],
|
|
29
39
|
default: ''
|
|
@@ -161,14 +171,14 @@ function selectFormat(value) {
|
|
|
161
171
|
// 在满足多选,并且不是str格式的时候,就表示value为数组类型,取反就表示不满足的时候,需要转换成数组格式进行计算
|
|
162
172
|
if (!(multiple && !isStrVal)) {
|
|
163
173
|
try {
|
|
164
|
-
valList = valList ? (valList?.split(
|
|
174
|
+
valList = valList ? (valList?.split(props.separator) || []) : []
|
|
165
175
|
} catch (error) {
|
|
166
176
|
debugger
|
|
167
177
|
}
|
|
168
178
|
}
|
|
169
179
|
return valList?.reduce((ret, val) => {
|
|
170
180
|
const str = props?.options?.find(item => item.columnValue == val)?.[lang?.value?.indexOf('zh') > -1 ? 'columnDesc_zh' : 'columnDesc'] || ''
|
|
171
|
-
return `${ret}${ret ?
|
|
181
|
+
return `${ret}${ret ? (props.separatorDesc || props.separator) : ''}${str}`
|
|
172
182
|
}, '')
|
|
173
183
|
}
|
|
174
184
|
|
|
@@ -54,7 +54,7 @@ const value = computed({
|
|
|
54
54
|
if (isNaN(Number(modeValue.value))) {
|
|
55
55
|
return modeValue.value
|
|
56
56
|
} else {
|
|
57
|
-
if (datePickerProps.valueFormat === 'timestamp' || `${modeValue.value}`.length >= 13) {
|
|
57
|
+
if (datePickerProps.value.valueFormat === 'timestamp' || `${modeValue.value}`.length >= 13) {
|
|
58
58
|
return Number(modeValue.value)
|
|
59
59
|
}
|
|
60
60
|
return modeValue.value
|
|
@@ -71,6 +71,9 @@ watch(value, () => {
|
|
|
71
71
|
})
|
|
72
72
|
|
|
73
73
|
const disabledDate = (date) => {
|
|
74
|
+
if (datePickerProps.value?.disabledDate?.(date)) {
|
|
75
|
+
return true
|
|
76
|
+
}
|
|
74
77
|
const currentDateStr = dayjs(date).format('YYYY-MM-DD')
|
|
75
78
|
const currentDateUnix = dayjs(currentDateStr).unix()
|
|
76
79
|
if (props.min) {
|
package/src/resolver-H5.vue
CHANGED
package/src/utils/render.jsx
CHANGED
|
@@ -975,10 +975,26 @@ function createFormLable(config, lang = 'zh') {
|
|
|
975
975
|
}
|
|
976
976
|
return (
|
|
977
977
|
<div title={lang.indexOf('zh') > -1 ? (config.labelZh || config.metaNameZh) : (config.labelEn || config.metaNameEn)} class="custom-label">
|
|
978
|
-
<span
|
|
978
|
+
<span
|
|
979
|
+
onMouseenter={(e) => labelMouseEnenter(e, config, lang)}
|
|
980
|
+
onMouseout={() => config._labelShowTip = false}
|
|
981
|
+
class="custom-label-content" style={config.labelStyle}
|
|
982
|
+
onClick={() => config.onLabelClick && config.onLabelClick?.(config)}
|
|
983
|
+
>
|
|
979
984
|
{required ? <span style="color: #f5222d; margin-right: 3px">*</span> : null}
|
|
980
985
|
<span>{lang.indexOf('zh') > -1 ? (config.labelZh || config.metaNameZh) : (config.labelEn || config.metaNameEn)}</span>
|
|
981
986
|
</span>
|
|
987
|
+
{
|
|
988
|
+
config._labelShowTip ?
|
|
989
|
+
<ElTooltip
|
|
990
|
+
placement="top"
|
|
991
|
+
visible={config._labelShowTip && !!config._triggerRef}
|
|
992
|
+
content={lang.indexOf('zh') > -1 ? (config.labelZh || config.metaNameZh) : (config.labelEn || config.metaNameEn)}
|
|
993
|
+
virtualTriggering
|
|
994
|
+
virtualRef={config._triggerRef}
|
|
995
|
+
></ElTooltip>
|
|
996
|
+
: null
|
|
997
|
+
}
|
|
982
998
|
{
|
|
983
999
|
config.hintFlag == '1' ? (
|
|
984
1000
|
<ElTooltip popper-class="poppper-class" effect="dark" content={lang.indexOf('zh') > -1 ? config.hintContentZh : config.hintContentEn} placement="top">
|
|
@@ -1074,3 +1090,26 @@ export function getComponentSolt({
|
|
|
1074
1090
|
}
|
|
1075
1091
|
return {}
|
|
1076
1092
|
}
|
|
1093
|
+
|
|
1094
|
+
function labelMouseEnenter(e, config, lang) {
|
|
1095
|
+
const innerText = lang.indexOf('zh') > -1 ? (config.labelZh || config.metaNameZh) : (config.labelEn || config.metaNameEn)
|
|
1096
|
+
// obj为鼠标移入时的事件对象
|
|
1097
|
+
// currentwidth 为文本在页面中所占的宽度,创建标签,加入到页面,获取currentwidth,最后
|
|
1098
|
+
let TemporaryTag = document.createElement('span');
|
|
1099
|
+
TemporaryTag.innerText = innerText
|
|
1100
|
+
TemporaryTag.className = 'getTextWidth'
|
|
1101
|
+
document.querySelector('body').appendChild(TemporaryTag)
|
|
1102
|
+
let currentWidth = document.querySelector('.getTextWidth').offsetWidth
|
|
1103
|
+
document.querySelector(".getTextWidth").remove()
|
|
1104
|
+
// cellwidth为表格容器的宽度
|
|
1105
|
+
// 当文本宽度小于|等于容器宽度两倍时,代表文本显示未超过两行
|
|
1106
|
+
// 当前宽度小于等于(两倍单元格宽度)时,显示提示信息为假;否则,显示提示信息为真。
|
|
1107
|
+
const cellWidth = e.target.offsetWidth
|
|
1108
|
+
if (currentWidth <= (2 * cellWidth)) {
|
|
1109
|
+
config._labelShowTip = false
|
|
1110
|
+
config._triggerRef = null
|
|
1111
|
+
} else {
|
|
1112
|
+
config._labelShowTip = true
|
|
1113
|
+
config._triggerRef = e.target
|
|
1114
|
+
}
|
|
1115
|
+
}
|