resolver-egretimp-plus 0.1.90 → 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.
@@ -1,201 +1,201 @@
1
- <template>
2
- <div v-if="modal" class="warning-modal _copymodal">
3
- <div class="warning-modal-backdrop" />
4
- <div class="warning-modal">
5
- <div class="warning-modal-dialog warning-tips">
6
- <div class="warning-modal-content">
7
- <div class="warning-icon" style="padding-top: 15px">
8
- <el-icon v-if="type == 'alert'"><WarningFilled /></el-icon>
9
- <el-icon v-if="type == 'check'"><SuccessFilled /></el-icon>
10
- <el-icon v-if="type == 'help'"><QuestionFilled /></el-icon>
11
- </div>
12
- <div v-if="msg" class="waring-cnt maxheight">
13
- <p style="padding: 15px">
14
- <span>{{ msg }}</span>
15
- </p>
16
- </div>
17
- <div v-else class="waring-cnt" v-html="msgHtml" />
18
- <div v-if="showcopy" class="copycontent">
19
- <span class="copycontent-l">{{ copytype }}</span>
20
- <el-tooltip :content="copytip || (lang === 'zh-CN' ? '点击复制单号' : 'Copy by clicking the order number')">
21
- <span class="copycontent-r" @click="copyClicked(copymsg)" :data-clipboard-text="copymsg">{{
22
- copymsg
23
- }}</span>
24
- </el-tooltip>
25
- </div>
26
- <div v-if="endMsg" class="waring-cnt">
27
- <p style="padding: 15px">
28
- <span>{{ endMsg }}</span>
29
- </p>
30
- </div>
31
- <div v-if="endMsgHtml" class="waring-cnt" v-html="endMsgHtml" />
32
- <div
33
- v-if="messageShow"
34
- class="copycontent"
35
- style="display: block; padding: 0 5%"
36
- >
37
- <span>{{ firstMsg }} {{ copytype }}</span>
38
- <el-tooltip :content="copytip || (lang === 'zh-CN' ? '点击复制单号' : 'Copy by clicking the order number')">
39
- <span class="copycontent-r" @click="copyClicked(copymsg)" :data-clipboard-text="copymsg">{{
40
- copymsg
41
- }}</span>
42
- </el-tooltip>
43
- <span>{{ lastMsg }}</span>
44
- </div>
45
- <div v-if="showCancle" class="waring-btn">
46
- <span
47
- class="yes"
48
- style="background-color: #999; border-bottom-right-radius: 0;width: 50%;"
49
- @click="handleNo"
50
- >{{ cancleText || (lang === 'zh-CN' ? '取消' : 'Cancel') }}</span>
51
- <span class="yes" @click="handleYes" style="width: 50%;">{{ okText || (lang === 'zh-CN' ? '确定' : 'Confirm') }}</span>
52
- </div>
53
- <div v-else class="waring-btn">
54
- <span class="yes" @click="handleYes">{{ okText || (lang === 'zh-CN' ? '确定' : 'Confirm') }}</span>
55
- </div>
56
- </div>
57
- </div>
58
- </div>
59
- </div>
60
- </template>
61
-
62
- <script setup >
63
- import { WarningFilled, SuccessFilled, QuestionFilled } from '@element-plus/icons-vue'
64
- import { ElIcon ,ElMessage } from 'element-plus'
65
- </script>
66
-
67
- <script >
68
- import { ref } from 'vue'
69
- import Clipboard from 'clipboard'
70
-
71
- const customAlert = ref(null)
72
-
73
- export default {
74
- props: {
75
- lang: {
76
- type: String,
77
- default: 'zh-CN'
78
- },
79
- msg: {
80
- type: String,
81
- default: ''
82
- },
83
- type: {
84
- type: String,
85
- default: 'alert'
86
- },
87
- firstMsg: {
88
- type: String,
89
- default: ''
90
- },
91
- lastMsg: {
92
- type: String,
93
- default: ''
94
- },
95
- endMsg: {
96
- type: String,
97
- default: ''
98
- },
99
- endMsgHtml: {
100
- type: String,
101
- default: ''
102
- },
103
- msgHtml: {
104
- type: String,
105
- default: ''
106
- },
107
- showCancle: {
108
- type: Boolean,
109
- default: true
110
- },
111
- cancleText: {
112
- type: String,
113
- default: '',
114
- },
115
- okText: {
116
- type: String,
117
- default: '',
118
- },
119
- copytip: {
120
- type: String,
121
- default: ''
122
- },
123
- successtext: {
124
- type: String,
125
- default: '',
126
- },
127
- handleCancle: {
128
- type: Function
129
- },
130
- handleOk: {
131
- type: Function
132
- },
133
- showcopy: {
134
- type: Boolean,
135
- default: false
136
- },
137
- messageShow: {
138
- type: Boolean,
139
- default: false
140
- },
141
- copytype: {
142
- type: String,
143
- default: ''
144
- },
145
- copymsg: {
146
- type: String,
147
- default: ''
148
- }
149
- },
150
- data() {
151
- return {
152
- modal: false
153
- }
154
- },
155
- watch: {
156
- modal(val) {
157
- if (!val) {
158
- let parent = (customAlert.value && customAlert.value['parentNode']) || null
159
- if (customAlert.value && document.body.contains(parent) && parent) {
160
- document.body.removeChild(parent)
161
- }
162
- }
163
- }
164
- },
165
- created() {
166
- this.modal = true
167
- },
168
- unmounted() {
169
- let parent = (customAlert.value && customAlert.value['parentNode']) || null
170
- if (customAlert.value && document.body.contains(parent) && parent) {
171
- document.body.removeChild(parent)
172
- }
173
- },
174
- methods: {
175
- async copyClicked(val) {
176
- let clipboard = new Clipboard(".copycontent-r");
177
- clipboard.on('success', e => {
178
- ElMessage({
179
- message: this.successtext || (this.lang === 'zh-CN' ? '复制成功' : 'Copy success'),
180
- type: 'success',
181
- })
182
- clipboard.destroy()
183
- })
184
- clipboard.on('error', e => {
185
- clipboard.destroy()
186
- })
187
- },
188
- handleNo() {
189
- this.handleCancle && this.handleCancle()
190
- this.modal = false
191
- },
192
- handleYes() {
193
- this.handleOk && this.handleOk()
194
- this.modal = false
195
- }
196
- }
197
- }
198
- </script>
199
- <style lang="scss" scoped>
200
- @use "./modal.scss";
1
+ <template>
2
+ <div v-if="modal" class="warning-modal _copymodal">
3
+ <div class="warning-modal-backdrop" />
4
+ <div class="warning-modal">
5
+ <div class="warning-modal-dialog warning-tips">
6
+ <div class="warning-modal-content">
7
+ <div class="warning-icon" style="padding-top: 15px">
8
+ <el-icon v-if="type == 'alert'"><WarningFilled /></el-icon>
9
+ <el-icon v-if="type == 'check'"><SuccessFilled /></el-icon>
10
+ <el-icon v-if="type == 'help'"><QuestionFilled /></el-icon>
11
+ </div>
12
+ <div v-if="msg" class="waring-cnt maxheight">
13
+ <p style="padding: 15px">
14
+ <span>{{ msg }}</span>
15
+ </p>
16
+ </div>
17
+ <div v-else class="waring-cnt" v-html="msgHtml" />
18
+ <div v-if="showcopy" class="copycontent">
19
+ <span class="copycontent-l">{{ copytype }}</span>
20
+ <el-tooltip :content="copytip || (lang === 'zh-CN' ? '点击复制单号' : 'Copy by clicking the order number')">
21
+ <span class="copycontent-r" @click="copyClicked(copymsg)" :data-clipboard-text="copymsg">{{
22
+ copymsg
23
+ }}</span>
24
+ </el-tooltip>
25
+ </div>
26
+ <div v-if="endMsg" class="waring-cnt">
27
+ <p style="padding: 15px">
28
+ <span>{{ endMsg }}</span>
29
+ </p>
30
+ </div>
31
+ <div v-if="endMsgHtml" class="waring-cnt" v-html="endMsgHtml" />
32
+ <div
33
+ v-if="messageShow"
34
+ class="copycontent"
35
+ style="display: block; padding: 0 5%"
36
+ >
37
+ <span>{{ firstMsg }} {{ copytype }}</span>
38
+ <el-tooltip :content="copytip || (lang === 'zh-CN' ? '点击复制单号' : 'Copy by clicking the order number')">
39
+ <span class="copycontent-r" @click="copyClicked(copymsg)" :data-clipboard-text="copymsg">{{
40
+ copymsg
41
+ }}</span>
42
+ </el-tooltip>
43
+ <span>{{ lastMsg }}</span>
44
+ </div>
45
+ <div v-if="showCancle" class="waring-btn">
46
+ <span
47
+ class="yes"
48
+ style="background-color: #999; border-bottom-right-radius: 0;width: 50%;"
49
+ @click="handleNo"
50
+ >{{ cancleText || (lang === 'zh-CN' ? '取消' : 'Cancel') }}</span>
51
+ <span class="yes" @click="handleYes" style="width: 50%;">{{ okText || (lang === 'zh-CN' ? '确定' : 'Confirm') }}</span>
52
+ </div>
53
+ <div v-else class="waring-btn">
54
+ <span class="yes" @click="handleYes">{{ okText || (lang === 'zh-CN' ? '确定' : 'Confirm') }}</span>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </template>
61
+
62
+ <script setup >
63
+ import { WarningFilled, SuccessFilled, QuestionFilled } from '@element-plus/icons-vue'
64
+ import { ElIcon ,ElMessage } from 'element-plus'
65
+ </script>
66
+
67
+ <script >
68
+ import { ref } from 'vue'
69
+ import Clipboard from 'clipboard'
70
+
71
+ const customAlert = ref(null)
72
+
73
+ export default {
74
+ props: {
75
+ lang: {
76
+ type: String,
77
+ default: 'zh-CN'
78
+ },
79
+ msg: {
80
+ type: String,
81
+ default: ''
82
+ },
83
+ type: {
84
+ type: String,
85
+ default: 'alert'
86
+ },
87
+ firstMsg: {
88
+ type: String,
89
+ default: ''
90
+ },
91
+ lastMsg: {
92
+ type: String,
93
+ default: ''
94
+ },
95
+ endMsg: {
96
+ type: String,
97
+ default: ''
98
+ },
99
+ endMsgHtml: {
100
+ type: String,
101
+ default: ''
102
+ },
103
+ msgHtml: {
104
+ type: String,
105
+ default: ''
106
+ },
107
+ showCancle: {
108
+ type: Boolean,
109
+ default: true
110
+ },
111
+ cancleText: {
112
+ type: String,
113
+ default: '',
114
+ },
115
+ okText: {
116
+ type: String,
117
+ default: '',
118
+ },
119
+ copytip: {
120
+ type: String,
121
+ default: ''
122
+ },
123
+ successtext: {
124
+ type: String,
125
+ default: '',
126
+ },
127
+ handleCancle: {
128
+ type: Function
129
+ },
130
+ handleOk: {
131
+ type: Function
132
+ },
133
+ showcopy: {
134
+ type: Boolean,
135
+ default: false
136
+ },
137
+ messageShow: {
138
+ type: Boolean,
139
+ default: false
140
+ },
141
+ copytype: {
142
+ type: String,
143
+ default: ''
144
+ },
145
+ copymsg: {
146
+ type: String,
147
+ default: ''
148
+ }
149
+ },
150
+ data() {
151
+ return {
152
+ modal: false
153
+ }
154
+ },
155
+ watch: {
156
+ modal(val) {
157
+ if (!val) {
158
+ let parent = (customAlert.value && customAlert.value['parentNode']) || null
159
+ if (customAlert.value && document.body.contains(parent) && parent) {
160
+ document.body.removeChild(parent)
161
+ }
162
+ }
163
+ }
164
+ },
165
+ created() {
166
+ this.modal = true
167
+ },
168
+ unmounted() {
169
+ let parent = (customAlert.value && customAlert.value['parentNode']) || null
170
+ if (customAlert.value && document.body.contains(parent) && parent) {
171
+ document.body.removeChild(parent)
172
+ }
173
+ },
174
+ methods: {
175
+ async copyClicked(val) {
176
+ let clipboard = new Clipboard(".copycontent-r");
177
+ clipboard.on('success', e => {
178
+ ElMessage({
179
+ message: this.successtext || (this.lang === 'zh-CN' ? '复制成功' : 'Copy success'),
180
+ type: 'success',
181
+ })
182
+ clipboard.destroy()
183
+ })
184
+ clipboard.on('error', e => {
185
+ clipboard.destroy()
186
+ })
187
+ },
188
+ handleNo() {
189
+ this.handleCancle && this.handleCancle()
190
+ this.modal = false
191
+ },
192
+ handleYes() {
193
+ this.handleOk && this.handleOk()
194
+ this.modal = false
195
+ }
196
+ }
197
+ }
198
+ </script>
199
+ <style lang="scss" scoped>
200
+ @use "./modal.scss";
201
201
  </style>
@@ -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) {
package/src/index.jsx CHANGED
@@ -413,6 +413,7 @@ export default {
413
413
  calcShowCopyModal: props.showCopyModal, // 是否要开启刚开始保存之后弹框提示编码功能
414
414
  copyModal: props.copyModal,
415
415
  lang: toRef(props, 'lang'),
416
+ messageInstance: props.messageInstance,
416
417
  })
417
418
  bpmInstance?.insertBtn?.(props.bpmBtns, props.bpmBtnPosition)
418
419
  }
@@ -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
+ }