resolver-egretimp-plus 0.1.90 → 0.1.91

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>
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
  }