hy-dispatch-ui-v3 0.2.65 → 0.2.67

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 (144) hide show
  1. package/dist/tailwind.css +51 -13
  2. package/es/api/organization.mjs +43 -0
  3. package/es/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.mjs +245 -0
  4. package/es/bussiness/hyAcquisitionStationTree/index.mjs +7 -0
  5. package/es/bussiness/hyAcquisitionStationTree/js/index.mjs +124 -0
  6. package/es/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
  7. package/es/bussiness/hyDeviceTree/deviceTree.vue.mjs +249 -0
  8. package/es/bussiness/hyDeviceTree/index.mjs +7 -0
  9. package/es/bussiness/hyDeviceTree/js/index.mjs +126 -0
  10. package/es/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
  11. package/es/bussiness/hyOrgGroupTree/index.mjs +7 -0
  12. package/es/bussiness/hyOrgGroupTree/js/index.mjs +124 -0
  13. package/es/bussiness/hyOrgGroupTree/orgGroupTree.vue.mjs +245 -0
  14. package/es/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
  15. package/es/bussiness/hyPlanGroupDeviceTree/index.mjs +7 -0
  16. package/es/bussiness/hyPlanGroupDeviceTree/js/index.mjs +124 -0
  17. package/es/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.mjs +245 -0
  18. package/es/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
  19. package/es/bussiness/hyUserTree/index.mjs +7 -0
  20. package/es/bussiness/hyUserTree/js/index.mjs +126 -0
  21. package/es/bussiness/hyUserTree/style/userTree.scss +0 -0
  22. package/es/bussiness/hyUserTree/userTree.vue.mjs +239 -0
  23. package/es/bussiness/index.mjs +5 -0
  24. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +183 -149
  25. package/es/components/hyButton/button.vue.mjs +19 -5
  26. package/es/components/hyButton/style/button.scss +72 -0
  27. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -2
  28. package/es/components/hyForm/cpns/formItem.vue.mjs +254 -32
  29. package/es/components/hyForm/cpns/locationSelect.vue.mjs +8 -1
  30. package/es/components/hyForm/form.vue.mjs +88 -19
  31. package/es/components/hyForm/js/index.mjs +2 -1
  32. package/es/components/hyForm/js/useAppForm.mjs +3 -3
  33. package/es/components/hyIcon/style/icon.scss +1 -0
  34. package/es/components/hyMap/js/index.mjs +6 -6
  35. package/es/components/hyMap/map.vue.mjs +14 -4
  36. package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
  37. package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
  38. package/es/components/hyOrgCascader/orgCascader.vue.mjs +75 -15
  39. package/es/components/hyRadioGroup/radioGroup.vue.mjs +5 -4
  40. package/es/components/hySearch/cpns/searchItem.vue.mjs +434 -206
  41. package/es/components/hySearch/js/index.mjs +2 -1
  42. package/es/components/hySearch/search.vue.mjs +71 -10
  43. package/es/components/hySearch/style/search.scss +7 -0
  44. package/es/components/hyTable/cpns/columnSelect.vue.mjs +21 -22
  45. package/es/components/hyTable/cpns/virtualTable.vue.mjs +35 -21
  46. package/es/components/hyTable/js/index.mjs +16 -17
  47. package/es/components/hyTable/js/search.mjs +28 -2
  48. package/es/components/hyTable/style/table.scss +13 -0
  49. package/es/components/hyTable/table.vue.mjs +55 -22
  50. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +17 -12
  51. package/es/components/hyTableForm/batchTableForm.vue.mjs +36 -5
  52. package/es/components/hyTableForm/js/useAppTableForm.mjs +1 -1
  53. package/es/components/hyTableForm/tableForm.vue.mjs +84 -32
  54. package/es/components/hyTour/index.mjs +7 -0
  55. package/es/components/hyTour/style/tour.scss +0 -0
  56. package/es/components/hyTour/tour.vue.mjs +23 -0
  57. package/es/components/hyTree/config/tree-config.mjs +5 -2
  58. package/es/components/hyTree/js/index.mjs +128 -56
  59. package/es/components/hyTree/tree.vue.mjs +22 -37
  60. package/es/components/index.mjs +1 -0
  61. package/es/index.mjs +6 -0
  62. package/es/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  63. package/es/style/element/hy-element.scss +24 -3
  64. package/es/style/index.scss +0 -1
  65. package/es/style/tailwind.scss +0 -1
  66. package/es/style/theme.scss +1 -0
  67. package/es/utils/is.mjs +3 -1
  68. package/es/utils/map/hook/bigMap.mjs +11 -1
  69. package/es/utils/map/hook/gaode.mjs +60 -17
  70. package/es/utils/map/hook/leafletjs.mjs +25 -4
  71. package/es/utils/map/index.mjs +1 -1
  72. package/es/version.mjs +1 -1
  73. package/lib/api/organization.js +47 -0
  74. package/lib/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.js +249 -0
  75. package/lib/bussiness/hyAcquisitionStationTree/index.js +12 -0
  76. package/lib/bussiness/hyAcquisitionStationTree/js/index.js +126 -0
  77. package/lib/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
  78. package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +253 -0
  79. package/lib/bussiness/hyDeviceTree/index.js +12 -0
  80. package/lib/bussiness/hyDeviceTree/js/index.js +128 -0
  81. package/lib/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
  82. package/lib/bussiness/hyOrgGroupTree/index.js +12 -0
  83. package/lib/bussiness/hyOrgGroupTree/js/index.js +126 -0
  84. package/lib/bussiness/hyOrgGroupTree/orgGroupTree.vue.js +249 -0
  85. package/lib/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
  86. package/lib/bussiness/hyPlanGroupDeviceTree/index.js +12 -0
  87. package/lib/bussiness/hyPlanGroupDeviceTree/js/index.js +126 -0
  88. package/lib/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.js +249 -0
  89. package/lib/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
  90. package/lib/bussiness/hyUserTree/index.js +12 -0
  91. package/lib/bussiness/hyUserTree/js/index.js +128 -0
  92. package/lib/bussiness/hyUserTree/style/userTree.scss +0 -0
  93. package/lib/bussiness/hyUserTree/userTree.vue.js +243 -0
  94. package/lib/bussiness/index.js +14 -4
  95. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +182 -148
  96. package/lib/components/hyButton/button.vue.js +18 -4
  97. package/lib/components/hyButton/style/button.scss +72 -0
  98. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +0 -1
  99. package/lib/components/hyForm/cpns/formItem.vue.js +250 -28
  100. package/lib/components/hyForm/cpns/locationSelect.vue.js +8 -1
  101. package/lib/components/hyForm/form.vue.js +86 -17
  102. package/lib/components/hyForm/js/index.js +2 -0
  103. package/lib/components/hyForm/js/useAppForm.js +3 -3
  104. package/lib/components/hyIcon/style/icon.scss +1 -0
  105. package/lib/components/hyMap/js/index.js +5 -5
  106. package/lib/components/hyMap/map.vue.js +13 -3
  107. package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
  108. package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
  109. package/lib/components/hyOrgCascader/orgCascader.vue.js +73 -13
  110. package/lib/components/hyRadioGroup/radioGroup.vue.js +5 -4
  111. package/lib/components/hySearch/cpns/searchItem.vue.js +431 -203
  112. package/lib/components/hySearch/js/index.js +2 -0
  113. package/lib/components/hySearch/search.vue.js +69 -8
  114. package/lib/components/hySearch/style/search.scss +7 -0
  115. package/lib/components/hyTable/cpns/columnSelect.vue.js +20 -21
  116. package/lib/components/hyTable/cpns/virtualTable.vue.js +51 -37
  117. package/lib/components/hyTable/js/index.js +16 -16
  118. package/lib/components/hyTable/js/search.js +28 -2
  119. package/lib/components/hyTable/style/table.scss +13 -0
  120. package/lib/components/hyTable/table.vue.js +53 -20
  121. package/lib/components/hyTableActionButton/tableActionButton.vue.js +16 -11
  122. package/lib/components/hyTableForm/batchTableForm.vue.js +36 -5
  123. package/lib/components/hyTableForm/js/useAppTableForm.js +1 -1
  124. package/lib/components/hyTableForm/tableForm.vue.js +85 -33
  125. package/lib/components/hyTour/index.js +12 -0
  126. package/lib/components/hyTour/style/tour.scss +0 -0
  127. package/lib/components/hyTour/tour.vue.js +27 -0
  128. package/lib/components/hyTree/config/tree-config.js +5 -2
  129. package/lib/components/hyTree/js/index.js +128 -56
  130. package/lib/components/hyTree/tree.vue.js +22 -37
  131. package/lib/components/index.js +8 -6
  132. package/lib/index.js +67 -55
  133. package/lib/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
  134. package/lib/style/element/hy-element.scss +24 -3
  135. package/lib/style/index.scss +0 -1
  136. package/lib/style/tailwind.scss +0 -1
  137. package/lib/style/theme.scss +1 -0
  138. package/lib/utils/is.js +5 -3
  139. package/lib/utils/map/hook/bigMap.js +11 -1
  140. package/lib/utils/map/hook/gaode.js +60 -17
  141. package/lib/utils/map/hook/leafletjs.js +25 -4
  142. package/lib/utils/map/index.js +1 -1
  143. package/lib/version.js +1 -1
  144. package/package.json +2 -2
@@ -23,11 +23,11 @@ function appFormItemHandler(column = {}) {
23
23
  return {
24
24
  ...column,
25
25
  attrs: {
26
- maxlength: attrs.type === "textarea" ? 255 : attrs.type === "text" ? 100 : void 0,
26
+ maxlength: attrs.type === "text" ? 256 : void 0,
27
27
  ...attrs
28
28
  }
29
29
  };
30
- } else if (/^(radio|radio-group|checkbox|select)$/.test(column.type)) {
30
+ } else if (/^(radio|radio-group|checkbox|select|select-v2)$/.test(column.type)) {
31
31
  return {
32
32
  ...column,
33
33
  attrs: {
@@ -41,7 +41,7 @@ function appFormItemHandler(column = {}) {
41
41
  }
42
42
  }
43
43
  };
44
- } else if (/^(extra)$/.test(column.type) || /^(location-select)$/.test(column.type)) {
44
+ } else if (/^(extra|location-select)$/.test(column.type)) {
45
45
  return {
46
46
  ...column,
47
47
  children: (column.children || []).map((item) => appFormItemHandler(item))
@@ -6,6 +6,7 @@
6
6
  overflow: hidden;
7
7
  fill: currentColor;
8
8
  outline: none;
9
+ flex-shrink: 0;
9
10
  }
10
11
  .hy-button {
11
12
  .hy-icon {
@@ -1,5 +1,5 @@
1
1
  import { InitMap } from '../../../utils/map/index.mjs';
2
- import { nextTick } from 'vue';
2
+ import { shallowRef, nextTick } from 'vue';
3
3
 
4
4
  const useAppMapWrapper = (hy) => {
5
5
  const {
@@ -7,8 +7,8 @@ const useAppMapWrapper = (hy) => {
7
7
  mapRef,
8
8
  emits
9
9
  } = hy;
10
- const hyMap = null;
11
- const map = null;
10
+ let hyMap = shallowRef(null);
11
+ let map = shallowRef(null);
12
12
  function newMap(mapType) {
13
13
  const mapFilters = [
14
14
  {
@@ -92,7 +92,7 @@ const useAppMapWrapper = (hy) => {
92
92
  filter: "saturate(180%) brightness(105%) contrast(115%)"
93
93
  }
94
94
  ];
95
- hy.hyMap = new InitMap({
95
+ hy.hyMap.value = new InitMap({
96
96
  ...mapConfig,
97
97
  mapType,
98
98
  BM: window.BM
@@ -115,7 +115,7 @@ const useAppMapWrapper = (hy) => {
115
115
  }, 800);
116
116
  }
117
117
  function initMap() {
118
- hy.map = hy.hyMap.InitMap(mapRef.value, {
118
+ hy.map.value = hy.hyMap.value.InitMap(mapRef.value, {
119
119
  minZoom: mapConfig.minZoom || 8,
120
120
  maxZoom: mapConfig.maxZoom || 18,
121
121
  center: mapConfig.center || {
@@ -125,7 +125,7 @@ const useAppMapWrapper = (hy) => {
125
125
  zoom: mapConfig.zoom || 14,
126
126
  completeCallbacks: () => {
127
127
  nextTick(() => {
128
- emits("complete", hy.hyMap, hy.map);
128
+ emits("complete", hy.hyMap.value, hy.map.value);
129
129
  });
130
130
  }
131
131
  });
@@ -1,7 +1,9 @@
1
- import { ref, onMounted, openBlock, createElementBlock, createElementVNode } from 'vue';
1
+ import { ref, onMounted, onBeforeUnmount, openBlock, createElementBlock, createBlock, unref } from 'vue';
2
2
  import '../../hooks/index.mjs';
3
+ import '../../index.mjs';
3
4
  import { useAppMapWrapper } from './js/index.mjs';
4
5
  import { useMixins } from '../../hooks/useMixins.mjs';
6
+ import { HyNoPermissionsMap } from '../hyNoPermissionsMap/index.mjs';
5
7
  import { useMapConfig } from '../../hooks/useMapConfig.mjs';
6
8
 
7
9
  import "../../static/map/bigemap.css";
@@ -44,13 +46,21 @@ const _sfc_main = {
44
46
  [useAppMapWrapper]
45
47
  );
46
48
  onMounted(() => {
47
- newMap(props.mapType);
49
+ if (props.mapType !== "nomap") {
50
+ newMap(props.mapType);
51
+ }
52
+ });
53
+ onBeforeUnmount(() => {
54
+ map.value?.removeMap();
55
+ map.value = null;
56
+ hyMap.value = null;
48
57
  });
49
58
  return (_ctx, _cache) => {
50
59
  return openBlock(), createElementBlock("div", { class: "w-full h-full box-border border-border border relative" }, [
51
- createElementVNode(
60
+ props.mapType !== "nomap" ? (openBlock(), createElementBlock(
52
61
  "div",
53
62
  {
63
+ key: 0,
54
64
  ref_key: "mapRef",
55
65
  ref: mapRef,
56
66
  class: "w-full h-full rounded overflow-hidden"
@@ -58,7 +68,7 @@ const _sfc_main = {
58
68
  null,
59
69
  512
60
70
  /* NEED_PATCH */
61
- )
71
+ )) : (openBlock(), createBlock(unref(HyNoPermissionsMap), { key: 1 }))
62
72
  ]);
63
73
  };
64
74
  }
@@ -26,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
26
26
  return openBlock(), createElementBlock("div", { class: "w-full h-full bg-background-2 text-auxiliary text-base flex flex-col items-center justify-center" }, [
27
27
  createVNode(unref(HyIcon), {
28
28
  "svg-name": __props.svgName,
29
- "class-name": "!w-[46px] !h-[46px]"
29
+ "class-name": "!w-[56px] !h-[56px]"
30
30
  }, null, 8, ["svg-name"]),
31
31
  createElementVNode("div", { class: "text-center mt-[12px]" }, [
32
32
  createElementVNode(
@@ -26,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
26
26
  return openBlock(), createElementBlock("div", { class: "w-full h-full bg-background-2 text-auxiliary text-base flex flex-col items-center justify-center" }, [
27
27
  createVNode(unref(HyIcon), {
28
28
  "svg-name": __props.svgName,
29
- "class-name": "!w-[46px] !h-[46px]"
29
+ "class-name": "!w-[56px] !h-[56px]"
30
30
  }, null, 8, ["svg-name"]),
31
31
  createElementVNode("div", { class: "text-center mt-[12px]" }, [
32
32
  createElementVNode(
@@ -1,5 +1,6 @@
1
- import { defineComponent, useModel, useTemplateRef, ref, computed, watch, onUnmounted, openBlock, createElementBlock, createElementVNode, normalizeStyle, createVNode, unref, renderSlot, toDisplayString, createCommentVNode, createBlock, normalizeClass, mergeModels } from 'vue';
2
- import { ElCascader } from 'element-plus';
1
+ import { defineComponent, useModel, useTemplateRef, ref, computed, watch, onUnmounted, openBlock, createElementBlock, createElementVNode, normalizeStyle, createVNode, unref, createSlots, withCtx, renderSlot, toDisplayString, createCommentVNode, createBlock, normalizeClass, mergeModels } from 'vue';
2
+ import { ElCascader, ElIcon } from 'element-plus';
3
+ import { Loading } from '@element-plus/icons-vue';
3
4
  import '../../hooks/index.mjs';
4
5
  import { getOrgTreeSimple, orgTreeDatahandler } from './js/index.mjs';
5
6
  import { useSubscribe } from '../../hooks/useSubscribe.mjs';
@@ -74,13 +75,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
74
75
  default: () => {
75
76
  return true;
76
77
  }
78
+ },
79
+ onVisibleChange: {
80
+ type: Function
77
81
  }
78
82
  }, {
79
83
  "modelValue": { type: [Array, String, Number] },
80
84
  "modelModifiers": {}
81
85
  }),
82
86
  emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
83
- setup(__props, { emit: __emit }) {
87
+ setup(__props, { expose: __expose, emit: __emit }) {
84
88
  const props = __props;
85
89
  const emits = __emit;
86
90
  const { subOrgCascader, unsubOrgCascader } = useSubscribe();
@@ -95,11 +99,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
95
99
  const target = cascaderValueMap.value.get(modelValue.value);
96
100
  return target?.companyName;
97
101
  });
98
- async function getCascaderData() {
99
- loading.value = true;
100
- const data = await getOrgTreeSimple();
101
- handlerData(data || []);
102
- loading.value = false;
102
+ function getCascaderData() {
103
+ return new Promise(async (resolve, reject) => {
104
+ loading.value = true;
105
+ try {
106
+ cascaderOptions.value = [];
107
+ const data = await getOrgTreeSimple();
108
+ handlerData(data || []);
109
+ resolve();
110
+ } catch (err) {
111
+ console.error(err);
112
+ reject();
113
+ }
114
+ loading.value = false;
115
+ });
103
116
  }
104
117
  function handlerData(data) {
105
118
  const { cascaderData, cascaderDataMap } = orgTreeDatahandler(data);
@@ -129,6 +142,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
129
142
  }
130
143
  function onVisibleChangeHandler(type) {
131
144
  focusType.value = type;
145
+ onVisibleChange(type);
132
146
  }
133
147
  if (props.defaultGetData) {
134
148
  getCascaderData();
@@ -153,6 +167,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
153
167
  onUnmounted(() => {
154
168
  unsubOrgCascader(getCascaderData);
155
169
  });
170
+ __expose({
171
+ getData: getCascaderData
172
+ });
156
173
  return (_ctx, _cache) => {
157
174
  return openBlock(), createElementBlock("div", { class: "relative" }, [
158
175
  __props.contentType ? (openBlock(), createElementBlock("div", {
@@ -186,7 +203,30 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
186
203
  "virtual-scroll": "",
187
204
  onChange: onChangeHanlder,
188
205
  onVisibleChange: ($event) => onVisibleChangeHandler($event)
189
- }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "options", "disabled", "clearable", "placeholder", "onVisibleChange"])
206
+ }, createSlots({
207
+ _: 2
208
+ /* DYNAMIC */
209
+ }, [
210
+ loading.value ? {
211
+ name: "empty",
212
+ fn: withCtx(() => [
213
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
214
+ createVNode(unref(ElIcon), {
215
+ size: "16",
216
+ class: "is-loading text-theme"
217
+ }, {
218
+ default: withCtx(() => [
219
+ createVNode(unref(Loading))
220
+ ]),
221
+ _: 1
222
+ /* STABLE */
223
+ }),
224
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
225
+ ])
226
+ ]),
227
+ key: "0"
228
+ } : void 0
229
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "size", "options", "disabled", "clearable", "placeholder", "onVisibleChange"])
190
230
  ],
191
231
  4
192
232
  /* STYLE */
@@ -224,12 +264,32 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
224
264
  filterable: "",
225
265
  "show-all-levels": false,
226
266
  "virtual-scroll": "",
227
- onChange: onChangeHanlder
228
- }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "size", "options", "clearable", "disabled", "placeholder"])),
229
- loading.value ? (openBlock(), createElementBlock("div", {
230
- key: 2,
231
- class: "absolute left-0 right-0 top-0 bottom-0 cursor-wait"
232
- })) : createCommentVNode("v-if", true)
267
+ onChange: onChangeHanlder,
268
+ onVisibleChange: __props.onVisibleChange
269
+ }, createSlots({
270
+ _: 2
271
+ /* DYNAMIC */
272
+ }, [
273
+ loading.value ? {
274
+ name: "empty",
275
+ fn: withCtx(() => [
276
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
277
+ createVNode(unref(ElIcon), {
278
+ size: "16",
279
+ class: "is-loading text-theme"
280
+ }, {
281
+ default: withCtx(() => [
282
+ createVNode(unref(Loading))
283
+ ]),
284
+ _: 1
285
+ /* STABLE */
286
+ }),
287
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
288
+ ])
289
+ ]),
290
+ key: "0"
291
+ } : void 0
292
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "class", "size", "options", "clearable", "disabled", "placeholder", "onVisibleChange"]))
233
293
  ]);
234
294
  };
235
295
  }
@@ -41,8 +41,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
41
41
  };
42
42
  });
43
43
  function switchSelect(target) {
44
- modelValue.value = target[radioProps.value.value];
45
- emits("change", modelValue.value);
44
+ const value = target[radioProps.value.value];
45
+ if (modelValue.value === value) return;
46
+ modelValue.value = value;
47
+ emits("change", value);
46
48
  }
47
49
  async function sliderHandler() {
48
50
  selectIndex.value = props.options.findIndex((item) => {
@@ -53,7 +55,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
53
55
  if (slider) {
54
56
  const proportion = 100 / props.options.length;
55
57
  const left = selectIndex.value > 0 ? selectIndex.value * proportion : 0;
56
- console.log("proportion", proportion, left, selectIndex.value);
57
58
  slider.style.left = `${left}%`;
58
59
  }
59
60
  }
@@ -81,7 +82,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
81
82
  renderList(__props.options, (item, index) => {
82
83
  return openBlock(), createElementBlock("li", {
83
84
  key: index,
84
- class: "w-0 flex-1 flex items-center justify-center text-main clickBox",
85
+ class: "w-0 flex-1 flex items-center justify-center text-main user-select-none clickBox",
85
86
  onClick: ($event) => switchSelect(item, index, $event)
86
87
  }, [
87
88
  renderSlot(_ctx.$slots, "default", {