eoss-mobiles 0.3.95 → 0.3.97

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.
Files changed (249) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/lib/action-sheet.js +4 -4
  3. package/lib/button-group.js +4 -4
  4. package/lib/button.js +4 -4
  5. package/lib/calendar.js +4 -4
  6. package/lib/cascader.js +4 -4
  7. package/lib/cell.js +4 -4
  8. package/lib/checkbox.js +200 -173
  9. package/lib/circle.js +4 -4
  10. package/lib/config/api.js +16 -2
  11. package/lib/count-down.js +4 -4
  12. package/lib/date.js +108 -108
  13. package/lib/empty.js +4 -4
  14. package/lib/eoss-mobile.common.js +651 -83
  15. package/lib/esign.js +4 -4
  16. package/lib/field.js +4 -4
  17. package/lib/flow-btn.js +194 -167
  18. package/lib/flow-list.js +196 -167
  19. package/lib/flow.js +241 -212
  20. package/lib/form.js +93 -6
  21. package/lib/grid-item.js +4 -4
  22. package/lib/grid.js +12 -12
  23. package/lib/image-preview.js +15 -7
  24. package/lib/image.js +4 -4
  25. package/lib/index.js +1 -1
  26. package/lib/list.js +4 -4
  27. package/lib/loading.js +86 -86
  28. package/lib/nav-bar.js +4 -4
  29. package/lib/notice-bar.js +4 -4
  30. package/lib/pagination.js +4 -4
  31. package/lib/picker.js +200 -171
  32. package/lib/popover.js +4 -4
  33. package/lib/popup.js +4 -4
  34. package/lib/pull-refresh.js +4 -4
  35. package/lib/radio.js +199 -170
  36. package/lib/rate.js +4 -4
  37. package/lib/retrial-auth.js +194 -167
  38. package/lib/search.js +4 -4
  39. package/lib/selector.js +240 -211
  40. package/lib/skeleton.js +4 -4
  41. package/lib/stepper.js +4 -4
  42. package/lib/swipe.js +4 -4
  43. package/lib/switch.js +4 -4
  44. package/lib/tab.js +4 -4
  45. package/lib/table-column.js +194 -165
  46. package/lib/table.js +16 -16
  47. package/lib/tabs.js +4 -4
  48. package/lib/tag.js +4 -4
  49. package/lib/theme-chalk/fonts/iconfont.scss +98 -98
  50. package/lib/theme-chalk/fonts/iconfont1.scss +90 -90
  51. package/lib/uploader.js +2472 -13
  52. package/package.json +3 -1
  53. package/packages/action-sheet/index.js +5 -5
  54. package/packages/action-sheet/src/main.vue +32 -32
  55. package/packages/button/index.js +5 -5
  56. package/packages/button/src/main.vue +15 -15
  57. package/packages/button-group/index.js +5 -5
  58. package/packages/button-group/src/main.vue +80 -80
  59. package/packages/calendar/index.js +5 -5
  60. package/packages/calendar/src/main.vue +34 -34
  61. package/packages/cascader/index.js +5 -5
  62. package/packages/cascader/src/main.vue +39 -39
  63. package/packages/cell/index.js +5 -5
  64. package/packages/cell/src/main.vue +77 -77
  65. package/packages/checkbox/index.js +5 -5
  66. package/packages/checkbox/src/main.vue +232 -232
  67. package/packages/circle/index.js +5 -5
  68. package/packages/circle/src/main.vue +27 -27
  69. package/packages/count-down/index.js +5 -5
  70. package/packages/count-down/src/main.vue +27 -27
  71. package/packages/date/index.js +5 -5
  72. package/packages/date/src/date-time.vue +290 -290
  73. package/packages/date/src/main.vue +401 -401
  74. package/packages/empty/index.js +5 -5
  75. package/packages/empty/src/main.vue +16 -16
  76. package/packages/esign/index.js +5 -5
  77. package/packages/esign/src/main.vue +144 -144
  78. package/packages/field/index.js +5 -5
  79. package/packages/field/src/main.vue +235 -235
  80. package/packages/flow/index.js +5 -5
  81. package/packages/flow/src/components/Circulate.vue +595 -595
  82. package/packages/flow/src/components/Handle.vue +2404 -2404
  83. package/packages/flow/src/components/Message.vue +208 -208
  84. package/packages/flow/src/components/ProcessSettings.vue +342 -342
  85. package/packages/flow/src/components/supervise.vue +139 -139
  86. package/packages/flow/src/flowMix.js +288 -288
  87. package/packages/flow/src/main.vue +116 -116
  88. package/packages/flow-btn/index.js +5 -5
  89. package/packages/flow-btn/src/main.vue +494 -494
  90. package/packages/flow-list/index.js +5 -5
  91. package/packages/flow-list/src/main.vue +248 -248
  92. package/packages/form/index.js +5 -5
  93. package/packages/form/src/main.vue +548 -523
  94. package/packages/grid/index.js +5 -5
  95. package/packages/grid/src/main.vue +486 -486
  96. package/packages/grid-item/index.js +5 -5
  97. package/packages/grid-item/src/main.vue +16 -16
  98. package/packages/image/index.js +5 -5
  99. package/packages/image/src/main.vue +12 -12
  100. package/packages/image-preview/index.js +5 -5
  101. package/packages/image-preview/src/main.vue +41 -34
  102. package/packages/list/index.js +5 -5
  103. package/packages/list/src/main.vue +32 -32
  104. package/packages/loading/index.js +5 -5
  105. package/packages/loading/src/main.vue +19 -19
  106. package/packages/nav-bar/index.js +5 -5
  107. package/packages/nav-bar/src/main.vue +24 -24
  108. package/packages/notice-bar/index.js +5 -5
  109. package/packages/notice-bar/src/main.vue +15 -15
  110. package/packages/pagination/index.js +5 -5
  111. package/packages/pagination/src/main.vue +73 -73
  112. package/packages/picker/index.js +5 -5
  113. package/packages/picker/src/main.vue +604 -604
  114. package/packages/popover/index.js +5 -5
  115. package/packages/popover/src/main.vue +32 -32
  116. package/packages/popup/index.js +5 -5
  117. package/packages/popup/src/main.vue +27 -27
  118. package/packages/pull-refresh/index.js +5 -5
  119. package/packages/pull-refresh/src/main.vue +31 -31
  120. package/packages/radio/index.js +5 -5
  121. package/packages/radio/src/main.vue +179 -179
  122. package/packages/rate/index.js +5 -5
  123. package/packages/rate/src/main.vue +26 -26
  124. package/packages/retrial-auth/index.js +5 -5
  125. package/packages/retrial-auth/src/main.vue +257 -257
  126. package/packages/search/index.js +5 -5
  127. package/packages/search/src/main.vue +39 -39
  128. package/packages/selector/index.js +5 -5
  129. package/packages/selector/src/main.vue +186 -186
  130. package/packages/selector/src/selector-tree.vue +1117 -1117
  131. package/packages/selector/src/tree.vue +405 -405
  132. package/packages/skeleton/index.js +5 -5
  133. package/packages/skeleton/src/main.vue +17 -17
  134. package/packages/stepper/index.js +5 -5
  135. package/packages/stepper/src/main.vue +25 -25
  136. package/packages/swipe/index.js +5 -5
  137. package/packages/swipe/src/main.vue +42 -42
  138. package/packages/switch/index.js +5 -5
  139. package/packages/switch/src/main.vue +38 -38
  140. package/packages/tab/index.js +5 -5
  141. package/packages/tab/src/main.vue +16 -16
  142. package/packages/table/index.js +5 -5
  143. package/packages/table/src/main.vue +1006 -1006
  144. package/packages/table-column/index.js +5 -5
  145. package/packages/table-column/src/main.vue +931 -931
  146. package/packages/table-column/src/mixins/table.js +12 -12
  147. package/packages/tabs/index.js +5 -5
  148. package/packages/tabs/src/main.vue +34 -34
  149. package/packages/tag/index.js +5 -5
  150. package/packages/tag/src/main.vue +16 -16
  151. package/packages/theme-chalk/lib/action-sheet.css +0 -0
  152. package/packages/theme-chalk/lib/base.css +1 -0
  153. package/packages/theme-chalk/lib/button-group.css +1 -0
  154. package/packages/theme-chalk/lib/button.css +1 -0
  155. package/packages/theme-chalk/lib/calendar.css +1 -0
  156. package/packages/theme-chalk/lib/cascader.css +1 -0
  157. package/packages/theme-chalk/lib/cell.css +1 -0
  158. package/packages/theme-chalk/lib/checkbox.css +1 -0
  159. package/packages/theme-chalk/lib/circle.css +1 -0
  160. package/packages/theme-chalk/lib/count-down.css +0 -0
  161. package/packages/theme-chalk/lib/date.css +0 -0
  162. package/packages/theme-chalk/lib/empty.css +0 -0
  163. package/packages/theme-chalk/lib/esign.css +1 -0
  164. package/packages/theme-chalk/lib/field.css +1 -0
  165. package/packages/theme-chalk/lib/flow-btn.css +1 -0
  166. package/packages/theme-chalk/lib/flow-list-task-read.css +1 -0
  167. package/packages/theme-chalk/lib/flow-list.css +1 -0
  168. package/packages/theme-chalk/lib/flow.css +1 -0
  169. package/packages/theme-chalk/lib/fonts/iconfont.scss +98 -0
  170. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  171. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  172. package/packages/theme-chalk/lib/fonts/iconfont1.scss +90 -0
  173. package/packages/theme-chalk/lib/form.css +1 -0
  174. package/packages/theme-chalk/lib/grid-item.css +1 -0
  175. package/packages/theme-chalk/lib/grid.css +1 -0
  176. package/packages/theme-chalk/lib/icon.css +1 -0
  177. package/packages/theme-chalk/lib/image-preview.css +0 -0
  178. package/packages/theme-chalk/lib/image.css +0 -0
  179. package/packages/theme-chalk/lib/index.css +1 -0
  180. package/packages/theme-chalk/lib/list.css +0 -0
  181. package/packages/theme-chalk/lib/loading.css +0 -0
  182. package/packages/theme-chalk/lib/nav-bar.css +0 -0
  183. package/packages/theme-chalk/lib/navbar.css +1 -0
  184. package/packages/theme-chalk/lib/notice-bar.css +0 -0
  185. package/packages/theme-chalk/lib/pagination.css +1 -0
  186. package/packages/theme-chalk/lib/picker.css +1 -0
  187. package/packages/theme-chalk/lib/popover.css +0 -0
  188. package/packages/theme-chalk/lib/popup.css +0 -0
  189. package/packages/theme-chalk/lib/pull-refresh.css +0 -0
  190. package/packages/theme-chalk/lib/radio.css +1 -0
  191. package/packages/theme-chalk/lib/rate.css +0 -0
  192. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  193. package/packages/theme-chalk/lib/search.css +0 -0
  194. package/packages/theme-chalk/lib/selector.css +1 -0
  195. package/packages/theme-chalk/lib/skeleton.css +0 -0
  196. package/packages/theme-chalk/lib/stepper.css +1 -0
  197. package/packages/theme-chalk/lib/swipe.css +0 -0
  198. package/packages/theme-chalk/lib/switch.css +1 -0
  199. package/packages/theme-chalk/lib/tab.css +0 -0
  200. package/packages/theme-chalk/lib/table-column.css +0 -0
  201. package/packages/theme-chalk/lib/table.css +1 -0
  202. package/packages/theme-chalk/lib/tabs.css +1 -0
  203. package/packages/theme-chalk/lib/tag.css +1 -0
  204. package/packages/theme-chalk/lib/theme.css +0 -0
  205. package/packages/theme-chalk/lib/tree.css +1 -0
  206. package/packages/theme-chalk/lib/uploader.css +0 -0
  207. package/packages/theme-chalk/src/base.scss +195 -195
  208. package/packages/theme-chalk/src/button-group.scss +25 -25
  209. package/packages/theme-chalk/src/button.scss +2 -2
  210. package/packages/theme-chalk/src/calendar.scss +11 -11
  211. package/packages/theme-chalk/src/cascader.scss +11 -11
  212. package/packages/theme-chalk/src/cell.scss +14 -14
  213. package/packages/theme-chalk/src/checkbox.scss +9 -9
  214. package/packages/theme-chalk/src/circle.scss +6 -6
  215. package/packages/theme-chalk/src/common/var.scss +1525 -1525
  216. package/packages/theme-chalk/src/esign.scss +51 -51
  217. package/packages/theme-chalk/src/field.scss +98 -98
  218. package/packages/theme-chalk/src/flow-btn.scss +99 -99
  219. package/packages/theme-chalk/src/flow-list.scss +122 -122
  220. package/packages/theme-chalk/src/fonts/iconfont.scss +98 -98
  221. package/packages/theme-chalk/src/fonts/iconfont1.scss +90 -90
  222. package/packages/theme-chalk/src/form.scss +33 -33
  223. package/packages/theme-chalk/src/grid-item.scss +16 -16
  224. package/packages/theme-chalk/src/grid.scss +46 -46
  225. package/packages/theme-chalk/src/icon.scss +1661 -1661
  226. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  227. package/packages/theme-chalk/src/navbar.scss +5 -5
  228. package/packages/theme-chalk/src/pagination.scss +12 -12
  229. package/packages/theme-chalk/src/picker.scss +31 -31
  230. package/packages/theme-chalk/src/radio.scss +6 -6
  231. package/packages/theme-chalk/src/retrial-auth.scss +28 -28
  232. package/packages/theme-chalk/src/selector.scss +247 -247
  233. package/packages/theme-chalk/src/stepper.scss +9 -9
  234. package/packages/theme-chalk/src/switch.scss +5 -5
  235. package/packages/theme-chalk/src/table.scss +86 -86
  236. package/packages/theme-chalk/src/tabs.scss +31 -31
  237. package/packages/theme-chalk/src/tag.scss +12 -12
  238. package/packages/theme-chalk/src/theme.scss +1 -1
  239. package/packages/theme-chalk/src/tree.scss +127 -127
  240. package/packages/uploader/index.js +5 -5
  241. package/packages/uploader/src/main.vue +586 -31
  242. package/src/config/api.js +18 -0
  243. package/src/index.js +1 -1
  244. package/src/utils/axios.js +217 -217
  245. package/src/utils/date-util.js +312 -312
  246. package/src/utils/http.js +106 -106
  247. package/src/utils/rules.js +18 -18
  248. package/src/utils/store.js +21 -21
  249. package/packages/theme-chalk/gulpfile.js +0 -25
@@ -1,604 +1,604 @@
1
- <template>
2
- <div class="em-picker">
3
- <em-input
4
- v-if="!isCheck"
5
- readonly
6
- clickable
7
- v-bind="$attrs"
8
- :label="label"
9
- :value="pickerValue"
10
- :required="required"
11
- :label-width="labelWidth"
12
- :hideLabel="hideLabel"
13
- :placeholder="
14
- pickerValue
15
- ? pickerValue
16
- : (disabled || readonly) && placeholder == undefined
17
- ? '暂无数据'
18
- : placeholder != undefined
19
- ? placeholder
20
- : `请选择${label}`
21
- "
22
- @click="handlePicker"
23
- :disabled="disabled || readonly"
24
- :right-icon="disabled || readonly ? '' : 'arrow'"
25
- >
26
- <template v-for="(index, name) in $slots" :slot="name">
27
- <slot :name="name" /> </template
28
- ></em-input>
29
- <em-input
30
- v-else
31
- readonly
32
- clickable
33
- v-bind="$attrs"
34
- :label="label"
35
- :required="required"
36
- :disabled="disabled || readonly"
37
- :label-width="labelWidth"
38
- :hideLabel="hideLabel"
39
- @click="handlePicker"
40
- :right-icon="disabled || readonly ? '' : 'arrow'"
41
- >
42
- <template slot="input">
43
- <div style="width: 100%">
44
- <slot name="textTop"></slot>
45
- <div v-if="pickerValue.length > 0">
46
- <em-tag
47
- v-for="(r, i) in pickerValue"
48
- :closeable="!disabled && !readonly"
49
- type="primary"
50
- :key="i"
51
- @click.stop="handleClick(r)"
52
- @close="deleteList(i, r)"
53
- >{{ r[labelKey] || r.name }}</em-tag
54
- >
55
- </div>
56
- <div v-else style="color: #c8c9cc">
57
- {{
58
- (disabled || readonly) && placeholder == undefined
59
- ? ' 暂无数据'
60
- : placeholder == undefined
61
- ? '请选择' + label
62
- : placeholder
63
- }}
64
- </div>
65
- </div>
66
- </template>
67
- </em-input>
68
- <van-popup v-model="showPicker" @close="onConfirm" round position="bottom">
69
- <van-picker
70
- v-if="!isCheck"
71
- show-toolbar
72
- :loading="newLoading"
73
- :columns="newColumns"
74
- v-bind="$attrs"
75
- v-on="$listeners"
76
- :valueKey="labelKey"
77
- :defaultIndex="newDefaultIndex"
78
- @cancel="showPicker = false"
79
- @confirm="onConfirm($event, true)"
80
- >
81
- <template slot="columns-top" v-if="isSearch">
82
- <!-- @search="handleSearch" -->
83
- <em-search
84
- v-model="keyWord"
85
- @input="handleSearch"
86
- placeholder="请输入搜索关键词"
87
- />
88
- </template>
89
- <template v-for="(index, name) in $slots" :slot="name">
90
- <slot :name="name" />
91
- </template>
92
- </van-picker>
93
- <van-picker
94
- v-else
95
- show-toolbar
96
- class="check-picker"
97
- :loading="newLoading"
98
- :columns="newColumns"
99
- v-bind="$attrs"
100
- v-on="$listeners"
101
- :valueKey="labelKey"
102
- :defaultIndex="newDefaultIndex"
103
- @cancel="onConfirm"
104
- @confirm="onConfirm($event, true)"
105
- >
106
- <!-- @search="handleSearch" -->
107
- <template slot="columns-top" v-if="isSearch">
108
- <em-search
109
- v-model="keyWord"
110
- @input="handleSearch"
111
- placeholder="请输入搜索关键词"
112
- />
113
- </template>
114
- <template slot="columns-bottom">
115
- <div class="em-picker__columns">
116
- <em-list
117
- v-model="listLoading"
118
- :finished="listFinished"
119
- :finished-text="sysAppCode || url ? '没有更多了' : ''"
120
- @load="onLoad"
121
- :offset="50"
122
- >
123
- <van-checkbox-group v-model="checkList">
124
- <em-cell
125
- v-for="(item, index) in newColumns"
126
- clickable
127
- :key="item[valueKey]"
128
- :isGroup="false"
129
- :title="item[labelKey]"
130
- @click="toggle(index)"
131
- >
132
- <template #right-icon>
133
- <van-checkbox :name="item[valueKey]" ref="checkboxes" />
134
- </template>
135
- </em-cell>
136
- </van-checkbox-group>
137
- </em-list>
138
- </div>
139
- </template>
140
- </van-picker>
141
- </van-popup>
142
- </div>
143
- </template>
144
-
145
- <script>
146
- import { findSysCode } from '../../../src/config/api';
147
- import request from '../../../src/utils/http.js';
148
- export default {
149
- name: 'EmPicker',
150
- inheritAttrs: false,
151
- data() {
152
- return {
153
- showPicker: false,
154
- newLoading: false,
155
- keyWord: '',
156
- newLabelKey: '',
157
- newValueKey: '',
158
- listLoading: false,
159
- listFinished: false,
160
- newColumns: [],
161
- checkList: [],
162
- timer:null,
163
- newDefaultIndex: 0,
164
- pageIndex: 1,
165
- total: -1
166
- };
167
- },
168
- props: {
169
- // 绑定值
170
- value: {
171
- type: [String, Array, Object],
172
- default: ''
173
- },
174
- isSearch: {
175
- type: Boolean,
176
- default: false
177
- },
178
- hideLabel: {
179
- type: Boolean,
180
- default: false
181
- },
182
- isCheck: {
183
- type: Boolean,
184
- default: false
185
- },
186
- required: {
187
- type: Boolean,
188
- default: false
189
- },
190
- disabled: {
191
- type: Boolean,
192
- default: false
193
- },
194
- readonly: {
195
- type: Boolean,
196
- default: false
197
- },
198
- linkTag: {
199
- type: Boolean,
200
- default: false
201
- },
202
- // 展示标题
203
- label: {
204
- type: String,
205
- default: '城市'
206
- },
207
- // 输入框占位提示文字
208
- placeholder: {
209
- type: String,
210
- default: undefined
211
- },
212
- // 多级选择展示拼接字符
213
- joinStr: {
214
- type: String,
215
- default: '/'
216
- },
217
- beforResponse: {
218
- type: [Function, String],
219
- default: ''
220
- },
221
- valueKey: {
222
- type: String,
223
- default: 'value'
224
- },
225
- searchKey: {
226
- type: String,
227
- default: 'keyWord'
228
- },
229
- labelKey: {
230
- type: String,
231
- default: 'name'
232
- },
233
- objectType: {
234
- type: Boolean,
235
- default: true
236
- },
237
- sysAppCode: {
238
- type: String,
239
- default: ''
240
- },
241
- resultsName: {
242
- type: String,
243
- default: ''
244
- },
245
- method: {
246
- type: String,
247
- default: 'get'
248
- },
249
- url: {
250
- type: String
251
- },
252
- param: {
253
- type: Object,
254
- default: () => {}
255
- },
256
- columns: {
257
- type: Array,
258
- default: () => []
259
- },
260
- loading: {
261
- type: Boolean,
262
- default: false
263
- },
264
- defaultIndex: {
265
- type: [Number, String]
266
- },
267
- labelWidth: {
268
- type: [Number, String],
269
- default: '4em'
270
- },
271
- isTable: {
272
- type: Boolean,
273
- default: false
274
- },
275
- baseUrl: String
276
- },
277
- computed: {
278
- pickerValue: {
279
- get() {
280
- return this.getValue();
281
- },
282
- set(val) {
283
- if (!this.objectType && val.length === undefined) {
284
- this.$emit(
285
- 'input',
286
- val[this.sysAppCode ? 'cciValue' : this.valueKey]
287
- );
288
- } else if (!this.objectType && val.length != undefined) {
289
- val.map((x) => {
290
- if (typeof x === 'object') {
291
- x = x[this.sysAppCode ? 'cciValue' : this.valueKey];
292
- }
293
- });
294
- this.$emit('input', val);
295
- } else {
296
- this.$emit('input', val);
297
- }
298
- }
299
- }
300
- },
301
- watch: {
302
- events: {
303
- type: Object,
304
- default: () => {}
305
- },
306
- labelKey: {
307
- handler(val) {
308
- this.newLabelKey = val;
309
- },
310
- deep: true,
311
- immediate: true
312
- },
313
- valueKey: {
314
- handler(val) {
315
- this.newValueKey = val;
316
- },
317
- deep: true,
318
- immediate: true
319
- },
320
- columns: {
321
- handler(val) {
322
- if (this.sysAppCode) return;
323
- this.newColumns = val;
324
- },
325
- deep: true,
326
- immediate: true
327
- },
328
- defaultIndex: {
329
- handler(val) {
330
- this.newDefaultIndex = val;
331
- },
332
- deep: true,
333
- immediate: true
334
- },
335
- loading: {
336
- handler(val) {
337
- this.newLoading = val;
338
- },
339
- deep: true,
340
- immediate: true
341
- }
342
- },
343
- mounted() {
344
- if (
345
- (this.sysAppCode || this.url) &&
346
- this.newColumns.length == 0 &&
347
- !this.isCheck
348
- ) {
349
- this.getSysCode();
350
- }
351
- if (this.defaultIndex != undefined) {
352
- let data = this.columns[this.defaultIndex];
353
- if (typeof data === 'string' && data) {
354
- this.pickerValue = data;
355
- } else if (typeof data === 'object') {
356
- this.pickerValue = data[this.newValueKey];
357
- }
358
- } else if (this.isCheck) {
359
- let data = this.value;
360
- data.map((item) => {
361
- this.checkList.push(item[this.valueKey] || item.value || item);
362
- });
363
- }
364
- },
365
- methods: {
366
- handleSearch() {
367
-
368
- if (this.timer != null) {
369
- clearTimeout(this.timer);
370
- }
371
- this.timer = setTimeout( () => {
372
-
373
- this.$emit('search', this.keyWord);
374
-
375
- if (this.columns.length > 0) {
376
- this.newColumns = this.columns.filter(
377
- (x) => x[this.labelKey].indexOf(this.keyWord) != -1
378
- );
379
- if (!this.keyWord) {
380
- this.newColumns = this.columns;
381
- }
382
- }
383
-
384
- if ((this.columns && this.columns.length == 0) || !this.columns)
385
- this.getSysCode();
386
- }, 700);
387
- },
388
- handleClick(val) {
389
- if (this.linkTag) {
390
- this.$emit('tagClick', val);
391
- } else {
392
- if (this.disabled || this.readonly) return;
393
- this.showPicker = true;
394
- }
395
- },
396
- onLoad() {
397
- if (
398
- (this.sysAppCode || this.url) &&
399
- this.newColumns.length != this.total &&
400
- this.isCheck
401
- ) {
402
- this.getSysCode();
403
- } else {
404
- this.listFinished = true;
405
- }
406
- },
407
- /**
408
- * deleteList
409
- * @desc:删除选中的数据
410
- * @date 2023年4月20日
411
- * @author liufan
412
- * @param {String} val 当前数据的下标
413
- */
414
- deleteList(val, res) {
415
- if (this.disabled || this.readonly) return;
416
- this.pickerValue.splice(val, 1);
417
- this.checkList = this.checkList.filter((x) => x != res.value);
418
- this.$emit('input', this.pickerValue);
419
-
420
- this.$emit('tagDelete', this.pickerValue);
421
- },
422
- toggle(index) {
423
- this.$refs.checkboxes[index].toggle();
424
- },
425
- onConfirm(value, isConfirm) {
426
- if (isConfirm) {
427
- if (this.isCheck) {
428
- let data = [];
429
- this.newColumns.filter((x) => {
430
- this.checkList.find((y) => {
431
- if (x.value === y) {
432
- data.push(x);
433
- }
434
- });
435
- });
436
- this.pickerValue = data;
437
- } else {
438
- this.pickerValue = value;
439
- }
440
- } else {
441
- if (this.isCheck) {
442
- this.checkList = [];
443
- this.pickerValue.map((x) => {
444
- this.checkList.push(x.value);
445
- });
446
- }
447
- }
448
-
449
- this.showPicker = false;
450
- },
451
- getValue() {
452
- let value = '';
453
- if (this.isCheck) {
454
- let val = [];
455
- if (this.newColumns && this.newColumns.length > 0) {
456
- this.newColumns.filter((x) => {
457
- this.value.find((y) => {
458
- if (x[this.valueKey] == y || x[this.valueKey] == y.value) {
459
- val.push(x);
460
- }
461
- });
462
- });
463
- } else {
464
- val = this.value;
465
- }
466
- value = val;
467
- } else {
468
- if (Array.isArray(this.value) || this.value instanceof Object) {
469
- if (!Array.isArray(this.value)) {
470
- value = this.value[this.labelKey] || this.value[this.newValueKey];
471
- let index = 0;
472
- value && (value = value.replace(/<[^>]+>/g, ''));
473
- this.newColumns.map((x, i) => {
474
- if (typeof x === 'string' && value.indexOf(x) != -1) {
475
- index = i;
476
- } else if (
477
- x[this.newValueKey] == value ||
478
- x[this.newValueKey].indexOf(value) != -1
479
- ) {
480
- index = i;
481
- }
482
- });
483
- this.newDefaultIndex = index;
484
- } else {
485
- let list = [];
486
- this.value.map((item) => {
487
- if (item[this.labelKey] || item[this.newValueKey]) {
488
- list.push(item[this.labelKey] || item[this.newValueKey]);
489
- } else if (typeof item === 'string') {
490
- list.push(item);
491
- }
492
- });
493
- value = list.join(this.joinStr);
494
- let index = 0;
495
- this.newColumns.map((x, i) => {
496
- if (typeof x === 'string' && value.indexOf(x) != -1) {
497
- index = i;
498
- } else if (x[this.newValueKey] === value) {
499
- index = i;
500
- }
501
- });
502
- this.newDefaultIndex = index;
503
- }
504
- } else {
505
- let index = 0;
506
- value = this.value;
507
- this.newColumns.map((x, i) => {
508
- if (typeof x === 'string' && value.indexOf(x) != -1) {
509
- index = i;
510
- value = x;
511
- } else if (x[this.newValueKey] === value) {
512
- index = i;
513
- value = x[this.labelKey] || x[this.newValueKey];
514
- }
515
- });
516
- this.newDefaultIndex = index;
517
- }
518
- value && (value = value.replace(/<[^>]+>/g, ''));
519
- }
520
- return value;
521
- },
522
- getSysCode() {
523
- let { url, method, sysAppCode, param, keyWord } = this;
524
- let params = {
525
- url: this.baseUrl
526
- ? this.baseUrl + (url || findSysCode)
527
- : url || findSysCode,
528
- type: method,
529
- params: {
530
- ccCode: sysAppCode,
531
- pageIndex: this.pageIndex,
532
- ...param
533
- }
534
- };
535
- if (this.isSearch) {
536
- params.params[this.searchKey] = keyWord;
537
- }
538
- this.newLoading = true;
539
- request(params)
540
- .then((res) => {
541
- const { status, data, message, rCode, results } = res;
542
- this.listLoading = false;
543
- if (status == 'success' || rCode === 0 || status === true) {
544
- let info = this.resultsName
545
- ? data
546
- ? data[this.resultsName]
547
- : results[this.resultsName]
548
- : data
549
- ? data
550
- : results;
551
- info.map((x) => {
552
- if (this.isCheck) {
553
- x.name =
554
- x[sysAppCode ? 'shortName' : this.labelKey] &&
555
- x[sysAppCode ? 'shortName' : this.labelKey].replace(
556
- /<[^>]+>/g,
557
- ''
558
- );
559
- } else {
560
- x.name = x[sysAppCode ? 'shortName' : this.labelKey];
561
- }
562
- x.value = x[sysAppCode ? 'cciValue' : this.valueKey];
563
- });
564
- if (data && data.totalCount) {
565
- this.total = data.totalCount;
566
- if (data.totalCount === this.newColumns.length) {
567
- this.listFinished = true;
568
- } else {
569
- if (this.newColumns.length != 0) {
570
- this.newColumns.push.apply(this.newColumns, info);
571
- } else {
572
- this.newColumns = info;
573
- }
574
- this.pageIndex = res.data.nextPageNo;
575
- }
576
- } else {
577
- this.listFinished = true;
578
- this.newColumns = info;
579
- }
580
- if (this.beforResponse) {
581
- this.newColumns = this.beforResponse(this.newColumns);
582
- this.getValue();
583
- } else {
584
- this.getValue();
585
- }
586
- } else {
587
- this.$toast(message);
588
- }
589
- this.newLoading = false;
590
- })
591
- .catch((err) => {
592
- this.$toast(err.message);
593
- });
594
- },
595
- handlePicker() {
596
- if (this.disabled || this.readonly) return;
597
- this.showPicker = true;
598
- this.$emit('showPicker');
599
- }
600
- }
601
- };
602
- </script>
603
-
604
- <style></style>
1
+ <template>
2
+ <div class="em-picker">
3
+ <em-input
4
+ v-if="!isCheck"
5
+ readonly
6
+ clickable
7
+ v-bind="$attrs"
8
+ :label="label"
9
+ :value="pickerValue"
10
+ :required="required"
11
+ :label-width="labelWidth"
12
+ :hideLabel="hideLabel"
13
+ :placeholder="
14
+ pickerValue
15
+ ? pickerValue
16
+ : (disabled || readonly) && placeholder == undefined
17
+ ? '暂无数据'
18
+ : placeholder != undefined
19
+ ? placeholder
20
+ : `请选择${label}`
21
+ "
22
+ @click="handlePicker"
23
+ :disabled="disabled || readonly"
24
+ :right-icon="disabled || readonly ? '' : 'arrow'"
25
+ >
26
+ <template v-for="(index, name) in $slots" :slot="name">
27
+ <slot :name="name" /> </template
28
+ ></em-input>
29
+ <em-input
30
+ v-else
31
+ readonly
32
+ clickable
33
+ v-bind="$attrs"
34
+ :label="label"
35
+ :required="required"
36
+ :disabled="disabled || readonly"
37
+ :label-width="labelWidth"
38
+ :hideLabel="hideLabel"
39
+ @click="handlePicker"
40
+ :right-icon="disabled || readonly ? '' : 'arrow'"
41
+ >
42
+ <template slot="input">
43
+ <div style="width: 100%">
44
+ <slot name="textTop"></slot>
45
+ <div v-if="pickerValue.length > 0">
46
+ <em-tag
47
+ v-for="(r, i) in pickerValue"
48
+ :closeable="!disabled && !readonly"
49
+ type="primary"
50
+ :key="i"
51
+ @click.stop="handleClick(r)"
52
+ @close="deleteList(i, r)"
53
+ >{{ r[labelKey] || r.name }}</em-tag
54
+ >
55
+ </div>
56
+ <div v-else style="color: #c8c9cc">
57
+ {{
58
+ (disabled || readonly) && placeholder == undefined
59
+ ? ' 暂无数据'
60
+ : placeholder == undefined
61
+ ? '请选择' + label
62
+ : placeholder
63
+ }}
64
+ </div>
65
+ </div>
66
+ </template>
67
+ </em-input>
68
+ <van-popup v-model="showPicker" @close="onConfirm" round position="bottom">
69
+ <van-picker
70
+ v-if="!isCheck"
71
+ show-toolbar
72
+ :loading="newLoading"
73
+ :columns="newColumns"
74
+ v-bind="$attrs"
75
+ v-on="$listeners"
76
+ :valueKey="labelKey"
77
+ :defaultIndex="newDefaultIndex"
78
+ @cancel="showPicker = false"
79
+ @confirm="onConfirm($event, true)"
80
+ >
81
+ <template slot="columns-top" v-if="isSearch">
82
+ <!-- @search="handleSearch" -->
83
+ <em-search
84
+ v-model="keyWord"
85
+ @input="handleSearch"
86
+ placeholder="请输入搜索关键词"
87
+ />
88
+ </template>
89
+ <template v-for="(index, name) in $slots" :slot="name">
90
+ <slot :name="name" />
91
+ </template>
92
+ </van-picker>
93
+ <van-picker
94
+ v-else
95
+ show-toolbar
96
+ class="check-picker"
97
+ :loading="newLoading"
98
+ :columns="newColumns"
99
+ v-bind="$attrs"
100
+ v-on="$listeners"
101
+ :valueKey="labelKey"
102
+ :defaultIndex="newDefaultIndex"
103
+ @cancel="onConfirm"
104
+ @confirm="onConfirm($event, true)"
105
+ >
106
+ <!-- @search="handleSearch" -->
107
+ <template slot="columns-top" v-if="isSearch">
108
+ <em-search
109
+ v-model="keyWord"
110
+ @input="handleSearch"
111
+ placeholder="请输入搜索关键词"
112
+ />
113
+ </template>
114
+ <template slot="columns-bottom">
115
+ <div class="em-picker__columns">
116
+ <em-list
117
+ v-model="listLoading"
118
+ :finished="listFinished"
119
+ :finished-text="sysAppCode || url ? '没有更多了' : ''"
120
+ @load="onLoad"
121
+ :offset="50"
122
+ >
123
+ <van-checkbox-group v-model="checkList">
124
+ <em-cell
125
+ v-for="(item, index) in newColumns"
126
+ clickable
127
+ :key="item[valueKey]"
128
+ :isGroup="false"
129
+ :title="item[labelKey]"
130
+ @click="toggle(index)"
131
+ >
132
+ <template #right-icon>
133
+ <van-checkbox :name="item[valueKey]" ref="checkboxes" />
134
+ </template>
135
+ </em-cell>
136
+ </van-checkbox-group>
137
+ </em-list>
138
+ </div>
139
+ </template>
140
+ </van-picker>
141
+ </van-popup>
142
+ </div>
143
+ </template>
144
+
145
+ <script>
146
+ import { findSysCode } from '../../../src/config/api';
147
+ import request from '../../../src/utils/http.js';
148
+ export default {
149
+ name: 'EmPicker',
150
+ inheritAttrs: false,
151
+ data() {
152
+ return {
153
+ showPicker: false,
154
+ newLoading: false,
155
+ keyWord: '',
156
+ newLabelKey: '',
157
+ newValueKey: '',
158
+ listLoading: false,
159
+ listFinished: false,
160
+ newColumns: [],
161
+ checkList: [],
162
+ timer:null,
163
+ newDefaultIndex: 0,
164
+ pageIndex: 1,
165
+ total: -1
166
+ };
167
+ },
168
+ props: {
169
+ // 绑定值
170
+ value: {
171
+ type: [String, Array, Object],
172
+ default: ''
173
+ },
174
+ isSearch: {
175
+ type: Boolean,
176
+ default: false
177
+ },
178
+ hideLabel: {
179
+ type: Boolean,
180
+ default: false
181
+ },
182
+ isCheck: {
183
+ type: Boolean,
184
+ default: false
185
+ },
186
+ required: {
187
+ type: Boolean,
188
+ default: false
189
+ },
190
+ disabled: {
191
+ type: Boolean,
192
+ default: false
193
+ },
194
+ readonly: {
195
+ type: Boolean,
196
+ default: false
197
+ },
198
+ linkTag: {
199
+ type: Boolean,
200
+ default: false
201
+ },
202
+ // 展示标题
203
+ label: {
204
+ type: String,
205
+ default: '城市'
206
+ },
207
+ // 输入框占位提示文字
208
+ placeholder: {
209
+ type: String,
210
+ default: undefined
211
+ },
212
+ // 多级选择展示拼接字符
213
+ joinStr: {
214
+ type: String,
215
+ default: '/'
216
+ },
217
+ beforResponse: {
218
+ type: [Function, String],
219
+ default: ''
220
+ },
221
+ valueKey: {
222
+ type: String,
223
+ default: 'value'
224
+ },
225
+ searchKey: {
226
+ type: String,
227
+ default: 'keyWord'
228
+ },
229
+ labelKey: {
230
+ type: String,
231
+ default: 'name'
232
+ },
233
+ objectType: {
234
+ type: Boolean,
235
+ default: true
236
+ },
237
+ sysAppCode: {
238
+ type: String,
239
+ default: ''
240
+ },
241
+ resultsName: {
242
+ type: String,
243
+ default: ''
244
+ },
245
+ method: {
246
+ type: String,
247
+ default: 'get'
248
+ },
249
+ url: {
250
+ type: String
251
+ },
252
+ param: {
253
+ type: Object,
254
+ default: () => {}
255
+ },
256
+ columns: {
257
+ type: Array,
258
+ default: () => []
259
+ },
260
+ loading: {
261
+ type: Boolean,
262
+ default: false
263
+ },
264
+ defaultIndex: {
265
+ type: [Number, String]
266
+ },
267
+ labelWidth: {
268
+ type: [Number, String],
269
+ default: '4em'
270
+ },
271
+ isTable: {
272
+ type: Boolean,
273
+ default: false
274
+ },
275
+ baseUrl: String
276
+ },
277
+ computed: {
278
+ pickerValue: {
279
+ get() {
280
+ return this.getValue();
281
+ },
282
+ set(val) {
283
+ if (!this.objectType && val.length === undefined) {
284
+ this.$emit(
285
+ 'input',
286
+ val[this.sysAppCode ? 'cciValue' : this.valueKey]
287
+ );
288
+ } else if (!this.objectType && val.length != undefined) {
289
+ val.map((x) => {
290
+ if (typeof x === 'object') {
291
+ x = x[this.sysAppCode ? 'cciValue' : this.valueKey];
292
+ }
293
+ });
294
+ this.$emit('input', val);
295
+ } else {
296
+ this.$emit('input', val);
297
+ }
298
+ }
299
+ }
300
+ },
301
+ watch: {
302
+ events: {
303
+ type: Object,
304
+ default: () => {}
305
+ },
306
+ labelKey: {
307
+ handler(val) {
308
+ this.newLabelKey = val;
309
+ },
310
+ deep: true,
311
+ immediate: true
312
+ },
313
+ valueKey: {
314
+ handler(val) {
315
+ this.newValueKey = val;
316
+ },
317
+ deep: true,
318
+ immediate: true
319
+ },
320
+ columns: {
321
+ handler(val) {
322
+ if (this.sysAppCode) return;
323
+ this.newColumns = val;
324
+ },
325
+ deep: true,
326
+ immediate: true
327
+ },
328
+ defaultIndex: {
329
+ handler(val) {
330
+ this.newDefaultIndex = val;
331
+ },
332
+ deep: true,
333
+ immediate: true
334
+ },
335
+ loading: {
336
+ handler(val) {
337
+ this.newLoading = val;
338
+ },
339
+ deep: true,
340
+ immediate: true
341
+ }
342
+ },
343
+ mounted() {
344
+ if (
345
+ (this.sysAppCode || this.url) &&
346
+ this.newColumns.length == 0 &&
347
+ !this.isCheck
348
+ ) {
349
+ this.getSysCode();
350
+ }
351
+ if (this.defaultIndex != undefined) {
352
+ let data = this.columns[this.defaultIndex];
353
+ if (typeof data === 'string' && data) {
354
+ this.pickerValue = data;
355
+ } else if (typeof data === 'object') {
356
+ this.pickerValue = data[this.newValueKey];
357
+ }
358
+ } else if (this.isCheck) {
359
+ let data = this.value;
360
+ data.map((item) => {
361
+ this.checkList.push(item[this.valueKey] || item.value || item);
362
+ });
363
+ }
364
+ },
365
+ methods: {
366
+ handleSearch() {
367
+
368
+ if (this.timer != null) {
369
+ clearTimeout(this.timer);
370
+ }
371
+ this.timer = setTimeout( () => {
372
+
373
+ this.$emit('search', this.keyWord);
374
+
375
+ if (this.columns.length > 0) {
376
+ this.newColumns = this.columns.filter(
377
+ (x) => x[this.labelKey].indexOf(this.keyWord) != -1
378
+ );
379
+ if (!this.keyWord) {
380
+ this.newColumns = this.columns;
381
+ }
382
+ }
383
+
384
+ if ((this.columns && this.columns.length == 0) || !this.columns)
385
+ this.getSysCode();
386
+ }, 700);
387
+ },
388
+ handleClick(val) {
389
+ if (this.linkTag) {
390
+ this.$emit('tagClick', val);
391
+ } else {
392
+ if (this.disabled || this.readonly) return;
393
+ this.showPicker = true;
394
+ }
395
+ },
396
+ onLoad() {
397
+ if (
398
+ (this.sysAppCode || this.url) &&
399
+ this.newColumns.length != this.total &&
400
+ this.isCheck
401
+ ) {
402
+ this.getSysCode();
403
+ } else {
404
+ this.listFinished = true;
405
+ }
406
+ },
407
+ /**
408
+ * deleteList
409
+ * @desc:删除选中的数据
410
+ * @date 2023年4月20日
411
+ * @author liufan
412
+ * @param {String} val 当前数据的下标
413
+ */
414
+ deleteList(val, res) {
415
+ if (this.disabled || this.readonly) return;
416
+ this.pickerValue.splice(val, 1);
417
+ this.checkList = this.checkList.filter((x) => x != res.value);
418
+ this.$emit('input', this.pickerValue);
419
+
420
+ this.$emit('tagDelete', this.pickerValue);
421
+ },
422
+ toggle(index) {
423
+ this.$refs.checkboxes[index].toggle();
424
+ },
425
+ onConfirm(value, isConfirm) {
426
+ if (isConfirm) {
427
+ if (this.isCheck) {
428
+ let data = [];
429
+ this.newColumns.filter((x) => {
430
+ this.checkList.find((y) => {
431
+ if (x.value === y) {
432
+ data.push(x);
433
+ }
434
+ });
435
+ });
436
+ this.pickerValue = data;
437
+ } else {
438
+ this.pickerValue = value;
439
+ }
440
+ } else {
441
+ if (this.isCheck) {
442
+ this.checkList = [];
443
+ this.pickerValue.map((x) => {
444
+ this.checkList.push(x.value);
445
+ });
446
+ }
447
+ }
448
+
449
+ this.showPicker = false;
450
+ },
451
+ getValue() {
452
+ let value = '';
453
+ if (this.isCheck) {
454
+ let val = [];
455
+ if (this.newColumns && this.newColumns.length > 0) {
456
+ this.newColumns.filter((x) => {
457
+ this.value.find((y) => {
458
+ if (x[this.valueKey] == y || x[this.valueKey] == y.value) {
459
+ val.push(x);
460
+ }
461
+ });
462
+ });
463
+ } else {
464
+ val = this.value;
465
+ }
466
+ value = val;
467
+ } else {
468
+ if (Array.isArray(this.value) || this.value instanceof Object) {
469
+ if (!Array.isArray(this.value)) {
470
+ value = this.value[this.labelKey] || this.value[this.newValueKey];
471
+ let index = 0;
472
+ value && (value = value.replace(/<[^>]+>/g, ''));
473
+ this.newColumns.map((x, i) => {
474
+ if (typeof x === 'string' && value.indexOf(x) != -1) {
475
+ index = i;
476
+ } else if (
477
+ x[this.newValueKey] == value ||
478
+ x[this.newValueKey].indexOf(value) != -1
479
+ ) {
480
+ index = i;
481
+ }
482
+ });
483
+ this.newDefaultIndex = index;
484
+ } else {
485
+ let list = [];
486
+ this.value.map((item) => {
487
+ if (item[this.labelKey] || item[this.newValueKey]) {
488
+ list.push(item[this.labelKey] || item[this.newValueKey]);
489
+ } else if (typeof item === 'string') {
490
+ list.push(item);
491
+ }
492
+ });
493
+ value = list.join(this.joinStr);
494
+ let index = 0;
495
+ this.newColumns.map((x, i) => {
496
+ if (typeof x === 'string' && value.indexOf(x) != -1) {
497
+ index = i;
498
+ } else if (x[this.newValueKey] === value) {
499
+ index = i;
500
+ }
501
+ });
502
+ this.newDefaultIndex = index;
503
+ }
504
+ } else {
505
+ let index = 0;
506
+ value = this.value;
507
+ this.newColumns.map((x, i) => {
508
+ if (typeof x === 'string' && value.indexOf(x) != -1) {
509
+ index = i;
510
+ value = x;
511
+ } else if (x[this.newValueKey] === value) {
512
+ index = i;
513
+ value = x[this.labelKey] || x[this.newValueKey];
514
+ }
515
+ });
516
+ this.newDefaultIndex = index;
517
+ }
518
+ value && (value = value.replace(/<[^>]+>/g, ''));
519
+ }
520
+ return value;
521
+ },
522
+ getSysCode() {
523
+ let { url, method, sysAppCode, param, keyWord } = this;
524
+ let params = {
525
+ url: this.baseUrl
526
+ ? this.baseUrl + (url || findSysCode)
527
+ : url || findSysCode,
528
+ type: method,
529
+ params: {
530
+ ccCode: sysAppCode,
531
+ pageIndex: this.pageIndex,
532
+ ...param
533
+ }
534
+ };
535
+ if (this.isSearch) {
536
+ params.params[this.searchKey] = keyWord;
537
+ }
538
+ this.newLoading = true;
539
+ request(params)
540
+ .then((res) => {
541
+ const { status, data, message, rCode, results } = res;
542
+ this.listLoading = false;
543
+ if (status == 'success' || rCode === 0 || status === true) {
544
+ let info = this.resultsName
545
+ ? data
546
+ ? data[this.resultsName]
547
+ : results[this.resultsName]
548
+ : data
549
+ ? data
550
+ : results;
551
+ info.map((x) => {
552
+ if (this.isCheck) {
553
+ x.name =
554
+ x[sysAppCode ? 'shortName' : this.labelKey] &&
555
+ x[sysAppCode ? 'shortName' : this.labelKey].replace(
556
+ /<[^>]+>/g,
557
+ ''
558
+ );
559
+ } else {
560
+ x.name = x[sysAppCode ? 'shortName' : this.labelKey];
561
+ }
562
+ x.value = x[sysAppCode ? 'cciValue' : this.valueKey];
563
+ });
564
+ if (data && data.totalCount) {
565
+ this.total = data.totalCount;
566
+ if (data.totalCount === this.newColumns.length) {
567
+ this.listFinished = true;
568
+ } else {
569
+ if (this.newColumns.length != 0) {
570
+ this.newColumns.push.apply(this.newColumns, info);
571
+ } else {
572
+ this.newColumns = info;
573
+ }
574
+ this.pageIndex = res.data.nextPageNo;
575
+ }
576
+ } else {
577
+ this.listFinished = true;
578
+ this.newColumns = info;
579
+ }
580
+ if (this.beforResponse) {
581
+ this.newColumns = this.beforResponse(this.newColumns);
582
+ this.getValue();
583
+ } else {
584
+ this.getValue();
585
+ }
586
+ } else {
587
+ this.$toast(message);
588
+ }
589
+ this.newLoading = false;
590
+ })
591
+ .catch((err) => {
592
+ this.$toast(err.message);
593
+ });
594
+ },
595
+ handlePicker() {
596
+ if (this.disabled || this.readonly) return;
597
+ this.showPicker = true;
598
+ this.$emit('showPicker');
599
+ }
600
+ }
601
+ };
602
+ </script>
603
+
604
+ <style></style>