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.
- package/dist/tailwind.css +51 -13
- package/es/api/organization.mjs +43 -0
- package/es/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.mjs +245 -0
- package/es/bussiness/hyAcquisitionStationTree/index.mjs +7 -0
- package/es/bussiness/hyAcquisitionStationTree/js/index.mjs +124 -0
- package/es/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
- package/es/bussiness/hyDeviceTree/deviceTree.vue.mjs +249 -0
- package/es/bussiness/hyDeviceTree/index.mjs +7 -0
- package/es/bussiness/hyDeviceTree/js/index.mjs +126 -0
- package/es/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
- package/es/bussiness/hyOrgGroupTree/index.mjs +7 -0
- package/es/bussiness/hyOrgGroupTree/js/index.mjs +124 -0
- package/es/bussiness/hyOrgGroupTree/orgGroupTree.vue.mjs +245 -0
- package/es/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
- package/es/bussiness/hyPlanGroupDeviceTree/index.mjs +7 -0
- package/es/bussiness/hyPlanGroupDeviceTree/js/index.mjs +124 -0
- package/es/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.mjs +245 -0
- package/es/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
- package/es/bussiness/hyUserTree/index.mjs +7 -0
- package/es/bussiness/hyUserTree/js/index.mjs +126 -0
- package/es/bussiness/hyUserTree/style/userTree.scss +0 -0
- package/es/bussiness/hyUserTree/userTree.vue.mjs +239 -0
- package/es/bussiness/index.mjs +5 -0
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +183 -149
- package/es/components/hyButton/button.vue.mjs +19 -5
- package/es/components/hyButton/style/button.scss +72 -0
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -2
- package/es/components/hyForm/cpns/formItem.vue.mjs +254 -32
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +8 -1
- package/es/components/hyForm/form.vue.mjs +88 -19
- package/es/components/hyForm/js/index.mjs +2 -1
- package/es/components/hyForm/js/useAppForm.mjs +3 -3
- package/es/components/hyIcon/style/icon.scss +1 -0
- package/es/components/hyMap/js/index.mjs +6 -6
- package/es/components/hyMap/map.vue.mjs +14 -4
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +75 -15
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +5 -4
- package/es/components/hySearch/cpns/searchItem.vue.mjs +434 -206
- package/es/components/hySearch/js/index.mjs +2 -1
- package/es/components/hySearch/search.vue.mjs +71 -10
- package/es/components/hySearch/style/search.scss +7 -0
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +21 -22
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +35 -21
- package/es/components/hyTable/js/index.mjs +16 -17
- package/es/components/hyTable/js/search.mjs +28 -2
- package/es/components/hyTable/style/table.scss +13 -0
- package/es/components/hyTable/table.vue.mjs +55 -22
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +17 -12
- package/es/components/hyTableForm/batchTableForm.vue.mjs +36 -5
- package/es/components/hyTableForm/js/useAppTableForm.mjs +1 -1
- package/es/components/hyTableForm/tableForm.vue.mjs +84 -32
- package/es/components/hyTour/index.mjs +7 -0
- package/es/components/hyTour/style/tour.scss +0 -0
- package/es/components/hyTour/tour.vue.mjs +23 -0
- package/es/components/hyTree/config/tree-config.mjs +5 -2
- package/es/components/hyTree/js/index.mjs +128 -56
- package/es/components/hyTree/tree.vue.mjs +22 -37
- package/es/components/index.mjs +1 -0
- package/es/index.mjs +6 -0
- package/es/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
- package/es/style/element/hy-element.scss +24 -3
- package/es/style/index.scss +0 -1
- package/es/style/tailwind.scss +0 -1
- package/es/style/theme.scss +1 -0
- package/es/utils/is.mjs +3 -1
- package/es/utils/map/hook/bigMap.mjs +11 -1
- package/es/utils/map/hook/gaode.mjs +60 -17
- package/es/utils/map/hook/leafletjs.mjs +25 -4
- package/es/utils/map/index.mjs +1 -1
- package/es/version.mjs +1 -1
- package/lib/api/organization.js +47 -0
- package/lib/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.js +249 -0
- package/lib/bussiness/hyAcquisitionStationTree/index.js +12 -0
- package/lib/bussiness/hyAcquisitionStationTree/js/index.js +126 -0
- package/lib/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
- package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +253 -0
- package/lib/bussiness/hyDeviceTree/index.js +12 -0
- package/lib/bussiness/hyDeviceTree/js/index.js +128 -0
- package/lib/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
- package/lib/bussiness/hyOrgGroupTree/index.js +12 -0
- package/lib/bussiness/hyOrgGroupTree/js/index.js +126 -0
- package/lib/bussiness/hyOrgGroupTree/orgGroupTree.vue.js +249 -0
- package/lib/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/index.js +12 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/js/index.js +126 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.js +249 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
- package/lib/bussiness/hyUserTree/index.js +12 -0
- package/lib/bussiness/hyUserTree/js/index.js +128 -0
- package/lib/bussiness/hyUserTree/style/userTree.scss +0 -0
- package/lib/bussiness/hyUserTree/userTree.vue.js +243 -0
- package/lib/bussiness/index.js +14 -4
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +182 -148
- package/lib/components/hyButton/button.vue.js +18 -4
- package/lib/components/hyButton/style/button.scss +72 -0
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +0 -1
- package/lib/components/hyForm/cpns/formItem.vue.js +250 -28
- package/lib/components/hyForm/cpns/locationSelect.vue.js +8 -1
- package/lib/components/hyForm/form.vue.js +86 -17
- package/lib/components/hyForm/js/index.js +2 -0
- package/lib/components/hyForm/js/useAppForm.js +3 -3
- package/lib/components/hyIcon/style/icon.scss +1 -0
- package/lib/components/hyMap/js/index.js +5 -5
- package/lib/components/hyMap/map.vue.js +13 -3
- package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
- package/lib/components/hyOrgCascader/orgCascader.vue.js +73 -13
- package/lib/components/hyRadioGroup/radioGroup.vue.js +5 -4
- package/lib/components/hySearch/cpns/searchItem.vue.js +431 -203
- package/lib/components/hySearch/js/index.js +2 -0
- package/lib/components/hySearch/search.vue.js +69 -8
- package/lib/components/hySearch/style/search.scss +7 -0
- package/lib/components/hyTable/cpns/columnSelect.vue.js +20 -21
- package/lib/components/hyTable/cpns/virtualTable.vue.js +51 -37
- package/lib/components/hyTable/js/index.js +16 -16
- package/lib/components/hyTable/js/search.js +28 -2
- package/lib/components/hyTable/style/table.scss +13 -0
- package/lib/components/hyTable/table.vue.js +53 -20
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +16 -11
- package/lib/components/hyTableForm/batchTableForm.vue.js +36 -5
- package/lib/components/hyTableForm/js/useAppTableForm.js +1 -1
- package/lib/components/hyTableForm/tableForm.vue.js +85 -33
- package/lib/components/hyTour/index.js +12 -0
- package/lib/components/hyTour/style/tour.scss +0 -0
- package/lib/components/hyTour/tour.vue.js +27 -0
- package/lib/components/hyTree/config/tree-config.js +5 -2
- package/lib/components/hyTree/js/index.js +128 -56
- package/lib/components/hyTree/tree.vue.js +22 -37
- package/lib/components/index.js +8 -6
- package/lib/index.js +67 -55
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
- package/lib/style/element/hy-element.scss +24 -3
- package/lib/style/index.scss +0 -1
- package/lib/style/tailwind.scss +0 -1
- package/lib/style/theme.scss +1 -0
- package/lib/utils/is.js +5 -3
- package/lib/utils/map/hook/bigMap.js +11 -1
- package/lib/utils/map/hook/gaode.js +60 -17
- package/lib/utils/map/hook/leafletjs.js +25 -4
- package/lib/utils/map/index.js +1 -1
- package/lib/version.js +1 -1
- 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 === "
|
|
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
|
|
44
|
+
} else if (/^(extra|location-select)$/.test(column.type)) {
|
|
45
45
|
return {
|
|
46
46
|
...column,
|
|
47
47
|
children: (column.children || []).map((item) => appFormItemHandler(item))
|
|
@@ -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
|
-
|
|
11
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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-[
|
|
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-[
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
},
|
|
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
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
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
|
-
|
|
45
|
-
|
|
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", {
|