@neatui/vue 2.10.0 → 2.12.0

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 (50) hide show
  1. package/package.json +1 -1
  2. package/src/components/basic/LayerView/Layer.vue +0 -16
  3. package/src/components/display/Calendar.vue +14 -14
  4. package/src/components/display/CalendarReg.vue +14 -14
  5. package/src/components/display/Tree.vue +6 -6
  6. package/src/components/form/Cascader.vue +20 -20
  7. package/src/components/form/DatePicker.vue +8 -9
  8. package/src/components/form/DateRangePicker@v3.vue +5 -5
  9. package/src/components/form/DateRangeView@v3.vue +9 -9
  10. package/src/components/form/DateView.vue +14 -14
  11. package/src/components/form/DateView@v2.vue +14 -14
  12. package/src/components/form/DateView@v3.vue +17 -15
  13. package/src/components/form/Input@v3.vue +2 -2
  14. package/src/components/form/MoreSelect@v3.vue +27 -8
  15. package/src/components/form/MoreSelectList.vue +1 -1
  16. package/src/components/form/MoreSelectPanel@v3.vue +4 -4
  17. package/src/components/form/MoreSelectPicker.vue +1 -1
  18. package/src/components/form/MoreSelectTags.vue +1 -1
  19. package/src/components/form/PageMoreSelect.vue +15 -15
  20. package/src/components/form/PageSelect.vue +17 -17
  21. package/src/components/form/SearchMoreSelect.vue +1 -1
  22. package/src/components/form/SearchSelect@v3.vue +4 -4
  23. package/src/components/form/Select@v3.vue +13 -10
  24. package/src/components/form/SelectList.vue +8 -8
  25. package/src/components/form/SelectPicker.vue +7 -7
  26. package/src/components/form/SelectTags.vue +7 -7
  27. package/src/components/form/SelectTree/SelectTree@v1.vue +6 -6
  28. package/src/components/form/Switch.vue +38 -103
  29. package/src/components/form/Textarea@v2.vue +275 -0
  30. package/src/components/form/TimeView.vue +14 -14
  31. package/src/components/form/Upload.vue +52 -9
  32. package/src/components/form/date.ts +321 -0
  33. package/src/components/form/index.ts +2 -2
  34. package/src/components/form/number.ts +3 -0
  35. package/src/components/form/type.ts +224 -0
  36. package/src/components/loader/FormLoader/FormLoader@v2.vue +20 -20
  37. package/src/components/loader/FormLoader/FormLoader@v3.vue.backup +372 -291
  38. package/src/components/loader/FormLoader/FormRender@v3.vue.backup +4 -0
  39. package/src/components/loader/FormLoader/NodeLoader.vue +85 -0
  40. package/src/components/loader/FormLoader@v1/FormLoader.vue +1 -1
  41. package/src/components/loader/FormLoader@v1/FormRender.vue +49 -24
  42. package/src/components/loader/LayerLoader/LayerLoader.vue +1 -1
  43. package/src/components/loader/LimitLoader/LimitLoader@v3.vue +1 -1
  44. package/src/components/loader/MoveLoader/MoveLoader.vue +8 -8
  45. package/src/components/loader/TableLoader/TableLoader.vue +14 -9
  46. package/src/components/loader/TableLoader/TableRender.vue +100 -70
  47. package/src/components/loader/index.ts +1 -1
  48. package/src/components/tools/Pagination@a.vue +1 -1
  49. package/tsconfig.json +1 -1
  50. package/src/components/loader/FormLoader/index.ts +0 -2
@@ -45,7 +45,7 @@
45
45
  v-if="item.day"
46
46
  :ui-date-day="item.day"
47
47
  class="flex-block"
48
- :class="`${item.range ? 'bg-main-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
48
+ :class="`${item.range ? 'bg-main-o-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
49
49
  ui-flex="col cm"
50
50
  @click="change(item)"
51
51
  @mouseenter="setRangeValue(item)"
@@ -54,12 +54,12 @@
54
54
  ui-flex="col cm"
55
55
  class="r-sm b-solid bk-none b-xs my-ss ux-scale"
56
56
  style="width: 1.8em; height: 1.8em"
57
- :class="`${item.isLastMonth || item.isNextMonth ? 'co-idle' : item.isHoliday ? 'co-risk' : ''} ${item.selected ? 'active bg-main-lm co-fore' : 'hover-bg-weak'}`"
57
+ :class="`${item.isLastMonth || item.isNextMonth ? 'co-idle' : item.isHoliday ? 'co-risk' : ''} ${item.selected ? 'active bg-main-o-lm co-fore' : 'hover-bg-weak'}`"
58
58
  >
59
59
  <span>{{ item.day }}</span>
60
60
  </div>
61
61
  </div>
62
- <div class="pa full-x lh-xs ny-ss ob-no ol-no nowrap s-ml bold" style="transform-origin: 50% 100%" ui-flex="row ct" v-html="extras(item)"></div>
62
+ <div class="pa w-full lh-xs ny-ss ob-no ol-no nowrap s-ml bold" style="transform-origin: 50% 100%" ui-flex="row ct" v-html="extras(item)"></div>
63
63
  </div>
64
64
  </li>
65
65
  </ul>
@@ -109,7 +109,7 @@
109
109
  </div>
110
110
  </div>
111
111
 
112
- <div v-if="tools" ui-date-foot="" ui-flex="row xm" class="flex-fixed nx-sl ny-sl b-solid bk-line-mm bt-xs">
112
+ <div v-if="tools" ui-date-foot="" ui-flex="row xm" class="flex-fixed nx-sl ny-sl b-solid bk-line-o-mm bt-xs">
113
113
  <div ui-flex="row lm" class="nl-ss">
114
114
  <div v-if="state.panel" ui-flex="row lm">
115
115
  <span :anim-editing="state.type === 'date'" ui-btn="@a xs none" class="nx-ss" @click="setPanelType('date')">{{ idate(state.panel).format('YYYY-MM-DD') }}</span>
@@ -119,8 +119,8 @@
119
119
  </div>
120
120
  <div v-else-if="state.shortcuts?.length" ui-flex="row lm">
121
121
  <div class="mr-sm-sub nx-sl-sub ny-ss-sub lh-ss nowrap fs-ss dib-sub" ui-scroll=":x y:hidden">
122
- <p v-for="(item, idx) in state.shortcuts" :key="idx" class="bg-main-ss co-main r-xl" ui-btn="@a xs none :round" @click="item?.func">{{ item?.text }}</p>
123
- <p class="bg-main-ss co-main r-xl" ui-btn="@a xs none :round"><Icon class="co-main" name="more" /></p>
122
+ <p v-for="(item, idx) in state.shortcuts" :key="idx" class="bg-main-o-ss co-main r-xl" ui-btn="@a xs none :round" @click="item?.func">{{ item?.text }}</p>
123
+ <p class="bg-main-o-ss co-main r-xl" ui-btn="@a xs none :round"><Icon class="co-main" name="more" /></p>
124
124
  </div>
125
125
  </div>
126
126
  <div>&nbsp;</div>
@@ -149,20 +149,20 @@
149
149
  text: '昨天',
150
150
  func() {
151
151
  change({ date: idate(new Date().setDate(new Date().getDate() - 1)).format('YYYY-MM-DD') });
152
- }
152
+ },
153
153
  },
154
154
  today: {
155
155
  text: '今天',
156
156
  func() {
157
157
  change({ date: idate(new Date()).format('YYYY-MM-DD') });
158
- }
158
+ },
159
159
  },
160
160
  tomorrow: {
161
161
  text: '明天',
162
162
  func() {
163
163
  change({ date: idate(new Date().setDate(new Date().getDate() + 1)).format('YYYY-MM-DD') });
164
- }
165
- }
164
+ },
165
+ },
166
166
  };
167
167
 
168
168
  const emits: any = defineEmits(['update:modelValue', 'change', 'update']);
@@ -204,7 +204,7 @@
204
204
  format: 'YYYY-MM-DD',
205
205
  // 节假日
206
206
  holiday: () => ({}),
207
- time: false
207
+ time: false,
208
208
  });
209
209
 
210
210
  // 小时
@@ -250,7 +250,7 @@
250
250
  } else {
251
251
  return !props.time;
252
252
  }
253
- })
253
+ }),
254
254
  });
255
255
 
256
256
  const ths: any = ref(null);
@@ -289,7 +289,7 @@
289
289
  // 值
290
290
  state.value = value || '';
291
291
  },
292
- { deep: true, immediate: true }
292
+ { deep: true, immediate: true },
293
293
  );
294
294
 
295
295
  onMounted(() => {
@@ -299,7 +299,7 @@
299
299
  () => state.panel,
300
300
  () => {
301
301
  setTimeValue();
302
- }
302
+ },
303
303
  );
304
304
 
305
305
  // 更新时间
@@ -67,7 +67,7 @@
67
67
  v-if="item.day"
68
68
  :ui-date-day="item.day"
69
69
  class="flex-block"
70
- :class="`${item.range ? 'bg-main-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
70
+ :class="`${item.range ? 'bg-main-o-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
71
71
  ui-flex="col cm"
72
72
  @click="change(item)"
73
73
  >
@@ -75,12 +75,12 @@
75
75
  ui-flex="col cm"
76
76
  class="r-sm b-solid bk-none b-xs my-ss ux-scale co-main:hover"
77
77
  style="width: 1.8em; height: 1.8em"
78
- :class="`${item.isLastMonth || item.isNextMonth ? 'co-idle' : item.isHoliday ? 'co-risk' : ''} ${item.selected ? 'active bg-main-lm co-fore' : 'hover-bg-weak'}`"
78
+ :class="`${item.isLastMonth || item.isNextMonth ? 'co-idle' : item.isHoliday ? 'co-risk' : ''} ${item.selected ? 'active bg-main-o-lm co-fore' : 'hover-bg-weak'}`"
79
79
  >
80
80
  <span>{{ item.day }}</span>
81
81
  </div>
82
82
  </div>
83
- <div class="pa full-x lh-xs ny-ss ob-no ol-no nowrap s-ml bold" style="transform-origin: 50% 100%" ui-flex="row ct" v-html="extras(item)"></div>
83
+ <div class="pa w-full lh-xs ny-ss ob-no ol-no nowrap s-ml bold" style="transform-origin: 50% 100%" ui-flex="row ct" v-html="extras(item)"></div>
84
84
  </div>
85
85
  </li>
86
86
  </ul>
@@ -129,7 +129,7 @@
129
129
  </ul>
130
130
  </div>
131
131
  </div>
132
- <div v-if="tools" ui-date-foot="" ui-flex="row xm" class="flex-fixed nx-sl ny-sl b-solid bk-line-mm bt-xs">
132
+ <div v-if="tools" ui-date-foot="" ui-flex="row xm" class="flex-fixed nx-sl ny-sl b-solid bk-line-o-mm bt-xs">
133
133
  <div ui-flex="row lm" class="nl-ss">
134
134
  <div v-if="state.panel" ui-flex="row lm">
135
135
  <span :anim-editing="state.type === 'date'" class="nx-ss">{{ idate(state.panel).format('YYYY-MM-DD') }}</span>
@@ -137,8 +137,8 @@
137
137
  </div>
138
138
  <div v-else-if="state.shortcuts?.length" ui-flex="row lm">
139
139
  <div class="mr-sm-sub nx-sl-sub ny-ss-sub lh-ss nowrap fs-ss dib-sub" ui-scroll=":x y:hidden">
140
- <p v-for="(item, idx) in state.shortcuts" :key="idx" class="bg-main-ss co-main r-xl" ui-btn="@a xs none :round" @click="item?.func">{{ item?.text }}</p>
141
- <p class="bg-main-ss co-main r-xl" ui-btn="@a xs none :round"><Icon class="co-main" name="more" /></p>
140
+ <p v-for="(item, idx) in state.shortcuts" :key="idx" class="bg-main-o-ss co-main r-xl" ui-btn="@a xs none :round" @click="item?.func">{{ item?.text }}</p>
141
+ <p class="bg-main-o-ss co-main r-xl" ui-btn="@a xs none :round"><Icon class="co-main" name="more" /></p>
142
142
  </div>
143
143
  </div>
144
144
  <div>&nbsp;</div>
@@ -153,10 +153,11 @@
153
153
  <script setup lang="ts">
154
154
  import { computed, ref, reactive, watch, onMounted } from 'vue';
155
155
  import { isDateString, isObject, isString } from '@fekit/utils';
156
- import { idate } from '@fekit/utils';
156
+ // import { idate } from '@fekit/utils';
157
+ import { idate } from './date';
157
158
  import { Icon } from '../basic';
158
159
 
159
- const _level: any = { 0: ['d', 1], 1: ['m', 1], 2: ['y', 10], 3: ['y', 100] };
160
+ // const _level: any = { 0: ['d', 1], 1: ['m', 1], 2: ['y', 10], 3: ['y', 100] };
160
161
 
161
162
  // 创建日期
162
163
  const cDate = (date: any = null) => {
@@ -250,11 +251,12 @@
250
251
  // 内部数据
251
252
  const state: any = reactive({
252
253
  // 面板显示时间
253
- panel: '',
254
+ panel: undefined,
254
255
  // 面板年份选择
255
256
  years: 0,
256
257
  // 当前时间计算
257
258
  curr: computed(() => {
259
+ // console.log(158, state.panel);
258
260
  const date = idate(state.panel);
259
261
  const days = date.calendar({ group: true, value: [state.panel] });
260
262
  return { days, ...date.attr };
@@ -262,7 +264,7 @@
262
264
  // 当前面板类型
263
265
  type: 0,
264
266
  // 值
265
- value: '',
267
+ value: undefined,
266
268
  // 快捷选择
267
269
  shortcuts: computed(() => {
268
270
  return props.shortcuts.map((item: any) => {
@@ -337,9 +339,9 @@
337
339
  () => props.modelValue,
338
340
  (value: any) => {
339
341
  // 面板显示日期
340
- state.panel = value || '';
342
+ state.panel = value || undefined;
341
343
  // 值
342
- state.value = value || '';
344
+ state.value = value || undefined;
343
345
  },
344
346
  { deep: true, immediate: true },
345
347
  );
@@ -427,14 +429,14 @@
427
429
 
428
430
  // 清空日期
429
431
  const remove = () => {
430
- state.panel = '';
432
+ state.panel = undefined;
431
433
  update();
432
434
  };
433
435
 
434
436
  // 更新数据
435
437
  const update = () => {
436
- emits('update:modelValue', state.panel ? idate(state.panel).format(props.format) : '');
437
- emits('update', state.panel ? idate(state.panel).format(props.format) : '');
438
+ emits('update:modelValue', state.panel ? idate(state.panel).format(props.format) : undefined);
439
+ emits('update', state.panel ? idate(state.panel).format(props.format) : undefined);
438
440
  };
439
441
 
440
442
  // 面板类型
@@ -212,7 +212,7 @@
212
212
 
213
213
  // 清空
214
214
  function clear() {
215
- emits('update:modelValue', '');
215
+ emits('update:modelValue', null);
216
216
  emits('clear');
217
217
  }
218
218
  // 输入
@@ -237,7 +237,7 @@
237
237
  }
238
238
  // 输入事件
239
239
  emits('input', e, state);
240
- emits('update:modelValue', value);
240
+ emits('update:modelValue', value || null);
241
241
  };
242
242
  // 失焦
243
243
  const blur = (e: any) => {
@@ -13,8 +13,15 @@
13
13
  </Input>
14
14
  </slot>
15
15
  <template #tips>
16
- <ul v-if="props.options?.length" ui-scroll=":y s" class="nx-sm lh-ml" style="min-width: 100%; max-height: 15em">
17
- <template v-for="(item, idx) of props.options" :key="idx">
16
+ <div v-if="search" class="ny-sm nx-sl">
17
+ <Input v-model="state.search" sz="s">
18
+ <template #suffix>
19
+ <i ui-form-search="" class="co-note"></i>
20
+ </template>
21
+ </Input>
22
+ </div>
23
+ <ul v-if="state.filter?.length" ui-scroll=":y s" class="nx-sm lh-ml" style="min-width: 100%; max-height: 15em">
24
+ <template v-for="(item, idx) of state.filter" :key="idx">
18
25
  <li v-if="item.disabled" class="ux-hover nx-sm r-ss o-ms nowrap">
19
26
  <label style="pointer-events: none" ui-form="@a type:checkbox :block">
20
27
  <input type="checkbox" :name="state.name" :checked="modelValue?.some((i: any) => `${i}` === `${item.value}`)" />
@@ -36,7 +43,7 @@
36
43
  <div class="ux-hover nx-sm ny-ss r-ss nowrap co-main" @click.stop="allselect()">
37
44
  <label style="pointer-events: none" ui-form="@a type:checkbox :block">
38
45
  <input type="checkbox" :name="state.name" :checked="state.all" />
39
- <span class="ml-sm">全选({{ props.options?.length || 0 }})</span>
46
+ <span class="ml-sm">全选({{ state.filter?.length || 0 }})</span>
40
47
  </label>
41
48
  </div>
42
49
  <div>
@@ -51,7 +58,7 @@
51
58
 
52
59
  <script setup lang="ts">
53
60
  import { reactive, ref, computed, watch } from 'vue';
54
- import { Input } from '../form';
61
+ import { Input } from '.';
55
62
  import { IFollowView } from '../basic';
56
63
  const ifollow: any = ref(null);
57
64
 
@@ -64,7 +71,7 @@
64
71
  * options 枚举列表
65
72
  * tools 是否显示工具栏
66
73
  * spare 空闲兜底内容
67
- * search 是否显示搜索框
74
+ * search 是否启用搜索框
68
75
  *
69
76
  * -----------------------------------------
70
77
  * theme 主题
@@ -93,6 +100,7 @@
93
100
  options: Array<object>;
94
101
  tools?: boolean;
95
102
  spare?: string;
103
+ search?: boolean;
96
104
 
97
105
  // Input
98
106
  placeholder?: string;
@@ -120,6 +128,7 @@
120
128
  options: () => [],
121
129
  tools: true,
122
130
  spare: '当前没有可选项',
131
+ search: false,
123
132
 
124
133
  // Input
125
134
  placeholder: '',
@@ -148,11 +157,21 @@
148
157
  }),
149
158
  show: 0,
150
159
  value: '',
160
+ search: '',
151
161
  all: computed(() => {
152
- return props.options?.every((item: any) => props.modelValue?.some((i: any) => `${i}` === `${item.value}`));
162
+ return state.filter?.every((item: any) => props.modelValue?.some((i: any) => `${i}` === `${item.value}`));
153
163
  }),
154
164
  has: computed(() => {
155
- return props.options?.some((item: any) => props.modelValue?.some((i: any) => `${i}` === `${item.value}`));
165
+ return state.filter?.some((item: any) => props.modelValue?.some((i: any) => `${i}` === `${item.value}`));
166
+ }),
167
+ filter: computed(() => {
168
+ if (state.search) {
169
+ return props.options?.filter((item: any) => {
170
+ return item.label?.includes(state.search);
171
+ });
172
+ } else {
173
+ return props.options;
174
+ }
156
175
  }),
157
176
  });
158
177
 
@@ -183,7 +202,7 @@
183
202
  };
184
203
  // 全选
185
204
  const allselect = () => {
186
- const s = state.all ? [] : props.options?.map((item: any) => item.value);
205
+ const s = state.all ? [] : state.filter?.map((item: any) => item.value);
187
206
  change(s);
188
207
  };
189
208
  // 清除
@@ -4,7 +4,7 @@
4
4
  <li
5
5
  v-for="(item, idx) of props.options"
6
6
  :key="idx"
7
- :class="`${mv?.some((i: any) => `${i}` === `${item.value}`) ? 'bg-main-ss bk-main-ml' : 'bk-case'}`"
7
+ :class="`${mv?.some((i: any) => `${i}` === `${item.value}`) ? 'bg-main-o-ss bk-main-o-ml' : 'bk-case'}`"
8
8
  class="n-sm r-ss b-solid b-xs"
9
9
  @click.stop="select(item.value)"
10
10
  >
@@ -51,7 +51,7 @@
51
51
 
52
52
  <script setup lang="ts">
53
53
  import { reactive, ref, computed, watch } from 'vue';
54
- import { Input } from '../form';
54
+ import { Input } from '.';
55
55
  import { IFollowView, IPickerView } from '../basic';
56
56
  const ipicker: any = ref(null);
57
57
 
@@ -139,7 +139,7 @@
139
139
  verify: false,
140
140
  prefix: () => [],
141
141
  suffix: () => [],
142
- interacted: false
142
+ interacted: false,
143
143
  });
144
144
  // 内部数据
145
145
  const state: any = reactive({
@@ -153,7 +153,7 @@
153
153
  }),
154
154
  has: computed(() => {
155
155
  return props.options?.some((item: any) => props.modelValue?.some((i: any) => `${i}` === `${item.value}`));
156
- })
156
+ }),
157
157
  });
158
158
 
159
159
  // 监听外部数据
@@ -163,7 +163,7 @@
163
163
  const selectd: any = o?.filter((item: any) => v?.some((i: any) => `${i}` === `${item.value}`))?.map((item: any) => item.label) || [];
164
164
  state.value = selectd.join(' Ι ') || '';
165
165
  },
166
- { deep: true, immediate: true }
166
+ { deep: true, immediate: true },
167
167
  );
168
168
 
169
169
  // 更新
@@ -30,7 +30,7 @@
30
30
 
31
31
  <script setup lang="ts">
32
32
  import { reactive, ref, computed, watch } from 'vue';
33
- import { Input } from '../form';
33
+ import { Input } from '.';
34
34
  import { IPickerView, IScrollView } from '../basic';
35
35
  const ipicker: any = ref(null);
36
36
  const emits = defineEmits(['update:modelValue']);
@@ -5,7 +5,7 @@
5
5
  <li
6
6
  v-for="(item, idx) of props.options"
7
7
  :key="idx"
8
- :class="`${mv?.some((i: any) => `${i}` === `${item.value}`) ? 'bg-main-ss bk-main-ml' : 'bk-case'}`"
8
+ :class="`${mv?.some((i: any) => `${i}` === `${item.value}`) ? 'bg-main-o-ss bk-main-o-ml' : 'bk-case'}`"
9
9
  class="nx-ms ny-ss r-sm b-solid b-xs pr"
10
10
  @click.stop="select(item.value)"
11
11
  >
@@ -54,7 +54,7 @@
54
54
 
55
55
  <script setup lang="ts">
56
56
  import { reactive, ref, computed, watch } from 'vue';
57
- import { Input } from '../form';
57
+ import { Input } from '.';
58
58
  import { IFollowView } from '../basic';
59
59
  const ifollow: any = ref(null);
60
60
 
@@ -66,51 +66,51 @@
66
66
  // 提示文案
67
67
  tips: {
68
68
  type: String,
69
- default: ''
69
+ default: '',
70
70
  },
71
71
  placeholder: {
72
72
  type: String,
73
- default: ''
73
+ default: '',
74
74
  },
75
75
  modelValue: {
76
76
  type: Array as () => any[],
77
- default: () => []
77
+ default: () => [],
78
78
  },
79
79
  options: {
80
80
  type: Array as () => any[],
81
- default: () => []
81
+ default: () => [],
82
82
  },
83
83
  ui: {
84
84
  type: Object,
85
- default: () => ({ sz: 'm' })
85
+ default: () => ({ sz: 'm' }),
86
86
  },
87
87
  // 校验规则
88
88
  rules: {
89
89
  type: Array,
90
- default: () => []
90
+ default: () => [],
91
91
  },
92
92
  // 是否是示校验图标
93
93
  verify: {
94
94
  type: Boolean,
95
- default: false
95
+ default: false,
96
96
  },
97
97
  tools: {
98
98
  type: Boolean,
99
- default: true
99
+ default: true,
100
100
  },
101
101
  spare: {
102
102
  type: String,
103
- default: '当前没有可选项'
103
+ default: '当前没有可选项',
104
104
  },
105
105
  // 分页
106
106
  pageInfo: {
107
107
  type: Object,
108
- default: () => ({ total: 0, pages: 0, page: 0 })
108
+ default: () => ({ total: 0, pages: 0, page: 0 }),
109
109
  },
110
110
  filterable: {
111
111
  type: Boolean,
112
- default: false
113
- }
112
+ default: false,
113
+ },
114
114
  });
115
115
 
116
116
  const formName = new Date().getTime().toString();
@@ -136,7 +136,7 @@
136
136
  }),
137
137
  has: computed(() => {
138
138
  return props.options?.some((item: any) => props.modelValue?.some((i: any) => `${i}` === `${item.value}`));
139
- })
139
+ }),
140
140
  });
141
141
 
142
142
  // 选中
@@ -175,7 +175,7 @@
175
175
  () => {
176
176
  change([]);
177
177
  emit('searchChange', state.search);
178
- }
178
+ },
179
179
  );
180
180
  </script>
181
181
  <style lang="scss" scoped>
@@ -42,7 +42,7 @@
42
42
 
43
43
  <script setup lang="ts">
44
44
  import { reactive, ref, computed, watch } from 'vue';
45
- import { Input } from '../form';
45
+ import { Input } from '.';
46
46
  import { IFollowView } from '../basic';
47
47
 
48
48
  const ifollow: any = ref(null);
@@ -51,7 +51,7 @@
51
51
  // 用户是否交互
52
52
  interacted: {
53
53
  type: Boolean,
54
- default: false
54
+ default: false,
55
55
  },
56
56
  theme: { type: String, default: '@a' },
57
57
  sz: { type: String, default: 'm' },
@@ -60,51 +60,51 @@
60
60
  // 提示文案
61
61
  tips: {
62
62
  type: String,
63
- default: ''
63
+ default: '',
64
64
  },
65
65
  placeholder: {
66
66
  type: String,
67
- default: ''
67
+ default: '',
68
68
  },
69
69
  options: {
70
70
  type: Array as () => any[],
71
- default: () => []
71
+ default: () => [],
72
72
  },
73
73
  ui: {
74
74
  type: Object,
75
- default: () => ({ sz: 'm' })
75
+ default: () => ({ sz: 'm' }),
76
76
  },
77
77
  modelValue: {
78
78
  type: [String, Number],
79
- default: ''
79
+ default: '',
80
80
  },
81
81
  // 校验规则
82
82
  rules: {
83
83
  type: Array,
84
- default: () => []
84
+ default: () => [],
85
85
  },
86
86
  // 是否是示校验图标
87
87
  verify: {
88
88
  type: Boolean,
89
- default: false
89
+ default: false,
90
90
  },
91
91
  tools: {
92
92
  type: Boolean,
93
- default: true
93
+ default: true,
94
94
  },
95
95
  spare: {
96
96
  type: String,
97
- default: '当前没有可选项'
97
+ default: '当前没有可选项',
98
98
  },
99
99
  // 分页
100
100
  pageInfo: {
101
101
  type: Object,
102
- default: () => ({ total: 0, pages: 0, page: 0 })
102
+ default: () => ({ total: 0, pages: 0, page: 0 }),
103
103
  },
104
104
  filterable: {
105
105
  type: Boolean,
106
- default: false
107
- }
106
+ default: false,
107
+ },
108
108
  });
109
109
 
110
110
  const emit = defineEmits(['update:modelValue', 'pageChange', 'searchChange']);
@@ -126,7 +126,7 @@
126
126
  }
127
127
  }
128
128
  return _value;
129
- })
129
+ }),
130
130
  /* filter: computed(() => {
131
131
  if (state.search) {
132
132
  return props.options?.filter((item) => {
@@ -170,14 +170,14 @@
170
170
  () => {
171
171
  change({});
172
172
  emit('searchChange', state.search);
173
- }
173
+ },
174
174
  );
175
175
 
176
176
  defineExpose({
177
177
  select,
178
178
  remove,
179
179
  change,
180
- cancel
180
+ cancel,
181
181
  });
182
182
  </script>
183
183
  <style lang="scss" scoped>
@@ -44,7 +44,7 @@
44
44
 
45
45
  <script setup lang="ts">
46
46
  import { reactive, ref, computed } from 'vue';
47
- import { Input } from '../form';
47
+ import { Input } from '.';
48
48
  import { IFollowView } from '../basic';
49
49
  const ifollow: any = ref(null);
50
50
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  <script setup lang="ts">
50
50
  import { reactive, ref, computed } from 'vue';
51
- import { Input } from '../form';
51
+ import { Input } from '.';
52
52
  import { IFollowView } from '../basic';
53
53
  const ifollow: any = ref(null);
54
54
  console.warn('「SearchSelect」 即将废弃,建议使用「Select」 设置参数search为true,示例:<Select v-model="value" :search="true" />');
@@ -144,7 +144,7 @@
144
144
  verify: false,
145
145
  prefix: () => [],
146
146
  suffix: () => [],
147
- interacted: false
147
+ interacted: false,
148
148
  });
149
149
 
150
150
  const change = ({ value = '' }: any = {}) => {
@@ -166,7 +166,7 @@
166
166
  } else {
167
167
  return props.options;
168
168
  }
169
- })
169
+ }),
170
170
  });
171
171
  // 选择
172
172
  const select = (item: any = {}) => {
@@ -196,7 +196,7 @@
196
196
  select,
197
197
  remove,
198
198
  change,
199
- cancel
199
+ cancel,
200
200
  });
201
201
  </script>
202
202
  . .