resolver-egretimp-plus 0.1.91 → 0.1.92

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.91",
3
+ "version": "0.1.92",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -181,14 +181,15 @@ function filterChange(e) {
181
181
  }
182
182
  .filter-header-wrap {
183
183
  display: flex;
184
- justify-content: space-between;
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
- max-width: 50%;
191
+ flex: 1;
192
+ margin-left: 16px;
192
193
  }
193
194
  }
194
195
  </style>
@@ -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) {
@@ -20,7 +20,7 @@ const props = defineProps({
20
20
  },
21
21
  copyModal: {
22
22
  type: [Object, Function],
23
- default: () => copyModal
23
+ default: () => null
24
24
  },
25
25
  confirmInstance: {
26
26
  type: [Object, Function],
@@ -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 class="custom-label-content" style={config.labelStyle} onClick={() => config.onLabelClick && config.onLabelClick?.(config)}>
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
+ }