vue-devui 1.0.0-pre.0 → 1.0.0-rc.2
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/README.md +126 -187
- package/alert/index.es.js +28 -30
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +67 -82
- package/auto-complete/index.umd.js +3 -1
- package/auto-complete/style.css +1 -1
- package/badge/index.es.js +1 -1
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +39 -40
- package/button/index.umd.js +1 -1
- package/countdown/index.es.js +2 -1
- package/editable-select/index.es.js +122 -163
- package/editable-select/index.umd.js +1 -1
- package/fullscreen/index.es.js +13 -16
- package/fullscreen/index.umd.js +1 -1
- package/icon/index.es.js +39 -57
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +2 -1
- package/modal/index.es.js +81 -76
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +38 -40
- package/notification/index.umd.js +1 -1
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +2 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/tagProps.js +3 -0
- package/overlay/index.es.js +44 -37
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +8 -43
- package/pagination/index.es.js +10 -12
- package/pagination/index.umd.js +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +46 -39
- package/popover/index.umd.js +6 -6
- package/popover/style.css +1 -1
- package/progress/index.es.js +1 -1
- package/progress/index.umd.js +1 -1
- package/progress/style.css +1 -1
- package/radio/index.es.js +11 -11
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/read-tip/index.es.js +6 -3
- package/result/index.es.js +38 -53
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +47 -42
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +2 -5
- package/search/index.umd.js +4 -4
- package/skeleton/index.es.js +17 -17
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +60 -59
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +215 -160
- package/splitter/index.umd.js +11 -11
- package/splitter/style.css +1 -1
- package/status/index.es.js +1 -4
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/tag/index.es.js +15 -18
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/tag-input/index.es.js +4 -2
- package/{accordion → timeline}/index.d.ts +0 -0
- package/{time-axis → timeline}/index.es.js +65 -78
- package/timeline/index.umd.js +1 -0
- package/{anchor → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/upload/index.es.js +38 -40
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +1478 -1196
- package/vue-devui.umd.js +19 -17
- package/accordion/index.es.js +0 -720
- package/accordion/index.umd.js +0 -1
- package/accordion/package.json +0 -7
- package/accordion/style.css +0 -1
- package/anchor/index.d.ts +0 -7
- package/anchor/index.es.js +0 -263
- package/anchor/index.umd.js +0 -1
- package/anchor/style.css +0 -1
- package/back-top/index.d.ts +0 -7
- package/back-top/index.es.js +0 -128
- package/back-top/index.umd.js +0 -1
- package/back-top/package.json +0 -7
- package/back-top/style.css +0 -1
- package/breadcrumb/index.d.ts +0 -7
- package/breadcrumb/index.es.js +0 -127
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/package.json +0 -7
- package/breadcrumb/style.css +0 -1
- package/carousel/index.d.ts +0 -7
- package/carousel/index.es.js +0 -329
- package/carousel/index.umd.js +0 -1
- package/carousel/package.json +0 -7
- package/carousel/style.css +0 -1
- package/cascader/index.d.ts +0 -7
- package/cascader/index.es.js +0 -5963
- package/cascader/index.umd.js +0 -27
- package/cascader/package.json +0 -7
- package/cascader/style.css +0 -1
- package/color-picker/index.d.ts +0 -7
- package/color-picker/index.es.js +0 -8187
- package/color-picker/index.umd.js +0 -27
- package/color-picker/package.json +0 -7
- package/color-picker/style.css +0 -1
- package/date-picker/index.d.ts +0 -7
- package/date-picker/index.es.js +0 -1171
- package/date-picker/index.umd.js +0 -1
- package/date-picker/package.json +0 -7
- package/date-picker/style.css +0 -1
- package/dragdrop/index.d.ts +0 -7
- package/dragdrop/index.es.js +0 -157
- package/dragdrop/index.umd.js +0 -1
- package/dragdrop/package.json +0 -7
- package/drawer/index.d.ts +0 -7
- package/drawer/index.es.js +0 -234
- package/drawer/index.umd.js +0 -1
- package/drawer/package.json +0 -7
- package/drawer/style.css +0 -1
- package/dropdown/index.d.ts +0 -7
- package/dropdown/index.es.js +0 -638
- package/dropdown/index.umd.js +0 -1
- package/dropdown/package.json +0 -7
- package/dropdown/style.css +0 -1
- package/form/index.d.ts +0 -7
- package/form/index.es.js +0 -7865
- package/form/index.umd.js +0 -27
- package/form/package.json +0 -7
- package/form/style.css +0 -1
- package/gantt/index.d.ts +0 -7
- package/gantt/index.es.js +0 -523
- package/gantt/index.umd.js +0 -1
- package/gantt/package.json +0 -7
- package/gantt/style.css +0 -1
- package/input-icon/index.d.ts +0 -7
- package/input-icon/index.es.js +0 -331
- package/input-icon/index.umd.js +0 -1
- package/input-icon/package.json +0 -7
- package/input-icon/style.css +0 -1
- package/input-number/index.d.ts +0 -7
- package/input-number/index.es.js +0 -240
- package/input-number/index.umd.js +0 -1
- package/input-number/package.json +0 -7
- package/input-number/style.css +0 -1
- package/list/index.d.ts +0 -7
- package/list/index.es.js +0 -39
- package/list/index.umd.js +0 -1
- package/list/package.json +0 -7
- package/list/style.css +0 -1
- package/nav-sprite/index.d.ts +0 -7
- package/nav-sprite/index.es.js +0 -68
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/nuxt/components/Accordion.js +0 -3
- package/nuxt/components/Anchor.js +0 -3
- package/nuxt/components/BackTop.js +0 -3
- package/nuxt/components/Breadcrumb.js +0 -3
- package/nuxt/components/Carousel.js +0 -3
- package/nuxt/components/CarouselItem.js +0 -3
- package/nuxt/components/Cascader.js +0 -3
- package/nuxt/components/ColorPicker.js +0 -3
- package/nuxt/components/Column.js +0 -3
- package/nuxt/components/DatePicker.js +0 -3
- package/nuxt/components/Drawer.js +0 -3
- package/nuxt/components/DrawerService.js +0 -3
- package/nuxt/components/Dropdown.js +0 -3
- package/nuxt/components/DropdownMenu.js +0 -3
- package/nuxt/components/Form.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormItem.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/FormOperation.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/InputNumber.js +0 -3
- package/nuxt/components/List.js +0 -3
- package/nuxt/components/ListItem.js +0 -3
- package/nuxt/components/NavSprite.js +0 -2
- package/nuxt/components/QuadrantDiagram.js +0 -3
- package/nuxt/components/Select.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/StickSlider.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/Table.js +0 -3
- package/nuxt/components/Tabs.js +0 -3
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/TimePicker.js +0 -3
- package/nuxt/components/Tooltip.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/Tree.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/nuxt/components/dropdownMenuProps.js +0 -3
- package/nuxt/components/tooltipProps.js +0 -3
- package/quadrant-diagram/index.d.ts +0 -7
- package/quadrant-diagram/index.es.js +0 -5728
- package/quadrant-diagram/index.umd.js +0 -27
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/select/index.d.ts +0 -7
- package/select/index.es.js +0 -706
- package/select/index.umd.js +0 -1
- package/select/package.json +0 -7
- package/select/style.css +0 -1
- package/steps-guide/index.d.ts +0 -7
- package/steps-guide/index.es.js +0 -239
- package/steps-guide/index.umd.js +0 -1
- package/steps-guide/package.json +0 -7
- package/steps-guide/style.css +0 -1
- package/sticky/index.d.ts +0 -7
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/sticky/package.json +0 -7
- package/table/index.d.ts +0 -7
- package/table/index.es.js +0 -1969
- package/table/index.umd.js +0 -1
- package/table/package.json +0 -7
- package/table/style.css +0 -1
- package/tabs/index.d.ts +0 -7
- package/tabs/index.es.js +0 -194
- package/tabs/index.umd.js +0 -1
- package/tabs/package.json +0 -7
- package/tabs/style.css +0 -1
- package/time-axis/index.d.ts +0 -7
- package/time-axis/index.umd.js +0 -1
- package/time-axis/package.json +0 -7
- package/time-axis/style.css +0 -1
- package/time-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1237
- package/time-picker/index.umd.js +0 -1
- package/time-picker/package.json +0 -7
- package/time-picker/style.css +0 -1
- package/tooltip/index.d.ts +0 -7
- package/tooltip/index.es.js +0 -5828
- package/tooltip/index.umd.js +0 -27
- package/tooltip/package.json +0 -7
- package/tooltip/style.css +0 -1
- package/transfer/index.d.ts +0 -7
- package/transfer/index.es.js +0 -7608
- package/transfer/index.umd.js +0 -27
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree/index.d.ts +0 -7
- package/tree/index.es.js +0 -6490
- package/tree/index.umd.js +0 -27
- package/tree/package.json +0 -7
- package/tree/style.css +0 -1
- package/tree-select/index.d.ts +0 -7
- package/tree-select/index.es.js +0 -623
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/vue-devui.es.js
CHANGED
|
@@ -33,9 +33,9 @@ var __publicField = (obj, key, value) => {
|
|
|
33
33
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
34
|
return value;
|
|
35
35
|
};
|
|
36
|
-
import { createVNode, getCurrentInstance, defineComponent, toRefs, inject, computed, Fragment, mergeProps, resolveComponent, isVNode, createTextVNode, provide, onMounted, watch, ref, Transition, withDirectives, vShow, nextTick, h, render, resolveDirective,
|
|
36
|
+
import { createVNode, getCurrentInstance, defineComponent, toRefs, inject, computed, Fragment, mergeProps, resolveComponent, isVNode, createTextVNode, provide, onMounted, watch, ref, Transition, withDirectives, vShow, nextTick, h, render, resolveDirective, unref, onUnmounted, Teleport, onBeforeUnmount, Comment as Comment$1, reactive, toRef, onUpdated, onBeforeMount, readonly, createApp, renderSlot, withModifiers, useSlots, shallowRef } from "vue";
|
|
37
37
|
import { useRoute } from "vue-router";
|
|
38
|
-
import { offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
|
|
38
|
+
import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
|
|
39
39
|
import { onClickOutside } from "@vueuse/core";
|
|
40
40
|
const accordionProps = {
|
|
41
41
|
data: {
|
|
@@ -150,16 +150,18 @@ var DAccordionMenu = defineComponent({
|
|
|
150
150
|
accordionCtx.menuToggleFn(itemEvent);
|
|
151
151
|
};
|
|
152
152
|
const hasActiveChildren = (item3) => {
|
|
153
|
-
if (item3[activeKey.value] === true)
|
|
153
|
+
if (item3[activeKey.value] === true) {
|
|
154
154
|
return true;
|
|
155
|
+
}
|
|
155
156
|
if (item3[childrenKey.value]) {
|
|
156
157
|
return hasChildActive(item3[childrenKey.value]);
|
|
157
158
|
}
|
|
158
159
|
};
|
|
159
160
|
const hasChildActive = (arr) => {
|
|
160
161
|
let flag = false;
|
|
161
|
-
if (!arr.length)
|
|
162
|
+
if (!arr.length) {
|
|
162
163
|
return false;
|
|
164
|
+
}
|
|
163
165
|
for (let i = 0; i < arr.length; i++) {
|
|
164
166
|
if (arr[i][activeKey.value] === true) {
|
|
165
167
|
flag = true;
|
|
@@ -167,8 +169,9 @@ var DAccordionMenu = defineComponent({
|
|
|
167
169
|
}
|
|
168
170
|
if (arr[i][childrenKey.value]) {
|
|
169
171
|
flag = hasChildActive(arr[i][childrenKey.value]);
|
|
170
|
-
if (flag)
|
|
172
|
+
if (flag) {
|
|
171
173
|
break;
|
|
174
|
+
}
|
|
172
175
|
}
|
|
173
176
|
}
|
|
174
177
|
return flag;
|
|
@@ -750,7 +753,7 @@ const AlertCloseIcon = () => createVNode("svg", {
|
|
|
750
753
|
"transform": "translate(-3.000000, -3.000000)",
|
|
751
754
|
"fill-rule": "nonzero"
|
|
752
755
|
}, [createVNode("path", {
|
|
753
|
-
"d": "M11.6426,3.19816936 C11.9239974,2.91574512 12.4131626,2.93784891
|
|
756
|
+
"d": "M11.6426,3.19816936 C11.9239974,2.91574512 12.4131626,2.93784891 12.7352108,3.24751057 C13.0571998,3.5572302 13.0901298,4.03723416 12.8087324,4.31965839 L9.14064666,7.99900183 L12.8087324,11.6803416 C13.0645482,11.9370909 13.0605893,12.3571292 12.8158402,12.6640749 L12.7352108,12.7524894 C12.4131626,13.0621511 11.9239974,13.0842548 11.6426,12.8018306 L8,9.14489021 L4.35740003,12.8018306 C4.10158422,13.05858 3.6740594,13.0636532 3.35648225,12.8298003 L3.26478919,12.7524894 C2.94280021,12.4427698 2.90987023,11.9627658 3.19126762,11.6803416 L6.8583349,7.99900183 L3.19126762,4.31965839 C2.93545181,4.06290908 2.93941068,3.64287076 3.18415975,3.3359251 L3.26478919,3.24751057 C3.58683735,2.93784891 4.07600264,2.91574512 4.35740003,3.19816936 L8,6.85411161 L11.6426,3.19816936 Z"
|
|
754
757
|
}, null)])])]);
|
|
755
758
|
const AlertTypeIcon = (props) => createVNode("svg", {
|
|
756
759
|
"width": "16px",
|
|
@@ -783,12 +786,12 @@ const AlertTypeIcon = (props) => createVNode("svg", {
|
|
|
783
786
|
"fill-rule": "evenodd"
|
|
784
787
|
}, [createVNode("path", {
|
|
785
788
|
"class": "devui-icon-warning-outer",
|
|
786
|
-
"d": "M8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117
|
|
789
|
+
"d": "M8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 Z"
|
|
787
790
|
}, null), createVNode("path", {
|
|
788
791
|
"class": "devui-icon-warning-inner",
|
|
789
792
|
"stroke-width": "0.3",
|
|
790
793
|
"fill-rule": "nonzero",
|
|
791
|
-
"d": "M8.87894737,13 L7.08947368,13 L7.08947368,11.2105263 L8.87894737,11.2105263
|
|
794
|
+
"d": "M8.87894737,13 L7.08947368,13 L7.08947368,11.2105263 L8.87894737,11.2105263 L8.87894737,13 Z M8.62102372,9.86842105 L7.32800539,9.86842105 L7,4.5 L8.96842105,4.5 L8.62102372,9.86842105 Z"
|
|
792
795
|
}, null)]);
|
|
793
796
|
case "info":
|
|
794
797
|
return createVNode("g", {
|
|
@@ -826,31 +829,32 @@ const AlertTypeIcon = (props) => createVNode("svg", {
|
|
|
826
829
|
return null;
|
|
827
830
|
}
|
|
828
831
|
})()]);
|
|
832
|
+
const alertProps = {
|
|
833
|
+
type: {
|
|
834
|
+
type: String,
|
|
835
|
+
default: "info"
|
|
836
|
+
},
|
|
837
|
+
cssClass: {
|
|
838
|
+
type: String,
|
|
839
|
+
default: ""
|
|
840
|
+
},
|
|
841
|
+
closeable: {
|
|
842
|
+
type: Boolean,
|
|
843
|
+
default: true
|
|
844
|
+
},
|
|
845
|
+
showIcon: {
|
|
846
|
+
type: Boolean,
|
|
847
|
+
default: true
|
|
848
|
+
},
|
|
849
|
+
dismissTime: {
|
|
850
|
+
type: Number,
|
|
851
|
+
default: 0
|
|
852
|
+
}
|
|
853
|
+
};
|
|
829
854
|
var alert$1 = "";
|
|
830
855
|
var Alert = defineComponent({
|
|
831
856
|
name: "DAlert",
|
|
832
|
-
props:
|
|
833
|
-
type: {
|
|
834
|
-
type: String,
|
|
835
|
-
default: "info"
|
|
836
|
-
},
|
|
837
|
-
cssClass: {
|
|
838
|
-
type: String,
|
|
839
|
-
default: ""
|
|
840
|
-
},
|
|
841
|
-
closeable: {
|
|
842
|
-
type: Boolean,
|
|
843
|
-
default: true
|
|
844
|
-
},
|
|
845
|
-
showIcon: {
|
|
846
|
-
type: Boolean,
|
|
847
|
-
default: true
|
|
848
|
-
},
|
|
849
|
-
dismissTime: {
|
|
850
|
-
type: Number,
|
|
851
|
-
default: 0
|
|
852
|
-
}
|
|
853
|
-
},
|
|
857
|
+
props: alertProps,
|
|
854
858
|
emits: ["close"],
|
|
855
859
|
setup(props, ctx2) {
|
|
856
860
|
const hide = ref(false);
|
|
@@ -897,15 +901,12 @@ var Alert = defineComponent({
|
|
|
897
901
|
};
|
|
898
902
|
}
|
|
899
903
|
});
|
|
900
|
-
Alert.install = function(app) {
|
|
901
|
-
app.component(Alert.name, Alert);
|
|
902
|
-
};
|
|
903
904
|
var AlertInstall = {
|
|
904
905
|
title: "Alert \u8B66\u544A",
|
|
905
906
|
category: "\u53CD\u9988",
|
|
906
907
|
status: "100%",
|
|
907
908
|
install(app) {
|
|
908
|
-
app.
|
|
909
|
+
app.component(Alert.name, Alert);
|
|
909
910
|
}
|
|
910
911
|
};
|
|
911
912
|
var Anchor = defineComponent({
|
|
@@ -1184,18 +1185,9 @@ const autoCompleteProps = {
|
|
|
1184
1185
|
type: Boolean,
|
|
1185
1186
|
default: false
|
|
1186
1187
|
},
|
|
1187
|
-
|
|
1188
|
-
type:
|
|
1189
|
-
default:
|
|
1190
|
-
},
|
|
1191
|
-
appendToBodyDirections: {
|
|
1192
|
-
type: Object,
|
|
1193
|
-
default: () => ({
|
|
1194
|
-
originX: "left",
|
|
1195
|
-
originY: "bottom",
|
|
1196
|
-
overlayX: "left",
|
|
1197
|
-
overlayY: "top"
|
|
1198
|
-
})
|
|
1188
|
+
position: {
|
|
1189
|
+
type: Array,
|
|
1190
|
+
default: ["bottom-end"]
|
|
1199
1191
|
},
|
|
1200
1192
|
disabled: {
|
|
1201
1193
|
type: Boolean,
|
|
@@ -1241,9 +1233,9 @@ const autoCompleteProps = {
|
|
|
1241
1233
|
type: Boolean,
|
|
1242
1234
|
default: false
|
|
1243
1235
|
},
|
|
1244
|
-
|
|
1236
|
+
width: {
|
|
1245
1237
|
type: Number,
|
|
1246
|
-
default:
|
|
1238
|
+
default: 400
|
|
1247
1239
|
},
|
|
1248
1240
|
showAnimation: {
|
|
1249
1241
|
type: Boolean,
|
|
@@ -1270,32 +1262,32 @@ const DropdownPropsKey = Symbol("DropdownPropsKey");
|
|
|
1270
1262
|
function useCustomTemplate(ctx2, modelValue) {
|
|
1271
1263
|
const itemTemplate = (item2, index2) => {
|
|
1272
1264
|
const arr = { item: item2, index: index2 };
|
|
1273
|
-
if (ctx2.slots.
|
|
1274
|
-
return ctx2.slots.
|
|
1265
|
+
if (ctx2.slots.item) {
|
|
1266
|
+
return ctx2.slots.item(arr);
|
|
1275
1267
|
}
|
|
1276
1268
|
return null;
|
|
1277
1269
|
};
|
|
1278
1270
|
const noResultItemTemplate = () => {
|
|
1279
|
-
if (ctx2.slots.
|
|
1280
|
-
return ctx2.slots.
|
|
1271
|
+
if (ctx2.slots.nothing) {
|
|
1272
|
+
return ctx2.slots.nothing(modelValue.value);
|
|
1281
1273
|
}
|
|
1282
1274
|
return null;
|
|
1283
1275
|
};
|
|
1284
1276
|
const searchingTemplate = () => {
|
|
1285
|
-
if (ctx2.slots.
|
|
1286
|
-
return ctx2.slots.
|
|
1277
|
+
if (ctx2.slots.searching) {
|
|
1278
|
+
return ctx2.slots.searching(modelValue.value);
|
|
1287
1279
|
}
|
|
1288
1280
|
return null;
|
|
1289
1281
|
};
|
|
1290
1282
|
const customRenderSolts = () => {
|
|
1291
1283
|
const slots = {};
|
|
1292
|
-
if (ctx2.slots.
|
|
1284
|
+
if (ctx2.slots.item) {
|
|
1293
1285
|
slots["itemTemplate"] = itemTemplate;
|
|
1294
1286
|
}
|
|
1295
|
-
if (ctx2.slots.
|
|
1287
|
+
if (ctx2.slots.nothing) {
|
|
1296
1288
|
slots["noResultItemTemplate"] = noResultItemTemplate;
|
|
1297
1289
|
}
|
|
1298
|
-
if (ctx2.slots.
|
|
1290
|
+
if (ctx2.slots.searching) {
|
|
1299
1291
|
slots["searchingTemplate"] = searchingTemplate;
|
|
1300
1292
|
}
|
|
1301
1293
|
return slots;
|
|
@@ -1303,10 +1295,10 @@ function useCustomTemplate(ctx2, modelValue) {
|
|
|
1303
1295
|
return { customRenderSolts };
|
|
1304
1296
|
}
|
|
1305
1297
|
function useSearchFn(ctx2, allowEmptyValueSearch, source, searchFn, formatter) {
|
|
1306
|
-
const searchList = ref(
|
|
1298
|
+
const searchList = ref();
|
|
1307
1299
|
const showNoResultItemTemplate = ref(false);
|
|
1308
1300
|
const handleSearch = async (term, enableLazyLoad) => {
|
|
1309
|
-
if (term
|
|
1301
|
+
if (term === "" && !allowEmptyValueSearch.value) {
|
|
1310
1302
|
searchList.value = [];
|
|
1311
1303
|
showNoResultItemTemplate.value = false;
|
|
1312
1304
|
return;
|
|
@@ -1327,7 +1319,7 @@ function useSearchFn(ctx2, allowEmptyValueSearch, source, searchFn, formatter) {
|
|
|
1327
1319
|
arr = await searchFn.value(term);
|
|
1328
1320
|
}
|
|
1329
1321
|
searchList.value = arr;
|
|
1330
|
-
if (searchList.value.length
|
|
1322
|
+
if (searchList.value.length === 0) {
|
|
1331
1323
|
showNoResultItemTemplate.value = true;
|
|
1332
1324
|
} else {
|
|
1333
1325
|
showNoResultItemTemplate.value = false;
|
|
@@ -1390,7 +1382,7 @@ function useInputHandle(ctx2, searchList, showNoResultItemTemplate, modelValue,
|
|
|
1390
1382
|
handleClose();
|
|
1391
1383
|
} else {
|
|
1392
1384
|
visible.value = true;
|
|
1393
|
-
if (ctx2.slots.noResultItemTemplate && searchList.value.length
|
|
1385
|
+
if (ctx2.slots.noResultItemTemplate && searchList.value.length === 0 && modelValue.value.trim() !== "") {
|
|
1394
1386
|
showNoResultItemTemplate.value = true;
|
|
1395
1387
|
}
|
|
1396
1388
|
}
|
|
@@ -1409,11 +1401,11 @@ function useInputHandle(ctx2, searchList, showNoResultItemTemplate, modelValue,
|
|
|
1409
1401
|
function useSelectHandle(ctx2, searchList, selectValue, handleSearch, formatter, handleClose) {
|
|
1410
1402
|
const selectedIndex = ref(0);
|
|
1411
1403
|
const getListIndex = (item2) => {
|
|
1412
|
-
if (searchList.value.length
|
|
1404
|
+
if (searchList.value.length === 0) {
|
|
1413
1405
|
return 0;
|
|
1414
1406
|
}
|
|
1415
1407
|
const ind = searchList.value.indexOf(item2);
|
|
1416
|
-
return ind
|
|
1408
|
+
return ind === -1 ? 0 : ind;
|
|
1417
1409
|
};
|
|
1418
1410
|
const selectOptionClick = async (item2) => {
|
|
1419
1411
|
const cur = formatter.value(item2);
|
|
@@ -1421,7 +1413,7 @@ function useSelectHandle(ctx2, searchList, selectValue, handleSearch, formatter,
|
|
|
1421
1413
|
handleClose();
|
|
1422
1414
|
await handleSearch(cur);
|
|
1423
1415
|
selectedIndex.value = getListIndex(cur);
|
|
1424
|
-
selectValue.value && selectValue.value();
|
|
1416
|
+
selectValue.value && selectValue.value(cur);
|
|
1425
1417
|
};
|
|
1426
1418
|
return {
|
|
1427
1419
|
selectedIndex,
|
|
@@ -1432,8 +1424,9 @@ function useLazyHandle(props, ctx2, handleSearch) {
|
|
|
1432
1424
|
const showLoading = ref(false);
|
|
1433
1425
|
const dropDownRef = ref();
|
|
1434
1426
|
const loadMore = () => {
|
|
1435
|
-
if (!props.enableLazyLoad && showLoading)
|
|
1427
|
+
if (!props.enableLazyLoad && showLoading) {
|
|
1436
1428
|
return;
|
|
1429
|
+
}
|
|
1437
1430
|
const dropDownValue = dropDownRef.value;
|
|
1438
1431
|
const height = dropDownValue.scrollHeight;
|
|
1439
1432
|
const scrollTop = dropDownValue.clientHeight + dropDownValue.scrollTop;
|
|
@@ -1514,7 +1507,7 @@ class View {
|
|
|
1514
1507
|
__publicField(this, "left", "50%");
|
|
1515
1508
|
}
|
|
1516
1509
|
}
|
|
1517
|
-
const componentProps
|
|
1510
|
+
const componentProps = {
|
|
1518
1511
|
message: String,
|
|
1519
1512
|
backdrop: Boolean,
|
|
1520
1513
|
view: {
|
|
@@ -1542,7 +1535,7 @@ var loading$1 = "";
|
|
|
1542
1535
|
var Loading = defineComponent({
|
|
1543
1536
|
name: "DLoading",
|
|
1544
1537
|
inheritAttrs: false,
|
|
1545
|
-
props: componentProps
|
|
1538
|
+
props: componentProps,
|
|
1546
1539
|
setup(props) {
|
|
1547
1540
|
const style2 = {
|
|
1548
1541
|
top: props.view.top,
|
|
@@ -1728,7 +1721,6 @@ var DAutoCompleteDropdown = defineComponent({
|
|
|
1728
1721
|
const {
|
|
1729
1722
|
disabled,
|
|
1730
1723
|
maxHeight,
|
|
1731
|
-
appendToBody,
|
|
1732
1724
|
formatter,
|
|
1733
1725
|
disabledKey,
|
|
1734
1726
|
isSearching
|
|
@@ -1741,7 +1733,7 @@ var DAutoCompleteDropdown = defineComponent({
|
|
|
1741
1733
|
};
|
|
1742
1734
|
return () => {
|
|
1743
1735
|
return withDirectives(createVNode("div", {
|
|
1744
|
-
"class": ["devui-dropdown-menu",
|
|
1736
|
+
"class": ["devui-dropdown-menu", "devui-dropdown-menu-cdk", disabled && "disabled", latestSource.value && "devui-dropdown-latestSource"]
|
|
1745
1737
|
}, [createVNode("ul", {
|
|
1746
1738
|
"ref": dropDownRef,
|
|
1747
1739
|
"class": "devui-list-unstyled scroll-height",
|
|
@@ -1749,28 +1741,28 @@ var DAutoCompleteDropdown = defineComponent({
|
|
|
1749
1741
|
maxHeight: `${maxHeight}px`
|
|
1750
1742
|
},
|
|
1751
1743
|
"onScroll": loadMore
|
|
1752
|
-
}, [isSearching && ctx2.slots.searchingTemplate && searchStatus.value && createVNode("li", {
|
|
1744
|
+
}, [isSearching && ctx2.slots.searchingTemplate && (searchStatus == null ? void 0 : searchStatus.value) && createVNode("li", {
|
|
1753
1745
|
"class": "devui-is-searching-template"
|
|
1754
1746
|
}, [createVNode("div", {
|
|
1755
1747
|
"class": "devui-no-data-tip"
|
|
1756
1748
|
}, [ctx2.slots.searchingTemplate()])]), latestSource.value && !modelValue.value && createVNode("li", {
|
|
1757
1749
|
"class": "devui-popup-tips"
|
|
1758
|
-
}, [createTextVNode("\u6700\u8FD1\u8F93\u5165")]), !showNoResultItemTemplate.value && !searchStatus.value && searchList != null && searchList.value.length > 0 && searchList.value.map((item2, index2) => {
|
|
1750
|
+
}, [createTextVNode("\u6700\u8FD1\u8F93\u5165")]), !showNoResultItemTemplate.value && !(searchStatus == null ? void 0 : searchStatus.value) && searchList != null && searchList.value.length > 0 && searchList.value.map((item2, index2) => {
|
|
1759
1751
|
return createVNode("li", {
|
|
1760
1752
|
"onClick": () => onSelect(item2),
|
|
1761
|
-
"class": ["devui-dropdown-item", selectedIndex.value
|
|
1753
|
+
"class": ["devui-dropdown-item", selectedIndex.value === index2 && "selected", {
|
|
1762
1754
|
"disabled": disabledKey && item2[disabledKey]
|
|
1763
1755
|
}, {
|
|
1764
|
-
"devui-dropdown-bg": hoverIndex.value
|
|
1756
|
+
"devui-dropdown-bg": hoverIndex.value === index2
|
|
1765
1757
|
}],
|
|
1766
1758
|
"title": formatter(item2),
|
|
1767
1759
|
"key": formatter(item2)
|
|
1768
1760
|
}, [ctx2.slots.itemTemplate ? ctx2.slots.itemTemplate(item2, index2) : formatter(item2)]);
|
|
1769
|
-
}), !searchStatus.value && searchList.value.length
|
|
1761
|
+
}), !(searchStatus == null ? void 0 : searchStatus.value) && searchList.value.length === 0 && ctx2.slots.noResultItemTemplate && showNoResultItemTemplate.value && createVNode("li", {
|
|
1770
1762
|
"class": "devui-no-result-template"
|
|
1771
1763
|
}, [createVNode("div", {
|
|
1772
1764
|
"class": "devui-no-data-tip"
|
|
1773
|
-
}, [ctx2.slots.noResultItemTemplate()])])])]), [[resolveDirective("dLoading"), showLoading.value], [vShow, visible.value && searchList.value.length > 0 || ctx2.slots.noResultItemTemplate && showNoResultItemTemplate.value || isSearching && ctx2.slots.searchingTemplate && searchStatus.value]]);
|
|
1765
|
+
}, [ctx2.slots.noResultItemTemplate()])])])]), [[resolveDirective("dLoading"), showLoading.value], [vShow, visible.value && searchList.value.length > 0 || ctx2.slots.noResultItemTemplate && showNoResultItemTemplate.value || isSearching && ctx2.slots.searchingTemplate && (searchStatus == null ? void 0 : searchStatus.value)]]);
|
|
1774
1766
|
};
|
|
1775
1767
|
}
|
|
1776
1768
|
});
|
|
@@ -1839,40 +1831,6 @@ const clickoutsideDirective = {
|
|
|
1839
1831
|
delete el[ctx];
|
|
1840
1832
|
}
|
|
1841
1833
|
};
|
|
1842
|
-
const overlayProps = {
|
|
1843
|
-
visible: {
|
|
1844
|
-
type: Boolean
|
|
1845
|
-
},
|
|
1846
|
-
backgroundBlock: {
|
|
1847
|
-
type: Boolean,
|
|
1848
|
-
default: false
|
|
1849
|
-
},
|
|
1850
|
-
backgroundClass: {
|
|
1851
|
-
type: String,
|
|
1852
|
-
default: ""
|
|
1853
|
-
},
|
|
1854
|
-
backgroundStyle: {
|
|
1855
|
-
type: [String, Object]
|
|
1856
|
-
},
|
|
1857
|
-
onBackdropClick: {
|
|
1858
|
-
type: Function
|
|
1859
|
-
},
|
|
1860
|
-
backdropClose: {
|
|
1861
|
-
type: Boolean,
|
|
1862
|
-
default: true
|
|
1863
|
-
},
|
|
1864
|
-
hasBackdrop: {
|
|
1865
|
-
type: Boolean,
|
|
1866
|
-
default: true
|
|
1867
|
-
}
|
|
1868
|
-
};
|
|
1869
|
-
const overlayEmits = ["update:visible", "backdropClick"];
|
|
1870
|
-
const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
1871
|
-
overlayStyle: {
|
|
1872
|
-
type: [String, Object],
|
|
1873
|
-
default: void 0
|
|
1874
|
-
}
|
|
1875
|
-
});
|
|
1876
1834
|
const flexibleOverlayProps = {
|
|
1877
1835
|
modelValue: {
|
|
1878
1836
|
type: Boolean,
|
|
@@ -1956,6 +1914,7 @@ function useOverlay(props, emit) {
|
|
|
1956
1914
|
const overlayEl = unref(overlayRef.value);
|
|
1957
1915
|
const arrowEl = unref(arrowRef.value);
|
|
1958
1916
|
const middleware = [
|
|
1917
|
+
shift(),
|
|
1959
1918
|
offset(props.offset),
|
|
1960
1919
|
autoPlacement({
|
|
1961
1920
|
alignment: props.align,
|
|
@@ -1990,7 +1949,7 @@ function useOverlay(props, emit) {
|
|
|
1990
1949
|
originParent !== window && window.removeEventListener("scroll", updatePosition);
|
|
1991
1950
|
window.removeEventListener("resize", updatePosition);
|
|
1992
1951
|
});
|
|
1993
|
-
return { arrowRef, overlayRef };
|
|
1952
|
+
return { arrowRef, overlayRef, updatePosition };
|
|
1994
1953
|
}
|
|
1995
1954
|
var flexibleOverlay = "";
|
|
1996
1955
|
const FlexibleOverlay = defineComponent({
|
|
@@ -2001,12 +1960,17 @@ const FlexibleOverlay = defineComponent({
|
|
|
2001
1960
|
setup(props, {
|
|
2002
1961
|
slots,
|
|
2003
1962
|
attrs,
|
|
2004
|
-
emit
|
|
1963
|
+
emit,
|
|
1964
|
+
expose
|
|
2005
1965
|
}) {
|
|
2006
1966
|
const {
|
|
2007
1967
|
arrowRef,
|
|
2008
|
-
overlayRef
|
|
1968
|
+
overlayRef,
|
|
1969
|
+
updatePosition
|
|
2009
1970
|
} = useOverlay(props, emit);
|
|
1971
|
+
expose({
|
|
1972
|
+
updatePosition
|
|
1973
|
+
});
|
|
2010
1974
|
return () => {
|
|
2011
1975
|
var _a;
|
|
2012
1976
|
return props.modelValue && createVNode("div", mergeProps({
|
|
@@ -2033,8 +1997,7 @@ var AutoComplete = defineComponent({
|
|
|
2033
1997
|
const {
|
|
2034
1998
|
disabled,
|
|
2035
1999
|
modelValue,
|
|
2036
|
-
|
|
2037
|
-
dAutoCompleteWidth,
|
|
2000
|
+
width,
|
|
2038
2001
|
delay,
|
|
2039
2002
|
allowEmptyValueSearch,
|
|
2040
2003
|
formatter,
|
|
@@ -2042,7 +2005,7 @@ var AutoComplete = defineComponent({
|
|
|
2042
2005
|
selectValue,
|
|
2043
2006
|
source,
|
|
2044
2007
|
searchFn,
|
|
2045
|
-
|
|
2008
|
+
position,
|
|
2046
2009
|
latestSource,
|
|
2047
2010
|
showAnimation
|
|
2048
2011
|
} = toRefs(props);
|
|
@@ -2094,51 +2057,40 @@ var AutoComplete = defineComponent({
|
|
|
2094
2057
|
hoverIndex
|
|
2095
2058
|
});
|
|
2096
2059
|
const origin = ref();
|
|
2097
|
-
const position = reactive({
|
|
2098
|
-
appendToBodyDirections: {}
|
|
2099
|
-
});
|
|
2100
|
-
position.appendToBodyDirections = appendToBodyDirections;
|
|
2101
2060
|
const renderDropdown = () => {
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
"position": position.appendToBodyDirections,
|
|
2108
|
-
"visible": visible.value,
|
|
2109
|
-
"onUpdate:visible": ($event) => visible.value = $event
|
|
2110
|
-
}, {
|
|
2111
|
-
default: () => [createVNode("div", {
|
|
2112
|
-
"class": "devui-dropdown devui-auto-complete-menu",
|
|
2113
|
-
"style": {
|
|
2114
|
-
width: dAutoCompleteWidth.value > 0 && dAutoCompleteWidth.value + "px"
|
|
2115
|
-
}
|
|
2116
|
-
}, [createVNode(DAutoCompleteDropdown, null, _isSlot$6(_slot = customRenderSolts()) ? _slot : {
|
|
2117
|
-
default: () => [_slot]
|
|
2118
|
-
})])]
|
|
2119
|
-
});
|
|
2120
|
-
} else {
|
|
2121
|
-
let _slot2;
|
|
2122
|
-
return createVNode("div", {
|
|
2123
|
-
"class": "devui-dropdown",
|
|
2124
|
-
"style": {
|
|
2125
|
-
width: dAutoCompleteWidth.value > 0 && dAutoCompleteWidth.value + "px"
|
|
2126
|
-
}
|
|
2127
|
-
}, [createVNode(Transition, {
|
|
2061
|
+
let _slot;
|
|
2062
|
+
return createVNode(Teleport, {
|
|
2063
|
+
"to": "body"
|
|
2064
|
+
}, {
|
|
2065
|
+
default: () => [createVNode(Transition, {
|
|
2128
2066
|
"name": showAnimation ? "fade" : ""
|
|
2129
2067
|
}, {
|
|
2130
|
-
default: () => [createVNode(
|
|
2131
|
-
|
|
2068
|
+
default: () => [createVNode(FlexibleOverlay, {
|
|
2069
|
+
"origin": origin.value,
|
|
2070
|
+
"position": position.value,
|
|
2071
|
+
"modelValue": visible.value,
|
|
2072
|
+
"onUpdate:modelValue": ($event) => visible.value = $event
|
|
2073
|
+
}, {
|
|
2074
|
+
default: () => [createVNode("div", {
|
|
2075
|
+
"class": "devui-auto-complete-menu",
|
|
2076
|
+
"style": {
|
|
2077
|
+
width: `
|
|
2078
|
+
${width.value + "px"}
|
|
2079
|
+
`
|
|
2080
|
+
}
|
|
2081
|
+
}, [createVNode(DAutoCompleteDropdown, null, _isSlot$6(_slot = customRenderSolts()) ? _slot : {
|
|
2082
|
+
default: () => [_slot]
|
|
2083
|
+
})])]
|
|
2132
2084
|
})]
|
|
2133
|
-
})]
|
|
2134
|
-
}
|
|
2085
|
+
})]
|
|
2086
|
+
});
|
|
2135
2087
|
};
|
|
2136
2088
|
return () => {
|
|
2137
2089
|
return withDirectives(createVNode("div", {
|
|
2138
2090
|
"class": ["devui-auto-complete", "devui-form-group", "devui-has-feedback", visible.value && "devui-select-open"],
|
|
2139
2091
|
"ref": origin,
|
|
2140
2092
|
"style": {
|
|
2141
|
-
width:
|
|
2093
|
+
width: `${width.value + "px"}`
|
|
2142
2094
|
}
|
|
2143
2095
|
}, [createVNode("input", {
|
|
2144
2096
|
"disabled": disabled.value,
|
|
@@ -2494,8 +2446,9 @@ function useTarget(props, backTopRef) {
|
|
|
2494
2446
|
const target = props.target;
|
|
2495
2447
|
const getTargetEl = () => {
|
|
2496
2448
|
const targetEl = document.querySelector(target);
|
|
2497
|
-
if (!targetEl)
|
|
2449
|
+
if (!targetEl) {
|
|
2498
2450
|
throw new Error(`props ${target} is not existed`);
|
|
2451
|
+
}
|
|
2499
2452
|
targetEl.parentElement.style.position = "relative";
|
|
2500
2453
|
backTopRef.value.style.position = "absolute";
|
|
2501
2454
|
return targetEl;
|
|
@@ -2518,8 +2471,9 @@ function useVisibility(props, backTopRef) {
|
|
|
2518
2471
|
return isVisible;
|
|
2519
2472
|
}
|
|
2520
2473
|
function useEventListener(target, event, cb) {
|
|
2521
|
-
if (target)
|
|
2474
|
+
if (target) {
|
|
2522
2475
|
target.addEventListener(event, cb);
|
|
2476
|
+
}
|
|
2523
2477
|
}
|
|
2524
2478
|
function useThrottle(fn, delay) {
|
|
2525
2479
|
let last = null;
|
|
@@ -2572,7 +2526,7 @@ var BackTopInstall = {
|
|
|
2572
2526
|
app.use(BackTop);
|
|
2573
2527
|
}
|
|
2574
2528
|
};
|
|
2575
|
-
const badgeStatusType = ["danger", "warning", "waiting", "success", "info"];
|
|
2529
|
+
const badgeStatusType = ["danger", "warning", "waiting", "success", "info", "common"];
|
|
2576
2530
|
const badgePositionType = ["top-left", "top-right", "bottom-left", "bottom-right"];
|
|
2577
2531
|
const badgeProps = {
|
|
2578
2532
|
count: {
|
|
@@ -2702,8 +2656,9 @@ var BreadcrumbItem = defineComponent({
|
|
|
2702
2656
|
const instance = getCurrentInstance();
|
|
2703
2657
|
const router = instance.appContext.config.globalProperties.$router;
|
|
2704
2658
|
const handleClickLink = () => {
|
|
2705
|
-
if (!props.to || !router)
|
|
2659
|
+
if (!props.to || !router) {
|
|
2706
2660
|
return;
|
|
2661
|
+
}
|
|
2707
2662
|
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
2708
2663
|
};
|
|
2709
2664
|
onMounted(() => {
|
|
@@ -2784,61 +2739,59 @@ var BreadcrumbInstall = {
|
|
|
2784
2739
|
app.use(Breadcrumb);
|
|
2785
2740
|
}
|
|
2786
2741
|
};
|
|
2787
|
-
|
|
2788
|
-
name:
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
required: true
|
|
2793
|
-
},
|
|
2794
|
-
size: {
|
|
2795
|
-
type: String,
|
|
2796
|
-
default: "inherit"
|
|
2797
|
-
},
|
|
2798
|
-
color: {
|
|
2799
|
-
type: String,
|
|
2800
|
-
default: "inherit"
|
|
2801
|
-
},
|
|
2802
|
-
classPrefix: {
|
|
2803
|
-
type: String,
|
|
2804
|
-
default: "icon"
|
|
2805
|
-
}
|
|
2742
|
+
const iconProps = {
|
|
2743
|
+
name: {
|
|
2744
|
+
type: String,
|
|
2745
|
+
default: "",
|
|
2746
|
+
required: true
|
|
2806
2747
|
},
|
|
2807
|
-
|
|
2808
|
-
|
|
2748
|
+
size: {
|
|
2749
|
+
type: String,
|
|
2750
|
+
default: "inherit"
|
|
2809
2751
|
},
|
|
2810
|
-
|
|
2752
|
+
color: {
|
|
2753
|
+
type: String,
|
|
2754
|
+
default: "inherit"
|
|
2755
|
+
},
|
|
2756
|
+
classPrefix: {
|
|
2757
|
+
type: String,
|
|
2758
|
+
default: "icon"
|
|
2759
|
+
}
|
|
2760
|
+
};
|
|
2761
|
+
var DIcon = defineComponent({
|
|
2762
|
+
name: "DIcon",
|
|
2763
|
+
props: iconProps,
|
|
2764
|
+
setup(props) {
|
|
2811
2765
|
const {
|
|
2812
2766
|
name,
|
|
2813
2767
|
size,
|
|
2814
2768
|
color: color2,
|
|
2815
2769
|
classPrefix
|
|
2816
|
-
} =
|
|
2817
|
-
return
|
|
2818
|
-
"
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
"
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2770
|
+
} = toRefs(props);
|
|
2771
|
+
return () => {
|
|
2772
|
+
return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
|
|
2773
|
+
"src": name.value,
|
|
2774
|
+
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
2775
|
+
"style": {
|
|
2776
|
+
width: size.value,
|
|
2777
|
+
verticalAlign: "text-bottom"
|
|
2778
|
+
}
|
|
2779
|
+
}, null) : createVNode("i", {
|
|
2780
|
+
"class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
|
|
2781
|
+
"style": {
|
|
2782
|
+
fontSize: size.value,
|
|
2783
|
+
color: color2.value
|
|
2784
|
+
}
|
|
2785
|
+
}, null);
|
|
2786
|
+
};
|
|
2831
2787
|
}
|
|
2832
2788
|
});
|
|
2833
|
-
Icon.install = function(app) {
|
|
2834
|
-
app.component(Icon.name, Icon);
|
|
2835
|
-
};
|
|
2836
2789
|
var IconInstall = {
|
|
2837
2790
|
title: "Icon \u56FE\u6807",
|
|
2838
2791
|
category: "\u901A\u7528",
|
|
2839
2792
|
status: "100%",
|
|
2840
2793
|
install(app) {
|
|
2841
|
-
app.
|
|
2794
|
+
app.component(DIcon.name, DIcon);
|
|
2842
2795
|
}
|
|
2843
2796
|
};
|
|
2844
2797
|
const buttonProps = {
|
|
@@ -2925,9 +2878,10 @@ var DButton = defineComponent({
|
|
|
2925
2878
|
"class": classes.value,
|
|
2926
2879
|
"disabled": disabled.value,
|
|
2927
2880
|
"onClick": onClick
|
|
2928
|
-
}, [icon.value && createVNode(
|
|
2881
|
+
}, [icon.value && createVNode(DIcon, {
|
|
2929
2882
|
"name": icon.value,
|
|
2930
2883
|
"size": "12px",
|
|
2884
|
+
"color": "",
|
|
2931
2885
|
"class": iconClass.value
|
|
2932
2886
|
}, null), createVNode("span", {
|
|
2933
2887
|
"class": "button-content"
|
|
@@ -3211,12 +3165,12 @@ var Carousel = defineComponent({
|
|
|
3211
3165
|
}, [createVNode("button", {
|
|
3212
3166
|
"class": "arrow-left",
|
|
3213
3167
|
"onClick": () => prev()
|
|
3214
|
-
}, [createVNode(
|
|
3168
|
+
}, [createVNode(DIcon, {
|
|
3215
3169
|
"name": "arrow-left"
|
|
3216
3170
|
}, null)]), createVNode("button", {
|
|
3217
3171
|
"class": "arrow-right",
|
|
3218
3172
|
"onClick": () => next()
|
|
3219
|
-
}, [createVNode(
|
|
3173
|
+
}, [createVNode(DIcon, {
|
|
3220
3174
|
"name": "arrow-right"
|
|
3221
3175
|
}, null)])]) : null, createVNode("div", {
|
|
3222
3176
|
"class": "devui-carousel-item-wrapper",
|
|
@@ -8847,8 +8801,9 @@ const updateCheckOptionStatus = (tagList) => {
|
|
|
8847
8801
|
var _a;
|
|
8848
8802
|
if (((_a = node == null ? void 0 : node.children) == null ? void 0 : _a.length) > 0) {
|
|
8849
8803
|
node.children.forEach((item2) => {
|
|
8850
|
-
if (item2.disabled)
|
|
8804
|
+
if (item2.disabled) {
|
|
8851
8805
|
return;
|
|
8806
|
+
}
|
|
8852
8807
|
if (type4 === "checked") {
|
|
8853
8808
|
item2[type4] = status2;
|
|
8854
8809
|
item2["halfChecked"] = false;
|
|
@@ -8884,8 +8839,9 @@ const findChildrenCheckedStatusToUpdateParent = (node) => {
|
|
|
8884
8839
|
}
|
|
8885
8840
|
};
|
|
8886
8841
|
const updateParentNodeStatus = (node, options, ulIndex) => {
|
|
8887
|
-
if (ulIndex < 0)
|
|
8842
|
+
if (ulIndex < 0) {
|
|
8888
8843
|
return;
|
|
8844
|
+
}
|
|
8889
8845
|
findChildrenCheckedStatusToUpdateParent(node);
|
|
8890
8846
|
ulIndex -= 1;
|
|
8891
8847
|
const parentNode = node == null ? void 0 : node.parent;
|
|
@@ -8939,8 +8895,9 @@ const DCascaderItem = (props) => {
|
|
|
8939
8895
|
} = updateCheckOptionStatus(tagList);
|
|
8940
8896
|
const disbaled = computed(() => cascaderItem == null ? void 0 : cascaderItem.disabled);
|
|
8941
8897
|
const updateValues = () => {
|
|
8942
|
-
if (stopDefault.value)
|
|
8898
|
+
if (stopDefault.value) {
|
|
8943
8899
|
return;
|
|
8900
|
+
}
|
|
8944
8901
|
activeIndexs.splice(ulIndex, activeIndexs.length - ulIndex);
|
|
8945
8902
|
activeIndexs[ulIndex] = liIndex;
|
|
8946
8903
|
if (!multiple) {
|
|
@@ -8948,8 +8905,9 @@ const DCascaderItem = (props) => {
|
|
|
8948
8905
|
}
|
|
8949
8906
|
};
|
|
8950
8907
|
const mouseEnter = () => {
|
|
8951
|
-
if (disbaled.value || multiple)
|
|
8908
|
+
if (disbaled.value || multiple) {
|
|
8952
8909
|
return;
|
|
8910
|
+
}
|
|
8953
8911
|
updateValues();
|
|
8954
8912
|
};
|
|
8955
8913
|
const mouseenter = {
|
|
@@ -8957,8 +8915,9 @@ const DCascaderItem = (props) => {
|
|
|
8957
8915
|
};
|
|
8958
8916
|
const mouseClick = () => {
|
|
8959
8917
|
var _a2;
|
|
8960
|
-
if (disbaled.value)
|
|
8918
|
+
if (disbaled.value) {
|
|
8961
8919
|
return;
|
|
8920
|
+
}
|
|
8962
8921
|
updateValues();
|
|
8963
8922
|
if (!multiple && (!cascaderItem.children || ((_a2 = cascaderItem == null ? void 0 : cascaderItem.children) == null ? void 0 : _a2.length) === 0)) {
|
|
8964
8923
|
confirmInputValueFlg.value = !confirmInputValueFlg.value;
|
|
@@ -9073,8 +9032,9 @@ const popupHandles = (props) => {
|
|
|
9073
9032
|
stopDefault.value = !menuShow.value;
|
|
9074
9033
|
};
|
|
9075
9034
|
const openPopup = () => {
|
|
9076
|
-
if (disabled.value)
|
|
9035
|
+
if (disabled.value) {
|
|
9077
9036
|
return;
|
|
9037
|
+
}
|
|
9078
9038
|
menuShow.value = !menuShow.value;
|
|
9079
9039
|
updateStopDefaultType();
|
|
9080
9040
|
};
|
|
@@ -9126,8 +9086,9 @@ var Cascader = defineComponent({
|
|
|
9126
9086
|
}
|
|
9127
9087
|
};
|
|
9128
9088
|
const updateCascaderView = (value, currentOption, index2) => {
|
|
9129
|
-
if (index2 === value.length)
|
|
9089
|
+
if (index2 === value.length) {
|
|
9130
9090
|
return;
|
|
9091
|
+
}
|
|
9131
9092
|
const i = value[index2];
|
|
9132
9093
|
const current = currentOption[i];
|
|
9133
9094
|
const children = current == null ? void 0 : current.children;
|
|
@@ -9140,8 +9101,9 @@ var Cascader = defineComponent({
|
|
|
9140
9101
|
};
|
|
9141
9102
|
const updateCascaderValue = (value, currentOption, index2) => {
|
|
9142
9103
|
if (!multiple.value) {
|
|
9143
|
-
if (index2 === value.length)
|
|
9104
|
+
if (index2 === value.length) {
|
|
9144
9105
|
return;
|
|
9106
|
+
}
|
|
9145
9107
|
const i = value[index2];
|
|
9146
9108
|
const current = getCurrentOption(currentOption, i);
|
|
9147
9109
|
const children = current == null ? void 0 : current.children;
|
|
@@ -9879,8 +9841,9 @@ class DOMUtils {
|
|
|
9879
9841
|
};
|
|
9880
9842
|
const downFn = (event) => {
|
|
9881
9843
|
var _a;
|
|
9882
|
-
if (isDragging)
|
|
9844
|
+
if (isDragging) {
|
|
9883
9845
|
return;
|
|
9846
|
+
}
|
|
9884
9847
|
document.onselectstart = () => false;
|
|
9885
9848
|
document.ondragstart = () => false;
|
|
9886
9849
|
DOMUtils.addEventListener(document, "mousemove", moveFn);
|
|
@@ -10001,16 +9964,16 @@ class DOMUtils {
|
|
|
10001
9964
|
if (event.clientX > originX && event.clientY > originY) {
|
|
10002
9965
|
angle = 180 - angle;
|
|
10003
9966
|
}
|
|
10004
|
-
if (event.clientX
|
|
9967
|
+
if (event.clientX === originX && event.clientY > originY) {
|
|
10005
9968
|
angle = 180;
|
|
10006
9969
|
}
|
|
10007
|
-
if (event.clientX > originX && event.clientY
|
|
9970
|
+
if (event.clientX > originX && event.clientY === originY) {
|
|
10008
9971
|
angle = 90;
|
|
10009
9972
|
}
|
|
10010
9973
|
if (event.clientX < originX && event.clientY > originY) {
|
|
10011
9974
|
angle = 180 + angle;
|
|
10012
9975
|
}
|
|
10013
|
-
if (event.clientX < originX && event.clientY
|
|
9976
|
+
if (event.clientX < originX && event.clientY === originY) {
|
|
10014
9977
|
angle = 270;
|
|
10015
9978
|
}
|
|
10016
9979
|
if (event.clientX < originX && event.clientY < originY) {
|
|
@@ -10057,8 +10020,9 @@ function HSVAtoRGBA(hsva) {
|
|
|
10057
10020
|
return { r: rgb[0], g: rgb[1], b: rgb[2], a };
|
|
10058
10021
|
}
|
|
10059
10022
|
function RGBAtoHSVA(rgba) {
|
|
10060
|
-
if (!rgba)
|
|
10023
|
+
if (!rgba) {
|
|
10061
10024
|
return { h: 0, s: 1, v: 1, a: 1 };
|
|
10025
|
+
}
|
|
10062
10026
|
const r = rgba.r / 255;
|
|
10063
10027
|
const g = rgba.g / 255;
|
|
10064
10028
|
const b = rgba.b / 255;
|
|
@@ -10074,8 +10038,9 @@ function RGBAtoHSVA(rgba) {
|
|
|
10074
10038
|
h2 = 60 * (4 + (r - g) / (max - min));
|
|
10075
10039
|
}
|
|
10076
10040
|
}
|
|
10077
|
-
if (h2 < 0)
|
|
10041
|
+
if (h2 < 0) {
|
|
10078
10042
|
h2 = h2 + 360;
|
|
10043
|
+
}
|
|
10079
10044
|
const s = max === 0 ? 0 : (max - min) / max;
|
|
10080
10045
|
const hsv = [h2, s, max];
|
|
10081
10046
|
return { h: Math.round(hsv[0]), s: hsv[1], v: hsv[2], a: rgba.a };
|
|
@@ -10201,8 +10166,9 @@ function fromHex(hex2) {
|
|
|
10201
10166
|
return fromHexa(parseHex(hex2));
|
|
10202
10167
|
}
|
|
10203
10168
|
function parseColor(color2, oldColor) {
|
|
10204
|
-
if (!color2)
|
|
10169
|
+
if (!color2) {
|
|
10205
10170
|
return fromRGBA({ r: 0, g: 0, b: 0, a: 1 });
|
|
10171
|
+
}
|
|
10206
10172
|
if (typeof color2 === "string") {
|
|
10207
10173
|
if (color2.indexOf("#") !== -1)
|
|
10208
10174
|
;
|
|
@@ -10234,8 +10200,9 @@ function parseColor(color2, oldColor) {
|
|
|
10234
10200
|
}
|
|
10235
10201
|
return fromHSVA({ h: parts[0], s: parts[1], v: parts[2], a: alpha });
|
|
10236
10202
|
}
|
|
10237
|
-
if (color2 === "transparent")
|
|
10203
|
+
if (color2 === "transparent") {
|
|
10238
10204
|
return fromHexa("#00000000");
|
|
10205
|
+
}
|
|
10239
10206
|
const hex2 = parseHex(color2);
|
|
10240
10207
|
if (oldColor && hex2 === oldColor.hexa) {
|
|
10241
10208
|
return oldColor;
|
|
@@ -10244,24 +10211,28 @@ function parseColor(color2, oldColor) {
|
|
|
10244
10211
|
}
|
|
10245
10212
|
}
|
|
10246
10213
|
if (typeof color2 === "object") {
|
|
10247
|
-
if (color2.hasOwnProperty("alpha"))
|
|
10214
|
+
if (color2.hasOwnProperty("alpha")) {
|
|
10248
10215
|
return color2;
|
|
10216
|
+
}
|
|
10249
10217
|
const a = color2.hasOwnProperty("a") ? parseFloat(color2.a) : 1;
|
|
10250
10218
|
if (has(color2, ["r", "g", "b"])) {
|
|
10251
|
-
if (oldColor && color2 === oldColor.rgba)
|
|
10219
|
+
if (oldColor && color2 === oldColor.rgba) {
|
|
10252
10220
|
return oldColor;
|
|
10253
|
-
else
|
|
10221
|
+
} else {
|
|
10254
10222
|
return fromRGBA(__spreadProps(__spreadValues({}, color2), { a }));
|
|
10223
|
+
}
|
|
10255
10224
|
} else if (has(color2, ["h", "s", "l"])) {
|
|
10256
|
-
if (oldColor && color2 === oldColor.hsla)
|
|
10225
|
+
if (oldColor && color2 === oldColor.hsla) {
|
|
10257
10226
|
return oldColor;
|
|
10258
|
-
else
|
|
10227
|
+
} else {
|
|
10259
10228
|
return fromHSLA(__spreadProps(__spreadValues({}, color2), { a }));
|
|
10229
|
+
}
|
|
10260
10230
|
} else if (has(color2, ["h", "s", "v"])) {
|
|
10261
|
-
if (oldColor && color2 === oldColor.hsva)
|
|
10231
|
+
if (oldColor && color2 === oldColor.hsva) {
|
|
10262
10232
|
return oldColor;
|
|
10263
|
-
else
|
|
10233
|
+
} else {
|
|
10264
10234
|
return fromHSVA(__spreadProps(__spreadValues({}, color2), { a }));
|
|
10235
|
+
}
|
|
10265
10236
|
}
|
|
10266
10237
|
}
|
|
10267
10238
|
return fromRGBA({ r: 255, g: 0, b: 0, a: 1 });
|
|
@@ -10282,8 +10253,9 @@ function extractColor(color2, input2, mode, showAlpha) {
|
|
|
10282
10253
|
const blue = keepDecimal(color2.rgba.b);
|
|
10283
10254
|
const hsvSaturation = keepDecimal(color2.hsva.s, 2);
|
|
10284
10255
|
const value = keepDecimal(color2.hsva.v, 2);
|
|
10285
|
-
if (input2 == null)
|
|
10256
|
+
if (input2 == null) {
|
|
10286
10257
|
return color2;
|
|
10258
|
+
}
|
|
10287
10259
|
function isShowAlpha(mode2) {
|
|
10288
10260
|
return showAlpha ? mode2 + "a" : mode2;
|
|
10289
10261
|
}
|
|
@@ -10301,12 +10273,13 @@ function extractColor(color2, input2, mode, showAlpha) {
|
|
|
10301
10273
|
}
|
|
10302
10274
|
if (typeof input2 === "object") {
|
|
10303
10275
|
const shouldStrip = typeof input2.a === "number" && input2.a === 0 ? !!input2.a : !input2.a;
|
|
10304
|
-
if (has(input2, ["r", "g", "b"]))
|
|
10276
|
+
if (has(input2, ["r", "g", "b"])) {
|
|
10305
10277
|
return stripAlpha(color2.rgba, shouldStrip);
|
|
10306
|
-
else if (has(input2, ["h", "s", "l"]))
|
|
10278
|
+
} else if (has(input2, ["h", "s", "l"])) {
|
|
10307
10279
|
return stripAlpha(color2.hsla, shouldStrip);
|
|
10308
|
-
else if (has(input2, ["h", "s", "v"]))
|
|
10280
|
+
} else if (has(input2, ["h", "s", "v"])) {
|
|
10309
10281
|
return stripAlpha(color2.hsva, shouldStrip);
|
|
10282
|
+
}
|
|
10310
10283
|
}
|
|
10311
10284
|
}
|
|
10312
10285
|
const colorPickerPaletteProps = {
|
|
@@ -10365,20 +10338,6 @@ var colorPalette = defineComponent({
|
|
|
10365
10338
|
canvas.fillStyle = valueGradient;
|
|
10366
10339
|
canvas.fillRect(0, 0, parentWidth, props.height);
|
|
10367
10340
|
}
|
|
10368
|
-
function clickPalette(event) {
|
|
10369
|
-
const target = event.target;
|
|
10370
|
-
if (target !== paletteElement.value) {
|
|
10371
|
-
handleDrag(event);
|
|
10372
|
-
}
|
|
10373
|
-
}
|
|
10374
|
-
function updatePosition() {
|
|
10375
|
-
var _a, _b;
|
|
10376
|
-
if (paletteInstance) {
|
|
10377
|
-
const parentWidth = paletteElement.value.offsetWidth;
|
|
10378
|
-
cursorLeft.value = Number((_a = props.modelValue) == null ? void 0 : _a.hsva.s) * parentWidth;
|
|
10379
|
-
cursorTop.value = (1 - Number((_b = props.modelValue) == null ? void 0 : _b.hsva.v)) * props.height;
|
|
10380
|
-
}
|
|
10381
|
-
}
|
|
10382
10341
|
function handleDrag(event) {
|
|
10383
10342
|
const parentWidth = paletteElement.value.offsetWidth;
|
|
10384
10343
|
if (paletteInstance) {
|
|
@@ -10406,6 +10365,20 @@ var colorPalette = defineComponent({
|
|
|
10406
10365
|
ctx2.emit("changeTextColor", isChangeTextColor.value);
|
|
10407
10366
|
}
|
|
10408
10367
|
}
|
|
10368
|
+
function clickPalette(event) {
|
|
10369
|
+
const target = event.target;
|
|
10370
|
+
if (target !== paletteElement.value) {
|
|
10371
|
+
handleDrag(event);
|
|
10372
|
+
}
|
|
10373
|
+
}
|
|
10374
|
+
function updatePosition() {
|
|
10375
|
+
var _a, _b;
|
|
10376
|
+
if (paletteInstance) {
|
|
10377
|
+
const parentWidth = paletteElement.value.offsetWidth;
|
|
10378
|
+
cursorLeft.value = Number((_a = props.modelValue) == null ? void 0 : _a.hsva.s) * parentWidth;
|
|
10379
|
+
cursorTop.value = (1 - Number((_b = props.modelValue) == null ? void 0 : _b.hsva.v)) * props.height;
|
|
10380
|
+
}
|
|
10381
|
+
}
|
|
10409
10382
|
onMounted(() => {
|
|
10410
10383
|
renderCanvas();
|
|
10411
10384
|
if (paletteInstance && paletteInstance.vnode.el && handlerElement.value) {
|
|
@@ -10491,12 +10464,6 @@ var colorHueSlider = defineComponent({
|
|
|
10491
10464
|
top: 0
|
|
10492
10465
|
}, clickTransfrom.value);
|
|
10493
10466
|
});
|
|
10494
|
-
const onClickSider = (event) => {
|
|
10495
|
-
const target = event.target;
|
|
10496
|
-
if (target !== barElement.value) {
|
|
10497
|
-
onMoveBar(event);
|
|
10498
|
-
}
|
|
10499
|
-
};
|
|
10500
10467
|
const onMoveBar = (event) => {
|
|
10501
10468
|
event.stopPropagation();
|
|
10502
10469
|
if (barElement.value && cursorElement.value) {
|
|
@@ -10514,6 +10481,12 @@ var colorHueSlider = defineComponent({
|
|
|
10514
10481
|
}));
|
|
10515
10482
|
}
|
|
10516
10483
|
};
|
|
10484
|
+
const onClickSider = (event) => {
|
|
10485
|
+
const target = event.target;
|
|
10486
|
+
if (target !== barElement.value) {
|
|
10487
|
+
onMoveBar(event);
|
|
10488
|
+
}
|
|
10489
|
+
};
|
|
10517
10490
|
onMounted(() => {
|
|
10518
10491
|
const dragConfig = {
|
|
10519
10492
|
drag: (event) => {
|
|
@@ -10578,12 +10551,6 @@ var colorAlphaSlider = defineComponent({
|
|
|
10578
10551
|
const clickTransfrom = ref(DEFAULT_TRANSITION);
|
|
10579
10552
|
const barElement = ref(null);
|
|
10580
10553
|
const cursorElement = ref(null);
|
|
10581
|
-
const onClickSider = (event) => {
|
|
10582
|
-
const target = event.target;
|
|
10583
|
-
if (target !== barElement.value) {
|
|
10584
|
-
onMoveBar(event);
|
|
10585
|
-
}
|
|
10586
|
-
};
|
|
10587
10554
|
const onMoveBar = (event) => {
|
|
10588
10555
|
event.stopPropagation();
|
|
10589
10556
|
if (barElement.value && cursorElement.value) {
|
|
@@ -10598,6 +10565,12 @@ var colorAlphaSlider = defineComponent({
|
|
|
10598
10565
|
})));
|
|
10599
10566
|
}
|
|
10600
10567
|
};
|
|
10568
|
+
const onClickSider = (event) => {
|
|
10569
|
+
const target = event.target;
|
|
10570
|
+
if (target !== barElement.value) {
|
|
10571
|
+
onMoveBar(event);
|
|
10572
|
+
}
|
|
10573
|
+
};
|
|
10601
10574
|
const getBackgroundStyle = computed(() => {
|
|
10602
10575
|
return {
|
|
10603
10576
|
background: `linear-gradient(to right, transparent , ${RGBtoCSS(props.modelValue.rgba)})`
|
|
@@ -12030,7 +12003,7 @@ function useStore(v, {
|
|
|
12030
12003
|
var colorHistory = defineComponent({
|
|
12031
12004
|
name: "ColorEdit",
|
|
12032
12005
|
components: {
|
|
12033
|
-
Icon
|
|
12006
|
+
Icon: DIcon
|
|
12034
12007
|
},
|
|
12035
12008
|
props: colorPickerHistoryProps,
|
|
12036
12009
|
emits: ["update:color"],
|
|
@@ -12500,8 +12473,9 @@ var Countdown = defineComponent({
|
|
|
12500
12473
|
};
|
|
12501
12474
|
const startTime = () => {
|
|
12502
12475
|
getTime();
|
|
12503
|
-
if (countdown2.value)
|
|
12476
|
+
if (countdown2.value) {
|
|
12504
12477
|
return;
|
|
12478
|
+
}
|
|
12505
12479
|
countdown2.value = setInterval(() => {
|
|
12506
12480
|
const t = getTime();
|
|
12507
12481
|
if (t === 0) {
|
|
@@ -13050,8 +13024,9 @@ const formatValue = (state, props) => {
|
|
|
13050
13024
|
}
|
|
13051
13025
|
};
|
|
13052
13026
|
const formatPlaceholder = (props) => {
|
|
13053
|
-
if (!props)
|
|
13027
|
+
if (!props) {
|
|
13054
13028
|
return "";
|
|
13029
|
+
}
|
|
13055
13030
|
const format2 = props.format || `y/MM/dd`;
|
|
13056
13031
|
const sp = props.rangeSpliter || "-";
|
|
13057
13032
|
return props.range ? `${format2} ${sp} ${format2}` : format2;
|
|
@@ -13615,7 +13590,7 @@ var DatePicker = defineComponent({
|
|
|
13615
13590
|
"modelValue": state.value,
|
|
13616
13591
|
"placeholder": state.placeholder,
|
|
13617
13592
|
"onFocus": () => state.show = true
|
|
13618
|
-
}, null), createVNode(
|
|
13593
|
+
}, null), createVNode(DIcon, {
|
|
13619
13594
|
"size": "small",
|
|
13620
13595
|
"name": "calendar",
|
|
13621
13596
|
"class": "datepicker-input-icon"
|
|
@@ -14127,6 +14102,18 @@ const dropdownProps = {
|
|
|
14127
14102
|
closeOnMouseLeaveMenu: {
|
|
14128
14103
|
type: Boolean,
|
|
14129
14104
|
default: false
|
|
14105
|
+
},
|
|
14106
|
+
showAnimation: {
|
|
14107
|
+
type: Boolean,
|
|
14108
|
+
default: true
|
|
14109
|
+
},
|
|
14110
|
+
overlayClass: {
|
|
14111
|
+
type: String,
|
|
14112
|
+
default: ""
|
|
14113
|
+
},
|
|
14114
|
+
destroyOnHide: {
|
|
14115
|
+
type: Boolean,
|
|
14116
|
+
default: true
|
|
14130
14117
|
}
|
|
14131
14118
|
};
|
|
14132
14119
|
function getElement(element) {
|
|
@@ -14153,12 +14140,12 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
|
|
|
14153
14140
|
isOpen.value = status2;
|
|
14154
14141
|
emit("toggle", isOpen.value);
|
|
14155
14142
|
};
|
|
14156
|
-
const handleLeave = async (elementType,
|
|
14143
|
+
const handleLeave = async (elementType, closeAll) => {
|
|
14157
14144
|
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
14158
14145
|
if (elementType === "origin" && overlayEnter || elementType === "dropdown" && originEnter) {
|
|
14159
14146
|
return;
|
|
14160
14147
|
}
|
|
14161
|
-
if (
|
|
14148
|
+
if (closeAll) {
|
|
14162
14149
|
[...dropdownMap.values()].reverse().forEach((item2) => {
|
|
14163
14150
|
setTimeout(() => {
|
|
14164
14151
|
var _a;
|
|
@@ -14198,7 +14185,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
|
|
|
14198
14185
|
subscriptions.push(subscribeEvent(originEl, "click", () => toggle(!isOpen.value)), subscribeEvent(dropdownEl, "mouseleave", (e) => {
|
|
14199
14186
|
var _a;
|
|
14200
14187
|
if (closeOnMouseLeaveMenu.value && !((_a = dropdownMap.get(id).child) == null ? void 0 : _a.contains(e.relatedTarget))) {
|
|
14201
|
-
handleLeave("dropdown",
|
|
14188
|
+
handleLeave("dropdown", true);
|
|
14202
14189
|
}
|
|
14203
14190
|
}));
|
|
14204
14191
|
} else if (triggerVal === "hover") {
|
|
@@ -14217,7 +14204,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
|
|
|
14217
14204
|
if (e.relatedTarget && ((originEl == null ? void 0 : originEl.contains(e.relatedTarget)) || ((_a = dropdownMap.get(id).child) == null ? void 0 : _a.contains(e.relatedTarget)))) {
|
|
14218
14205
|
return;
|
|
14219
14206
|
}
|
|
14220
|
-
handleLeave("dropdown",
|
|
14207
|
+
handleLeave("dropdown", true);
|
|
14221
14208
|
}));
|
|
14222
14209
|
}
|
|
14223
14210
|
onInvalidate(() => subscriptions.forEach((v) => v()));
|
|
@@ -14268,9 +14255,30 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
|
|
|
14268
14255
|
dropdownMap.delete(id);
|
|
14269
14256
|
});
|
|
14270
14257
|
}
|
|
14271
|
-
|
|
14272
|
-
|
|
14273
|
-
|
|
14258
|
+
function useOverlayProps(props, currentPosition, isOpen) {
|
|
14259
|
+
const { showAnimation, overlayClass, destroyOnHide } = toRefs(props);
|
|
14260
|
+
const overlayModelValue = ref(false);
|
|
14261
|
+
const overlayShowValue = ref(false);
|
|
14262
|
+
const styles = computed(() => ({
|
|
14263
|
+
transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%"
|
|
14264
|
+
}));
|
|
14265
|
+
const classes = computed(() => ({
|
|
14266
|
+
"fade-in-bottom": showAnimation.value && isOpen.value && currentPosition.value === "bottom",
|
|
14267
|
+
"fade-in-top": showAnimation.value && isOpen.value && currentPosition.value === "top",
|
|
14268
|
+
[`${overlayClass.value}`]: true
|
|
14269
|
+
}));
|
|
14270
|
+
const handlePositionChange = (pos) => {
|
|
14271
|
+
currentPosition.value = pos.includes("top") || pos.includes("end") ? "top" : "bottom";
|
|
14272
|
+
};
|
|
14273
|
+
watch(isOpen, (isOpenVal) => {
|
|
14274
|
+
overlayModelValue.value = destroyOnHide.value ? isOpenVal : true;
|
|
14275
|
+
overlayShowValue.value = isOpenVal;
|
|
14276
|
+
});
|
|
14277
|
+
return { overlayModelValue, overlayShowValue, styles, classes, handlePositionChange };
|
|
14278
|
+
}
|
|
14279
|
+
var baseOverlay = "";
|
|
14280
|
+
function _isSlot$4(s) {
|
|
14281
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
14274
14282
|
}
|
|
14275
14283
|
const CommonOverlay = defineComponent({
|
|
14276
14284
|
setup(props, ctx2) {
|
|
@@ -14288,6 +14296,40 @@ const CommonOverlay = defineComponent({
|
|
|
14288
14296
|
};
|
|
14289
14297
|
}
|
|
14290
14298
|
});
|
|
14299
|
+
const overlayProps = {
|
|
14300
|
+
visible: {
|
|
14301
|
+
type: Boolean
|
|
14302
|
+
},
|
|
14303
|
+
backgroundBlock: {
|
|
14304
|
+
type: Boolean,
|
|
14305
|
+
default: false
|
|
14306
|
+
},
|
|
14307
|
+
backgroundClass: {
|
|
14308
|
+
type: String,
|
|
14309
|
+
default: ""
|
|
14310
|
+
},
|
|
14311
|
+
backgroundStyle: {
|
|
14312
|
+
type: [String, Object]
|
|
14313
|
+
},
|
|
14314
|
+
onBackdropClick: {
|
|
14315
|
+
type: Function
|
|
14316
|
+
},
|
|
14317
|
+
backdropClose: {
|
|
14318
|
+
type: Boolean,
|
|
14319
|
+
default: true
|
|
14320
|
+
},
|
|
14321
|
+
hasBackdrop: {
|
|
14322
|
+
type: Boolean,
|
|
14323
|
+
default: true
|
|
14324
|
+
}
|
|
14325
|
+
};
|
|
14326
|
+
const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
14327
|
+
overlayStyle: {
|
|
14328
|
+
type: [String, Object],
|
|
14329
|
+
default: void 0
|
|
14330
|
+
}
|
|
14331
|
+
});
|
|
14332
|
+
const overlayEmits = ["update:visible", "backdropClick"];
|
|
14291
14333
|
function useOverlayLogic(props, ctx2) {
|
|
14292
14334
|
const backgroundClass = computed(() => {
|
|
14293
14335
|
return [
|
|
@@ -14338,6 +14380,7 @@ function useOverlayLogic(props, ctx2) {
|
|
|
14338
14380
|
handleOverlayBubbleCancel
|
|
14339
14381
|
};
|
|
14340
14382
|
}
|
|
14383
|
+
var fixedOverlay = "";
|
|
14341
14384
|
const FixedOverlay = defineComponent({
|
|
14342
14385
|
name: "DFixedOverlay",
|
|
14343
14386
|
props: fixedOverlayProps,
|
|
@@ -14390,29 +14433,22 @@ var Dropdown = defineComponent({
|
|
|
14390
14433
|
setup(props, {
|
|
14391
14434
|
slots,
|
|
14392
14435
|
attrs,
|
|
14393
|
-
emit
|
|
14436
|
+
emit,
|
|
14437
|
+
expose
|
|
14394
14438
|
}) {
|
|
14395
14439
|
const {
|
|
14396
14440
|
visible,
|
|
14397
14441
|
position,
|
|
14398
14442
|
align,
|
|
14399
|
-
offset: offset2
|
|
14443
|
+
offset: offset2,
|
|
14444
|
+
showAnimation
|
|
14400
14445
|
} = toRefs(props);
|
|
14401
14446
|
const origin = ref();
|
|
14402
14447
|
const dropdownRef = ref();
|
|
14448
|
+
const overlayRef = ref();
|
|
14403
14449
|
const id = `dropdown_${dropdownId++}`;
|
|
14404
14450
|
const isOpen = ref(false);
|
|
14405
14451
|
const currentPosition = ref("bottom");
|
|
14406
|
-
const handlePositionChange = (pos) => {
|
|
14407
|
-
currentPosition.value = pos.includes("top") || pos.includes("end") ? "top" : "bottom";
|
|
14408
|
-
};
|
|
14409
|
-
const styles = computed(() => ({
|
|
14410
|
-
transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%"
|
|
14411
|
-
}));
|
|
14412
|
-
const classes = computed(() => ({
|
|
14413
|
-
"fade-in-bottom": isOpen.value && currentPosition.value === "bottom",
|
|
14414
|
-
"fade-in-top": isOpen.value && currentPosition.value === "top"
|
|
14415
|
-
}));
|
|
14416
14452
|
useDropdownEvent({
|
|
14417
14453
|
id,
|
|
14418
14454
|
isOpen,
|
|
@@ -14422,6 +14458,16 @@ var Dropdown = defineComponent({
|
|
|
14422
14458
|
emit
|
|
14423
14459
|
});
|
|
14424
14460
|
useDropdown(id, visible, isOpen, origin, dropdownRef, currentPosition, emit);
|
|
14461
|
+
const {
|
|
14462
|
+
overlayModelValue,
|
|
14463
|
+
overlayShowValue,
|
|
14464
|
+
styles,
|
|
14465
|
+
classes,
|
|
14466
|
+
handlePositionChange
|
|
14467
|
+
} = useOverlayProps(props, currentPosition, isOpen);
|
|
14468
|
+
expose({
|
|
14469
|
+
updatePosition: () => overlayRef.value.updatePosition()
|
|
14470
|
+
});
|
|
14425
14471
|
return () => {
|
|
14426
14472
|
var _a;
|
|
14427
14473
|
return createVNode(Fragment, null, [createVNode("div", {
|
|
@@ -14431,11 +14477,12 @@ var Dropdown = defineComponent({
|
|
|
14431
14477
|
"to": "body"
|
|
14432
14478
|
}, {
|
|
14433
14479
|
default: () => [createVNode(Transition, {
|
|
14434
|
-
"name": `devui-dropdown-fade-${currentPosition.value}`
|
|
14480
|
+
"name": showAnimation.value ? `devui-dropdown-fade-${currentPosition.value}` : ""
|
|
14435
14481
|
}, {
|
|
14436
|
-
default: () => [createVNode(FlexibleOverlay, {
|
|
14437
|
-
"modelValue":
|
|
14438
|
-
"onUpdate:modelValue": ($event) =>
|
|
14482
|
+
default: () => [withDirectives(createVNode(FlexibleOverlay, {
|
|
14483
|
+
"modelValue": overlayModelValue.value,
|
|
14484
|
+
"onUpdate:modelValue": ($event) => overlayModelValue.value = $event,
|
|
14485
|
+
"ref": overlayRef,
|
|
14439
14486
|
"origin": origin.value,
|
|
14440
14487
|
"position": position.value,
|
|
14441
14488
|
"align": align.value,
|
|
@@ -14451,7 +14498,7 @@ var Dropdown = defineComponent({
|
|
|
14451
14498
|
"class": "devui-dropdown-menu-wrap"
|
|
14452
14499
|
}, attrs), [(_a2 = slots.menu) == null ? void 0 : _a2.call(slots)])];
|
|
14453
14500
|
}
|
|
14454
|
-
})]
|
|
14501
|
+
}), [[vShow, overlayShowValue.value]])]
|
|
14455
14502
|
})]
|
|
14456
14503
|
})]);
|
|
14457
14504
|
};
|
|
@@ -14481,6 +14528,14 @@ const dropdownMenuProps = {
|
|
|
14481
14528
|
clickOutside: {
|
|
14482
14529
|
type: Function,
|
|
14483
14530
|
default: () => true
|
|
14531
|
+
},
|
|
14532
|
+
showAnimation: {
|
|
14533
|
+
type: Boolean,
|
|
14534
|
+
default: true
|
|
14535
|
+
},
|
|
14536
|
+
overlayClass: {
|
|
14537
|
+
type: String,
|
|
14538
|
+
default: ""
|
|
14484
14539
|
}
|
|
14485
14540
|
};
|
|
14486
14541
|
var DropdownMenu = defineComponent({
|
|
@@ -14499,12 +14554,14 @@ var DropdownMenu = defineComponent({
|
|
|
14499
14554
|
position,
|
|
14500
14555
|
align,
|
|
14501
14556
|
offset: offset2,
|
|
14502
|
-
clickOutside
|
|
14557
|
+
clickOutside,
|
|
14558
|
+
showAnimation,
|
|
14559
|
+
overlayClass
|
|
14503
14560
|
} = toRefs(props);
|
|
14504
14561
|
const dropdownMenuRef = ref(null);
|
|
14505
14562
|
onClickOutside(dropdownMenuRef, (value) => {
|
|
14506
|
-
var _a;
|
|
14507
|
-
if (((_a = clickOutside.value) == null ? void 0 : _a.call(clickOutside)) && !origin.value.contains(value.target)) {
|
|
14563
|
+
var _a, _b;
|
|
14564
|
+
if (((_a = clickOutside.value) == null ? void 0 : _a.call(clickOutside)) && !((_b = origin == null ? void 0 : origin.value) == null ? void 0 : _b.contains(value.target))) {
|
|
14508
14565
|
emit("update:modelValue", false);
|
|
14509
14566
|
}
|
|
14510
14567
|
});
|
|
@@ -14519,7 +14576,7 @@ var DropdownMenu = defineComponent({
|
|
|
14519
14576
|
"to": "body"
|
|
14520
14577
|
}, {
|
|
14521
14578
|
default: () => [createVNode(Transition, {
|
|
14522
|
-
"name": `devui-dropdown-fade-${currentPosition.value}`
|
|
14579
|
+
"name": showAnimation.value ? `devui-dropdown-fade-${currentPosition.value}` : ""
|
|
14523
14580
|
}, {
|
|
14524
14581
|
default: () => [createVNode(FlexibleOverlay, {
|
|
14525
14582
|
"modelValue": modelValue.value,
|
|
@@ -14529,6 +14586,7 @@ var DropdownMenu = defineComponent({
|
|
|
14529
14586
|
"align": align.value,
|
|
14530
14587
|
"offset": offset2.value,
|
|
14531
14588
|
"onPositionChange": handlePositionChange,
|
|
14589
|
+
"class": overlayClass.value,
|
|
14532
14590
|
"style": styles.value
|
|
14533
14591
|
}, {
|
|
14534
14592
|
default: () => {
|
|
@@ -14553,9 +14611,6 @@ var DropdownInstall = {
|
|
|
14553
14611
|
}
|
|
14554
14612
|
};
|
|
14555
14613
|
const editableSelectProps = {
|
|
14556
|
-
appendToBody: {
|
|
14557
|
-
type: Boolean
|
|
14558
|
-
},
|
|
14559
14614
|
options: {
|
|
14560
14615
|
type: Array,
|
|
14561
14616
|
default: () => []
|
|
@@ -14585,9 +14640,6 @@ const editableSelectProps = {
|
|
|
14585
14640
|
},
|
|
14586
14641
|
filterOption: {
|
|
14587
14642
|
type: [Function, Boolean]
|
|
14588
|
-
},
|
|
14589
|
-
loadMore: {
|
|
14590
|
-
type: Function
|
|
14591
14643
|
}
|
|
14592
14644
|
};
|
|
14593
14645
|
function className$2(classStr, classOpt) {
|
|
@@ -14627,17 +14679,21 @@ const useInput = (inputValue, ctx2) => {
|
|
|
14627
14679
|
handleInput
|
|
14628
14680
|
};
|
|
14629
14681
|
};
|
|
14630
|
-
const useLazyLoad = (dropdownRef, inputValue, filterOtion,
|
|
14682
|
+
const useLazyLoad = (dropdownRef, inputValue, filterOtion, ctx2) => {
|
|
14631
14683
|
const loadMore = () => {
|
|
14632
|
-
|
|
14684
|
+
const dropdownVal = dropdownRef.value;
|
|
14685
|
+
if (filterOtion !== false) {
|
|
14633
14686
|
return;
|
|
14634
|
-
|
|
14635
|
-
|
|
14687
|
+
}
|
|
14688
|
+
if (dropdownVal.clientHeight + dropdownVal.scrollTop >= dropdownVal.scrollHeight) {
|
|
14689
|
+
ctx2.emit("loadMore", inputValue.value);
|
|
14636
14690
|
}
|
|
14637
14691
|
};
|
|
14638
14692
|
return { loadMore };
|
|
14639
14693
|
};
|
|
14640
|
-
const useKeyboardSelect = (dropdownRef,
|
|
14694
|
+
const useKeyboardSelect = (dropdownRef, visible, inputValue, filteredOptions, optionDisabledKey, filterOption, loading2, handleClick, closeMenu, toggleMenu) => {
|
|
14695
|
+
const hoverIndex = ref(0);
|
|
14696
|
+
const selectedIndex = ref(0);
|
|
14641
14697
|
const updateHoveringIndex = (index2) => {
|
|
14642
14698
|
hoverIndex.value = index2;
|
|
14643
14699
|
};
|
|
@@ -14656,64 +14712,71 @@ const useKeyboardSelect = (dropdownRef, disabled, visible, hoverIndex, selectedI
|
|
|
14656
14712
|
}
|
|
14657
14713
|
});
|
|
14658
14714
|
};
|
|
14659
|
-
const
|
|
14660
|
-
if (
|
|
14661
|
-
|
|
14715
|
+
const handleEscape = () => {
|
|
14716
|
+
if (inputValue.value) {
|
|
14717
|
+
inputValue.value = "";
|
|
14718
|
+
} else {
|
|
14719
|
+
closeMenu();
|
|
14720
|
+
}
|
|
14721
|
+
};
|
|
14722
|
+
const handleEnter = () => {
|
|
14723
|
+
const len = filteredOptions.value.length;
|
|
14724
|
+
if (!visible.value) {
|
|
14725
|
+
toggleMenu();
|
|
14726
|
+
} else if (!len || len === 1) {
|
|
14727
|
+
closeMenu();
|
|
14728
|
+
} else if (len && len !== 1) {
|
|
14729
|
+
handleClick(filteredOptions.value[hoverIndex.value]);
|
|
14730
|
+
closeMenu();
|
|
14731
|
+
}
|
|
14732
|
+
};
|
|
14733
|
+
const handleKeyboardNavigation = (direction) => {
|
|
14734
|
+
const len = filteredOptions.value.length;
|
|
14735
|
+
if (!len || len === 1) {
|
|
14736
|
+
return;
|
|
14737
|
+
}
|
|
14738
|
+
if (!["ArrowDown", "ArrowUp"].includes(direction)) {
|
|
14739
|
+
return;
|
|
14662
14740
|
}
|
|
14663
|
-
if (
|
|
14741
|
+
if (filterOption === false && loading2.value) {
|
|
14664
14742
|
return;
|
|
14743
|
+
}
|
|
14744
|
+
let newIndex = 0;
|
|
14745
|
+
newIndex = hoverIndex.value;
|
|
14665
14746
|
if (direction === "ArrowUp") {
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
updateHoveringIndex(newIndex);
|
|
14670
|
-
return;
|
|
14747
|
+
newIndex -= 1;
|
|
14748
|
+
if (newIndex === -1) {
|
|
14749
|
+
newIndex = len - 1;
|
|
14671
14750
|
}
|
|
14672
|
-
newIndex = newIndex - 1;
|
|
14673
14751
|
} else if (direction === "ArrowDown") {
|
|
14674
|
-
|
|
14752
|
+
newIndex += 1;
|
|
14753
|
+
if (newIndex === len) {
|
|
14675
14754
|
newIndex = 0;
|
|
14676
|
-
scrollToItem(newIndex);
|
|
14677
|
-
updateHoveringIndex(newIndex);
|
|
14678
|
-
return;
|
|
14679
14755
|
}
|
|
14680
|
-
newIndex = newIndex + 1;
|
|
14681
14756
|
}
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14757
|
+
hoverIndex.value = newIndex;
|
|
14758
|
+
const option2 = filteredOptions.value[newIndex];
|
|
14759
|
+
if (option2[optionDisabledKey]) {
|
|
14760
|
+
return handleKeyboardNavigation(direction);
|
|
14685
14761
|
}
|
|
14686
|
-
scrollToItem(newIndex);
|
|
14687
14762
|
updateHoveringIndex(newIndex);
|
|
14763
|
+
scrollToItem(newIndex);
|
|
14688
14764
|
};
|
|
14689
14765
|
const handleKeydown = (event) => {
|
|
14690
14766
|
const keyCode = event.key || event.code;
|
|
14691
|
-
if (options.value.length === 0)
|
|
14692
|
-
return;
|
|
14693
|
-
if (!visible.value) {
|
|
14694
|
-
return toggleMenu();
|
|
14695
|
-
}
|
|
14696
|
-
const onKeydownEnter = () => {
|
|
14697
|
-
handleClick(options.value[hoverIndex.value]);
|
|
14698
|
-
closeMenu();
|
|
14699
|
-
};
|
|
14700
|
-
const onKeydownEsc = () => {
|
|
14701
|
-
closeMenu();
|
|
14702
|
-
};
|
|
14703
14767
|
switch (keyCode) {
|
|
14704
|
-
case "Enter":
|
|
14705
|
-
onKeydownEnter();
|
|
14706
|
-
break;
|
|
14707
14768
|
case "Escape":
|
|
14708
|
-
|
|
14769
|
+
event.preventDefault();
|
|
14770
|
+
handleEscape();
|
|
14771
|
+
break;
|
|
14772
|
+
case "Enter":
|
|
14773
|
+
handleEnter();
|
|
14709
14774
|
break;
|
|
14710
14775
|
default:
|
|
14711
|
-
|
|
14776
|
+
handleKeyboardNavigation(keyCode);
|
|
14712
14777
|
}
|
|
14713
14778
|
};
|
|
14714
|
-
return {
|
|
14715
|
-
handleKeydown
|
|
14716
|
-
};
|
|
14779
|
+
return { handleKeydown, hoverIndex, selectedIndex };
|
|
14717
14780
|
};
|
|
14718
14781
|
var EditableSelect = defineComponent({
|
|
14719
14782
|
name: "DEditableSelect",
|
|
@@ -14723,101 +14786,19 @@ var EditableSelect = defineComponent({
|
|
|
14723
14786
|
props: editableSelectProps,
|
|
14724
14787
|
emits: ["update:modelValue", "search", "loadMore"],
|
|
14725
14788
|
setup(props, ctx2) {
|
|
14726
|
-
const
|
|
14727
|
-
const {
|
|
14728
|
-
optionDisabledKey: disabledKey
|
|
14729
|
-
} = props;
|
|
14730
|
-
return className$2("devui-dropdown-item", {
|
|
14731
|
-
disabled: disabledKey ? !!option2[disabledKey] : false,
|
|
14732
|
-
selected: index2 === selectIndex.value,
|
|
14733
|
-
"devui-dropdown-bg": index2 === hoverIndex.value
|
|
14734
|
-
});
|
|
14735
|
-
};
|
|
14736
|
-
const renderDropdown = () => {
|
|
14737
|
-
if (props.appendToBody) {
|
|
14738
|
-
return createVNode(resolveComponent("d-flexible-overlay"), {
|
|
14739
|
-
"origin": origin,
|
|
14740
|
-
"visible": visible.value,
|
|
14741
|
-
"onUpdate:visible": ($event) => visible.value = $event,
|
|
14742
|
-
"position": position,
|
|
14743
|
-
"hasBackdrop": false
|
|
14744
|
-
}, {
|
|
14745
|
-
default: () => [createVNode("div", {
|
|
14746
|
-
"class": "devui-editable-select-dropdown",
|
|
14747
|
-
"style": {
|
|
14748
|
-
width: props.width + "px"
|
|
14749
|
-
}
|
|
14750
|
-
}, [withDirectives(createVNode("div", {
|
|
14751
|
-
"class": "devui-dropdown-menu"
|
|
14752
|
-
}, [createVNode("ul", {
|
|
14753
|
-
"ref": dopdownRef,
|
|
14754
|
-
"class": "devui-list-unstyled scroll-height",
|
|
14755
|
-
"style": {
|
|
14756
|
-
maxHeight: props.maxHeight + "px"
|
|
14757
|
-
},
|
|
14758
|
-
"onScroll": loadMore
|
|
14759
|
-
}, [filteredOptions.value.map((option2, index2) => {
|
|
14760
|
-
return createVNode("li", {
|
|
14761
|
-
"class": getItemCls(option2, index2),
|
|
14762
|
-
"onClick": (e) => {
|
|
14763
|
-
e.stopPropagation();
|
|
14764
|
-
handleClick(option2);
|
|
14765
|
-
}
|
|
14766
|
-
}, [ctx2.slots.itemTemplate ? ctx2.slots.itemTemplate(option2) : option2.label]);
|
|
14767
|
-
}), withDirectives(createVNode("li", {
|
|
14768
|
-
"class": "devui-no-result-template"
|
|
14769
|
-
}, [createVNode("div", {
|
|
14770
|
-
"class": "devui-no-data-tip"
|
|
14771
|
-
}, [emptyText.value])]), [[vShow, !filteredOptions.value.length]])])]), [[resolveDirective("dLoading"), props.loading], [vShow, visible.value]])])]
|
|
14772
|
-
});
|
|
14773
|
-
} else {
|
|
14774
|
-
return createVNode(Transition, {
|
|
14775
|
-
"name": "fade"
|
|
14776
|
-
}, {
|
|
14777
|
-
default: () => [withDirectives(createVNode("div", {
|
|
14778
|
-
"class": "devui-dropdown-menu"
|
|
14779
|
-
}, [createVNode("ul", {
|
|
14780
|
-
"ref": dopdownRef,
|
|
14781
|
-
"class": "devui-list-unstyled scroll-height",
|
|
14782
|
-
"style": {
|
|
14783
|
-
maxHeight: props.maxHeight + "px"
|
|
14784
|
-
},
|
|
14785
|
-
"onScroll": loadMore
|
|
14786
|
-
}, [filteredOptions.value.map((option2, index2) => {
|
|
14787
|
-
return createVNode("li", {
|
|
14788
|
-
"class": getItemCls(option2, index2),
|
|
14789
|
-
"onClick": (e) => {
|
|
14790
|
-
e.stopPropagation();
|
|
14791
|
-
handleClick(option2);
|
|
14792
|
-
}
|
|
14793
|
-
}, [ctx2.slots.itemTemplate ? ctx2.slots.itemTemplate(option2) : option2.label]);
|
|
14794
|
-
}), withDirectives(createVNode("li", {
|
|
14795
|
-
"class": "devui-no-result-template"
|
|
14796
|
-
}, [createVNode("div", {
|
|
14797
|
-
"class": "devui-no-data-tip"
|
|
14798
|
-
}, [emptyText.value])]), [[vShow, !filteredOptions.value.length]])])]), [[vShow, visible.value]])]
|
|
14799
|
-
});
|
|
14800
|
-
}
|
|
14801
|
-
};
|
|
14802
|
-
const dopdownRef = ref();
|
|
14789
|
+
const dropdownRef = ref();
|
|
14803
14790
|
const origin = ref();
|
|
14804
|
-
const position =
|
|
14805
|
-
originX: "left",
|
|
14806
|
-
originY: "bottom",
|
|
14807
|
-
overlayX: "left",
|
|
14808
|
-
overlayY: "top"
|
|
14809
|
-
});
|
|
14791
|
+
const position = ref(["bottom", "left"]);
|
|
14810
14792
|
const visible = ref(false);
|
|
14811
|
-
const inputValue = ref(props.modelValue);
|
|
14812
|
-
const
|
|
14813
|
-
const selectIndex = ref(0);
|
|
14793
|
+
const inputValue = ref(props.modelValue || "");
|
|
14794
|
+
const loading2 = ref(props.loading);
|
|
14814
14795
|
const normalizeOptions = computed(() => {
|
|
14815
14796
|
return props.options.map((option2) => {
|
|
14816
14797
|
if (typeof option2 === "object") {
|
|
14817
|
-
return
|
|
14798
|
+
return Object.assign({}, option2, {
|
|
14818
14799
|
label: option2.label ? option2.label : option2.value,
|
|
14819
14800
|
value: option2.value
|
|
14820
|
-
}
|
|
14801
|
+
});
|
|
14821
14802
|
}
|
|
14822
14803
|
return {
|
|
14823
14804
|
label: option2 + "",
|
|
@@ -14827,13 +14808,16 @@ var EditableSelect = defineComponent({
|
|
|
14827
14808
|
});
|
|
14828
14809
|
const filteredOptions = userFilterOptions(normalizeOptions, inputValue, props.filterOption);
|
|
14829
14810
|
const emptyText = computed(() => {
|
|
14830
|
-
let text;
|
|
14811
|
+
let text = "";
|
|
14831
14812
|
if (props.filterOption !== false && !filteredOptions.value.length) {
|
|
14832
14813
|
text = "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55";
|
|
14833
14814
|
} else if (props.filterOption === false && !filteredOptions.value.length) {
|
|
14834
14815
|
text = "\u6CA1\u6709\u6570\u636E";
|
|
14835
14816
|
}
|
|
14836
|
-
return
|
|
14817
|
+
return text;
|
|
14818
|
+
});
|
|
14819
|
+
watch(() => props.loading, (newVal) => {
|
|
14820
|
+
loading2.value = newVal;
|
|
14837
14821
|
});
|
|
14838
14822
|
const toggleMenu = () => {
|
|
14839
14823
|
visible.value = !visible.value;
|
|
@@ -14843,7 +14827,7 @@ var EditableSelect = defineComponent({
|
|
|
14843
14827
|
};
|
|
14844
14828
|
const {
|
|
14845
14829
|
loadMore
|
|
14846
|
-
} = useLazyLoad(
|
|
14830
|
+
} = useLazyLoad(dropdownRef, inputValue, props.filterOption, ctx2);
|
|
14847
14831
|
const {
|
|
14848
14832
|
handleInput
|
|
14849
14833
|
} = useInput(inputValue, ctx2);
|
|
@@ -14851,17 +14835,32 @@ var EditableSelect = defineComponent({
|
|
|
14851
14835
|
const {
|
|
14852
14836
|
optionDisabledKey: disabledKey
|
|
14853
14837
|
} = props;
|
|
14854
|
-
if (disabledKey && !!option2[disabledKey])
|
|
14838
|
+
if (disabledKey && !!option2[disabledKey]) {
|
|
14855
14839
|
return;
|
|
14840
|
+
}
|
|
14856
14841
|
ctx2.emit("update:modelValue", option2.label);
|
|
14857
14842
|
closeMenu();
|
|
14858
14843
|
};
|
|
14859
14844
|
const {
|
|
14860
|
-
handleKeydown
|
|
14861
|
-
|
|
14845
|
+
handleKeydown,
|
|
14846
|
+
hoverIndex,
|
|
14847
|
+
selectedIndex
|
|
14848
|
+
} = useKeyboardSelect(dropdownRef, visible, inputValue, filteredOptions, props.optionDisabledKey, props.filterOption, loading2, handleClick, closeMenu, toggleMenu);
|
|
14862
14849
|
watch(() => props.modelValue, (newVal) => {
|
|
14863
|
-
|
|
14850
|
+
if (newVal) {
|
|
14851
|
+
inputValue.value = newVal;
|
|
14852
|
+
}
|
|
14864
14853
|
});
|
|
14854
|
+
const getItemCls = (option2, index2) => {
|
|
14855
|
+
const {
|
|
14856
|
+
optionDisabledKey: disabledKey
|
|
14857
|
+
} = props;
|
|
14858
|
+
return className$2("devui-dropdown-item", {
|
|
14859
|
+
disabled: disabledKey ? !!option2[disabledKey] : false,
|
|
14860
|
+
selected: index2 === selectedIndex.value,
|
|
14861
|
+
"devui-dropdown-bg": index2 === hoverIndex.value
|
|
14862
|
+
});
|
|
14863
|
+
};
|
|
14865
14864
|
return () => {
|
|
14866
14865
|
const selectCls = className$2("devui-editable-select devui-form-group devui-has-feedback", {
|
|
14867
14866
|
"devui-select-open": visible.value === true
|
|
@@ -14887,7 +14886,41 @@ var EditableSelect = defineComponent({
|
|
|
14887
14886
|
"class": "devui-select-chevron-icon"
|
|
14888
14887
|
}, [createVNode(resolveComponent("d-icon"), {
|
|
14889
14888
|
"name": "select-arrow"
|
|
14890
|
-
}, null)])]),
|
|
14889
|
+
}, null)])]), createVNode(resolveComponent("d-flexible-overlay"), {
|
|
14890
|
+
"origin": origin.value,
|
|
14891
|
+
"modelValue": visible.value,
|
|
14892
|
+
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
14893
|
+
"position": position.value,
|
|
14894
|
+
"hasBackdrop": false
|
|
14895
|
+
}, {
|
|
14896
|
+
default: () => [createVNode("div", {
|
|
14897
|
+
"class": "devui-editable-select-dropdown",
|
|
14898
|
+
"style": {
|
|
14899
|
+
width: props.width + "px"
|
|
14900
|
+
}
|
|
14901
|
+
}, [withDirectives(createVNode("div", {
|
|
14902
|
+
"class": "devui-dropdown-menu"
|
|
14903
|
+
}, [createVNode("ul", {
|
|
14904
|
+
"ref": dropdownRef,
|
|
14905
|
+
"class": "devui-list-unstyled scroll-height",
|
|
14906
|
+
"style": {
|
|
14907
|
+
maxHeight: props.maxHeight + "px"
|
|
14908
|
+
},
|
|
14909
|
+
"onScroll": loadMore
|
|
14910
|
+
}, [filteredOptions.value.map((option2, index2) => {
|
|
14911
|
+
return createVNode("li", {
|
|
14912
|
+
"class": getItemCls(option2, index2),
|
|
14913
|
+
"onClick": (e) => {
|
|
14914
|
+
e.stopPropagation();
|
|
14915
|
+
handleClick(option2);
|
|
14916
|
+
}
|
|
14917
|
+
}, [ctx2.slots.item ? ctx2.slots.item(option2) : option2.label]);
|
|
14918
|
+
}), withDirectives(createVNode("li", {
|
|
14919
|
+
"class": "devui-no-result-template"
|
|
14920
|
+
}, [createVNode("div", {
|
|
14921
|
+
"class": "devui-no-data-tip"
|
|
14922
|
+
}, [ctx2.slots.noResultItem ? ctx2.slots.noResultItem() : emptyText.value])]), [[vShow, !filteredOptions.value.length]])])]), [[resolveDirective("dLoading"), props.loading], [vShow, visible.value]])])]
|
|
14923
|
+
})]), [[resolveDirective("click-outside"), closeMenu]]);
|
|
14891
14924
|
};
|
|
14892
14925
|
}
|
|
14893
14926
|
});
|
|
@@ -14924,8 +14957,9 @@ function isObject(obj) {
|
|
|
14924
14957
|
return Object.prototype.toString.call(obj).slice(8, -1) === "Object";
|
|
14925
14958
|
}
|
|
14926
14959
|
function hasKey(obj, key) {
|
|
14927
|
-
if (!isObject(obj))
|
|
14960
|
+
if (!isObject(obj)) {
|
|
14928
14961
|
return false;
|
|
14962
|
+
}
|
|
14929
14963
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
14930
14964
|
}
|
|
14931
14965
|
function getElOffset(curEl) {
|
|
@@ -15058,8 +15092,8 @@ function usePopover(props, visible, placement, origin, popoverRef) {
|
|
|
15058
15092
|
transformOrigin: TransformOriginMap$1[placement.value]
|
|
15059
15093
|
}));
|
|
15060
15094
|
const onDocumentClick = (e) => {
|
|
15061
|
-
var _a;
|
|
15062
|
-
if (!origin.value.contains(e.target) && !((
|
|
15095
|
+
var _a, _b;
|
|
15096
|
+
if (!((_a = origin.value) == null ? void 0 : _a.contains(e.target)) && !((_b = popoverRef.value.$el) == null ? void 0 : _b.contains(e.target))) {
|
|
15063
15097
|
visible.value = false;
|
|
15064
15098
|
}
|
|
15065
15099
|
};
|
|
@@ -15310,7 +15344,7 @@ var FormLabel = defineComponent({
|
|
|
15310
15344
|
}, {
|
|
15311
15345
|
reference: () => createVNode("span", {
|
|
15312
15346
|
"class": "devui-form-label-help"
|
|
15313
|
-
}, [createVNode(
|
|
15347
|
+
}, [createVNode(DIcon, {
|
|
15314
15348
|
"name": "helping",
|
|
15315
15349
|
"color": "#252b3a"
|
|
15316
15350
|
}, null)])
|
|
@@ -15522,7 +15556,7 @@ var FormControl = defineComponent({
|
|
|
15522
15556
|
"id": uid
|
|
15523
15557
|
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]), (feedbackStatus || ((_d = (_c = ctx2.slots).suffixTemplate) == null ? void 0 : _d.call(_c))) && createVNode("span", {
|
|
15524
15558
|
"class": "devui-feedback-status"
|
|
15525
|
-
}, [((_f = (_e = ctx2.slots).suffixTemplate) == null ? void 0 : _f.call(_e)) ? (_h = (_g = ctx2.slots).suffixTemplate) == null ? void 0 : _h.call(_g) : createVNode(
|
|
15559
|
+
}, [((_f = (_e = ctx2.slots).suffixTemplate) == null ? void 0 : _f.call(_e)) ? (_h = (_g = ctx2.slots).suffixTemplate) == null ? void 0 : _h.call(_g) : createVNode(DIcon, {
|
|
15526
15560
|
"name": iconData.value.name,
|
|
15527
15561
|
"color": iconData.value.color
|
|
15528
15562
|
}, null)])]), extraInfo && createVNode("div", {
|
|
@@ -15677,8 +15711,9 @@ function handleErrorStrategyPass(el) {
|
|
|
15677
15711
|
el.setAttribute("class", classList.join(" "));
|
|
15678
15712
|
}
|
|
15679
15713
|
function getFormControlUID(el) {
|
|
15680
|
-
if (el.tagName.toLocaleLowerCase() === "body")
|
|
15714
|
+
if (el.tagName.toLocaleLowerCase() === "body") {
|
|
15681
15715
|
return "";
|
|
15716
|
+
}
|
|
15682
15717
|
if (el.parentElement.id.startsWith("dfc-")) {
|
|
15683
15718
|
return el.parentElement.id;
|
|
15684
15719
|
} else {
|
|
@@ -15721,8 +15756,9 @@ function validateFn({ validator, modelValue, el, tipEl, isFormTag, messageShowTy
|
|
|
15721
15756
|
handleValidatePass(el, tipEl);
|
|
15722
15757
|
}).catch((err) => {
|
|
15723
15758
|
const { errors } = err;
|
|
15724
|
-
if (!errors || errors.length === 0)
|
|
15759
|
+
if (!errors || errors.length === 0) {
|
|
15725
15760
|
return;
|
|
15761
|
+
}
|
|
15726
15762
|
let msg = "";
|
|
15727
15763
|
if (typeof errors[0].message === "object") {
|
|
15728
15764
|
msg = errors[0].message.default;
|
|
@@ -15914,7 +15950,7 @@ const launchNormalFullscreen = (targetElement, props) => {
|
|
|
15914
15950
|
};
|
|
15915
15951
|
const exitNormalFullscreen = (targetElement) => {
|
|
15916
15952
|
targetElement.classList.remove("devui-fullscreen");
|
|
15917
|
-
targetElement.style.zIndex =
|
|
15953
|
+
targetElement.style.zIndex = "";
|
|
15918
15954
|
};
|
|
15919
15955
|
const launchImmersiveFullScreen = async (docElement) => {
|
|
15920
15956
|
let fullscreenLaunch = null;
|
|
@@ -15927,7 +15963,7 @@ const launchImmersiveFullScreen = async (docElement) => {
|
|
|
15927
15963
|
} else if (docElement.msRequestFullscreen) {
|
|
15928
15964
|
fullscreenLaunch = Promise.resolve(docElement.msRequestFullscreen());
|
|
15929
15965
|
}
|
|
15930
|
-
return await fullscreenLaunch.then(() => !!document.fullscreenElement);
|
|
15966
|
+
return await (fullscreenLaunch == null ? void 0 : fullscreenLaunch.then(() => !!document.fullscreenElement));
|
|
15931
15967
|
};
|
|
15932
15968
|
const exitImmersiveFullScreen = async (doc) => {
|
|
15933
15969
|
let fullscreenExit = null;
|
|
@@ -15940,7 +15976,7 @@ const exitImmersiveFullScreen = async (doc) => {
|
|
|
15940
15976
|
} else if (doc.msExitFullscreen) {
|
|
15941
15977
|
fullscreenExit = Promise.resolve(doc.msExitFullscreen());
|
|
15942
15978
|
}
|
|
15943
|
-
return await fullscreenExit.then(() => !!document.fullscreenElement);
|
|
15979
|
+
return await (fullscreenExit == null ? void 0 : fullscreenExit.then(() => !!document.fullscreenElement));
|
|
15944
15980
|
};
|
|
15945
15981
|
const addFullScreenStyle = () => {
|
|
15946
15982
|
document.getElementsByTagName("html")[0].classList.add("devui-fullscreen-html");
|
|
@@ -15951,14 +15987,6 @@ const removeFullScreenStyle = () => {
|
|
|
15951
15987
|
function useFullscreen(props, slotElement, ctx2) {
|
|
15952
15988
|
const { modelValue, mode } = toRefs(props);
|
|
15953
15989
|
let exitByKeydown = false;
|
|
15954
|
-
watch(modelValue, (newVal) => {
|
|
15955
|
-
if (mode.value === "normal") {
|
|
15956
|
-
handleNormalFullscreen(newVal);
|
|
15957
|
-
}
|
|
15958
|
-
if (mode.value === "immersive") {
|
|
15959
|
-
handleImmersiveFullscreen(newVal);
|
|
15960
|
-
}
|
|
15961
|
-
});
|
|
15962
15990
|
const handleNormalFullscreen = (isOpen) => {
|
|
15963
15991
|
if (isOpen) {
|
|
15964
15992
|
launchNormalFullscreen(slotElement.value, props);
|
|
@@ -15977,6 +16005,14 @@ function useFullscreen(props, slotElement, ctx2) {
|
|
|
15977
16005
|
}
|
|
15978
16006
|
}
|
|
15979
16007
|
};
|
|
16008
|
+
watch(modelValue, (newVal) => {
|
|
16009
|
+
if (mode.value === "normal") {
|
|
16010
|
+
handleNormalFullscreen(newVal);
|
|
16011
|
+
}
|
|
16012
|
+
if (mode.value === "immersive") {
|
|
16013
|
+
handleImmersiveFullscreen(newVal);
|
|
16014
|
+
}
|
|
16015
|
+
});
|
|
15980
16016
|
const handleFullscreenChange = () => {
|
|
15981
16017
|
if (!document.fullscreenElement) {
|
|
15982
16018
|
ctx2.emit("update:modelValue");
|
|
@@ -16009,15 +16045,12 @@ var Fullscreen = defineComponent({
|
|
|
16009
16045
|
};
|
|
16010
16046
|
}
|
|
16011
16047
|
});
|
|
16012
|
-
Fullscreen.install = function(app) {
|
|
16013
|
-
app.component(Fullscreen.name, Fullscreen);
|
|
16014
|
-
};
|
|
16015
16048
|
var FullscreenInstall = {
|
|
16016
16049
|
title: "Fullscreen \u5168\u5C4F",
|
|
16017
16050
|
category: "\u901A\u7528",
|
|
16018
16051
|
status: "100%",
|
|
16019
16052
|
install(app) {
|
|
16020
|
-
app.
|
|
16053
|
+
app.component(Fullscreen.name, Fullscreen);
|
|
16021
16054
|
}
|
|
16022
16055
|
};
|
|
16023
16056
|
var ganttScale = "";
|
|
@@ -16975,8 +17008,9 @@ var imagePreview = defineComponent({
|
|
|
16975
17008
|
transform.setZoomOriginal();
|
|
16976
17009
|
}
|
|
16977
17010
|
function onKeyDown(event) {
|
|
16978
|
-
if (event.defaultPrevented)
|
|
17011
|
+
if (event.defaultPrevented) {
|
|
16979
17012
|
return;
|
|
17013
|
+
}
|
|
16980
17014
|
if (event.code == "Escape") {
|
|
16981
17015
|
onClose();
|
|
16982
17016
|
} else if (event.code == "ArrowLeft") {
|
|
@@ -17339,7 +17373,7 @@ var InputIcon = defineComponent({
|
|
|
17339
17373
|
"style": {
|
|
17340
17374
|
backgroundColor: iconBgColor
|
|
17341
17375
|
}
|
|
17342
|
-
}, [createVNode(
|
|
17376
|
+
}, [createVNode(DIcon, {
|
|
17343
17377
|
"size": "small",
|
|
17344
17378
|
"name": name,
|
|
17345
17379
|
"color": iconColor
|
|
@@ -17423,20 +17457,24 @@ var InputNumber = defineComponent({
|
|
|
17423
17457
|
return props.disabled;
|
|
17424
17458
|
});
|
|
17425
17459
|
const add = () => {
|
|
17426
|
-
if (props.disabled)
|
|
17460
|
+
if (props.disabled) {
|
|
17427
17461
|
return;
|
|
17428
|
-
|
|
17462
|
+
}
|
|
17463
|
+
if (inputVal.value >= props.max) {
|
|
17429
17464
|
return;
|
|
17465
|
+
}
|
|
17430
17466
|
inputVal.value += props.step != 0 ? props.step : 1;
|
|
17431
17467
|
focusVal.value = "active";
|
|
17432
17468
|
ctx2.emit("change", inputVal.value);
|
|
17433
17469
|
ctx2.emit("update:modelValue", inputVal.value);
|
|
17434
17470
|
};
|
|
17435
17471
|
const subtract = () => {
|
|
17436
|
-
if (props.disabled)
|
|
17472
|
+
if (props.disabled) {
|
|
17437
17473
|
return;
|
|
17438
|
-
|
|
17474
|
+
}
|
|
17475
|
+
if (inputVal.value <= props.min) {
|
|
17439
17476
|
return;
|
|
17477
|
+
}
|
|
17440
17478
|
inputVal.value -= props.step != 0 ? props.step : 1;
|
|
17441
17479
|
focusVal.value = "active";
|
|
17442
17480
|
ctx2.emit("change", inputVal.value);
|
|
@@ -17499,12 +17537,12 @@ var InputNumber = defineComponent({
|
|
|
17499
17537
|
"class": ["devui-control-buttons", focusVal.value]
|
|
17500
17538
|
}, [createVNode("span", {
|
|
17501
17539
|
"onClick": add
|
|
17502
|
-
}, [createVNode(
|
|
17540
|
+
}, [createVNode(DIcon, {
|
|
17503
17541
|
"size": "12px",
|
|
17504
17542
|
"name": "chevron-up"
|
|
17505
17543
|
}, null)]), createVNode("span", {
|
|
17506
17544
|
"onClick": subtract
|
|
17507
|
-
}, [createVNode(
|
|
17545
|
+
}, [createVNode(DIcon, {
|
|
17508
17546
|
"size": "12px",
|
|
17509
17547
|
"name": "chevron-down"
|
|
17510
17548
|
}, null)])]), createVNode("div", {
|
|
@@ -17800,7 +17838,7 @@ var Modal = defineComponent({
|
|
|
17800
17838
|
var _a;
|
|
17801
17839
|
return [createVNode("div", mergeProps({
|
|
17802
17840
|
"class": "devui-modal"
|
|
17803
|
-
}, attrs), [createVNode(
|
|
17841
|
+
}, attrs), [createVNode(DIcon, {
|
|
17804
17842
|
"name": "close",
|
|
17805
17843
|
"class": "btn-close",
|
|
17806
17844
|
"size": "var(--devui-font-size-md,12px)",
|
|
@@ -18000,7 +18038,7 @@ var Close = defineComponent({
|
|
|
18000
18038
|
return () => createVNode("div", {
|
|
18001
18039
|
"class": "devui-notification-icon-close",
|
|
18002
18040
|
"onClick": (e) => emit("click", e)
|
|
18003
|
-
}, [createVNode(
|
|
18041
|
+
}, [createVNode(DIcon, {
|
|
18004
18042
|
"name": "close",
|
|
18005
18043
|
"size": "14px"
|
|
18006
18044
|
}, null)]);
|
|
@@ -18029,7 +18067,7 @@ var TypeIcon = defineComponent({
|
|
|
18029
18067
|
};
|
|
18030
18068
|
return () => createVNode("span", {
|
|
18031
18069
|
"class": classes.value
|
|
18032
|
-
}, [type4.value !== "normal" && createVNode(
|
|
18070
|
+
}, [type4.value !== "normal" && createVNode(DIcon, {
|
|
18033
18071
|
"name": severityIconMap[type4.value],
|
|
18034
18072
|
"size": "16px"
|
|
18035
18073
|
}, null)]);
|
|
@@ -18187,7 +18225,7 @@ var NotificationInstall = {
|
|
|
18187
18225
|
app.config.globalProperties.$notificationService = NotificationService;
|
|
18188
18226
|
}
|
|
18189
18227
|
};
|
|
18190
|
-
const
|
|
18228
|
+
const paginationProps = {
|
|
18191
18229
|
pageSize: {
|
|
18192
18230
|
type: Number,
|
|
18193
18231
|
default: 10
|
|
@@ -18324,15 +18362,15 @@ var ConfigMenu = defineComponent({
|
|
|
18324
18362
|
setup() {
|
|
18325
18363
|
const paginationConfig = ref(null);
|
|
18326
18364
|
const isShowConfig = ref(false);
|
|
18365
|
+
const closeConfigMenu = (e) => {
|
|
18366
|
+
isShowConfig.value = isShowConfig.value ? false : !!e;
|
|
18367
|
+
};
|
|
18327
18368
|
onMounted(() => {
|
|
18328
18369
|
on(paginationConfig.value, "click", closeConfigMenu);
|
|
18329
18370
|
});
|
|
18330
18371
|
onUnmounted(() => {
|
|
18331
18372
|
off(paginationConfig.value, "click", closeConfigMenu);
|
|
18332
18373
|
});
|
|
18333
|
-
const closeConfigMenu = (e) => {
|
|
18334
|
-
isShowConfig.value = isShowConfig.value ? false : !!e;
|
|
18335
|
-
};
|
|
18336
18374
|
return {
|
|
18337
18375
|
paginationConfig,
|
|
18338
18376
|
isShowConfig,
|
|
@@ -18482,8 +18520,9 @@ var PageNumBtn = defineComponent({
|
|
|
18482
18520
|
}) {
|
|
18483
18521
|
const showPageNum = computed(() => handlePages(props.cursor, props.maxItems, props.totalPages));
|
|
18484
18522
|
const changeCursor = (pageSize) => {
|
|
18485
|
-
if (isNaN(pageSize))
|
|
18523
|
+
if (isNaN(pageSize)) {
|
|
18486
18524
|
return;
|
|
18525
|
+
}
|
|
18487
18526
|
const page = pageSize < 1 ? 1 : pageSize > props.totalPages ? props.totalPages : pageSize | 0;
|
|
18488
18527
|
emit("changeCursorEmit", page);
|
|
18489
18528
|
};
|
|
@@ -18607,11 +18646,12 @@ var Pagination = defineComponent({
|
|
|
18607
18646
|
JumpPage,
|
|
18608
18647
|
PageNumBtn
|
|
18609
18648
|
},
|
|
18610
|
-
props:
|
|
18649
|
+
props: paginationProps,
|
|
18611
18650
|
emits: ["pageIndexChange", "pageSizeChange", "update:pageSize", "update:pageIndex"],
|
|
18612
18651
|
setup(props, {
|
|
18613
18652
|
emit
|
|
18614
18653
|
}) {
|
|
18654
|
+
const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
|
|
18615
18655
|
const litePageOptions = computed(() => liteSelectOptions(totalPages.value));
|
|
18616
18656
|
const cursor = computed({
|
|
18617
18657
|
get() {
|
|
@@ -18633,7 +18673,6 @@ var Pagination = defineComponent({
|
|
|
18633
18673
|
emit("update:pageSize", val);
|
|
18634
18674
|
}
|
|
18635
18675
|
});
|
|
18636
|
-
const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
|
|
18637
18676
|
const changeCursorEmit = (val) => {
|
|
18638
18677
|
cursor.value = val;
|
|
18639
18678
|
emit("pageIndexChange", val);
|
|
@@ -18750,19 +18789,15 @@ var Pagination = defineComponent({
|
|
|
18750
18789
|
]);
|
|
18751
18790
|
}
|
|
18752
18791
|
});
|
|
18753
|
-
Pagination.install = (app) => {
|
|
18754
|
-
app.component(Pagination.name, Pagination);
|
|
18755
|
-
};
|
|
18756
18792
|
var PaginationInstall = {
|
|
18757
18793
|
title: "Pagination \u5206\u9875",
|
|
18758
18794
|
category: "\u5BFC\u822A",
|
|
18759
18795
|
status: "100%",
|
|
18760
18796
|
install(app) {
|
|
18761
|
-
app.
|
|
18797
|
+
app.component(Pagination.name, Pagination);
|
|
18762
18798
|
}
|
|
18763
18799
|
};
|
|
18764
|
-
|
|
18765
|
-
const PanelProps = {
|
|
18800
|
+
const panelProps = {
|
|
18766
18801
|
type: {
|
|
18767
18802
|
type: String,
|
|
18768
18803
|
default: "default"
|
|
@@ -18779,10 +18814,6 @@ const PanelProps = {
|
|
|
18779
18814
|
type: Function,
|
|
18780
18815
|
default: null
|
|
18781
18816
|
},
|
|
18782
|
-
toggle: {
|
|
18783
|
-
type: Function,
|
|
18784
|
-
default: null
|
|
18785
|
-
},
|
|
18786
18817
|
showAnimation: {
|
|
18787
18818
|
type: Boolean,
|
|
18788
18819
|
default: true
|
|
@@ -18804,9 +18835,11 @@ class Store {
|
|
|
18804
18835
|
option[key] = ref(value);
|
|
18805
18836
|
}
|
|
18806
18837
|
}
|
|
18838
|
+
var panel = "";
|
|
18807
18839
|
var Panel = defineComponent({
|
|
18808
18840
|
name: "DPanel",
|
|
18809
|
-
props:
|
|
18841
|
+
props: panelProps,
|
|
18842
|
+
emits: ["toggle"],
|
|
18810
18843
|
setup(props, ctx2) {
|
|
18811
18844
|
provide("beforeToggle", props.beforeToggle);
|
|
18812
18845
|
provide("showAnimation", computed(() => props.showAnimation));
|
|
@@ -18814,11 +18847,10 @@ var Panel = defineComponent({
|
|
|
18814
18847
|
const isCollapsed = ref(props.isCollapsed);
|
|
18815
18848
|
const type4 = computed(() => props.type);
|
|
18816
18849
|
const cssClass = computed(() => props.cssClass);
|
|
18850
|
+
const timeStamp = new Date().getTime().toString() + Math.random();
|
|
18817
18851
|
const onToggle = () => {
|
|
18818
|
-
|
|
18819
|
-
(_a = props.toggle) == null ? void 0 : _a.call(props, Store.getByKey(`isCollapsed[${timeStamp}]`));
|
|
18852
|
+
ctx2.emit("toggle", Store.getByKey(`isCollapsed[${timeStamp}]`));
|
|
18820
18853
|
};
|
|
18821
|
-
const timeStamp = new Date().getTime().toString();
|
|
18822
18854
|
Store.setData(`isCollapsed[${timeStamp}]`, isCollapsed.value);
|
|
18823
18855
|
return () => {
|
|
18824
18856
|
var _a, _b;
|
|
@@ -18831,7 +18863,8 @@ var Panel = defineComponent({
|
|
|
18831
18863
|
});
|
|
18832
18864
|
var PanelHeader = defineComponent({
|
|
18833
18865
|
name: "DPanelHeader",
|
|
18834
|
-
props:
|
|
18866
|
+
props: panelProps,
|
|
18867
|
+
emits: ["toggle"],
|
|
18835
18868
|
setup(props, ctx2) {
|
|
18836
18869
|
const beforeToggle = inject("beforeToggle");
|
|
18837
18870
|
const keys = Object.keys(Store.state());
|
|
@@ -18839,16 +18872,35 @@ var PanelHeader = defineComponent({
|
|
|
18839
18872
|
const isCollapsed = ref(Store.state()[key]);
|
|
18840
18873
|
const changeFlag = ref();
|
|
18841
18874
|
let header2 = null;
|
|
18842
|
-
const
|
|
18843
|
-
|
|
18875
|
+
const res = ref(isCollapsed.value);
|
|
18876
|
+
let changeResult = true;
|
|
18877
|
+
const done = () => {
|
|
18878
|
+
res.value = !res.value;
|
|
18879
|
+
if (!changeFlag.value) {
|
|
18880
|
+
if (res.value) {
|
|
18881
|
+
Store.setData(`${key}`, res.value);
|
|
18882
|
+
isCollapsed.value = res.value;
|
|
18883
|
+
ctx2.emit("toggle", res.value);
|
|
18884
|
+
}
|
|
18885
|
+
return;
|
|
18886
|
+
}
|
|
18887
|
+
if (res.value !== void 0) {
|
|
18888
|
+
Store.setData(`${key}`, res.value);
|
|
18889
|
+
isCollapsed.value = res.value;
|
|
18890
|
+
ctx2.emit("toggle", res.value);
|
|
18891
|
+
}
|
|
18892
|
+
};
|
|
18893
|
+
const canToggle = async () => {
|
|
18844
18894
|
if (beforeToggle) {
|
|
18845
|
-
const
|
|
18846
|
-
if (typeof
|
|
18847
|
-
if (
|
|
18848
|
-
changeResult =
|
|
18895
|
+
const tmpRes = beforeToggle(isCollapsed, done);
|
|
18896
|
+
if (typeof tmpRes !== "undefined") {
|
|
18897
|
+
if (tmpRes instanceof Promise) {
|
|
18898
|
+
changeResult = await tmpRes;
|
|
18849
18899
|
} else {
|
|
18850
|
-
changeResult =
|
|
18900
|
+
changeResult = tmpRes;
|
|
18851
18901
|
}
|
|
18902
|
+
} else {
|
|
18903
|
+
changeResult = true;
|
|
18852
18904
|
}
|
|
18853
18905
|
}
|
|
18854
18906
|
return changeResult;
|
|
@@ -18856,20 +18908,19 @@ var PanelHeader = defineComponent({
|
|
|
18856
18908
|
canToggle().then((val) => changeFlag.value = val);
|
|
18857
18909
|
const toggleBody = () => {
|
|
18858
18910
|
canToggle().then((val) => {
|
|
18859
|
-
var _a, _b;
|
|
18860
18911
|
changeFlag.value = val;
|
|
18861
18912
|
if (!val) {
|
|
18862
18913
|
if (!isCollapsed.value) {
|
|
18863
18914
|
Store.setData(`${key}`, !isCollapsed.value);
|
|
18864
18915
|
isCollapsed.value = !isCollapsed.value;
|
|
18865
|
-
(
|
|
18916
|
+
ctx2.emit("toggle", isCollapsed.value);
|
|
18866
18917
|
}
|
|
18867
18918
|
return;
|
|
18868
18919
|
}
|
|
18869
18920
|
if (isCollapsed.value !== void 0) {
|
|
18870
18921
|
Store.setData(`${key}`, !isCollapsed.value);
|
|
18871
18922
|
isCollapsed.value = !isCollapsed.value;
|
|
18872
|
-
(
|
|
18923
|
+
ctx2.emit("toggle", isCollapsed.value);
|
|
18873
18924
|
}
|
|
18874
18925
|
});
|
|
18875
18926
|
};
|
|
@@ -18880,7 +18931,7 @@ var PanelHeader = defineComponent({
|
|
|
18880
18931
|
"class": "devui-panel-heading",
|
|
18881
18932
|
"onClick": toggleBody,
|
|
18882
18933
|
"style": {
|
|
18883
|
-
|
|
18934
|
+
cursor: changeFlag.value ? "pointer" : "auto"
|
|
18884
18935
|
}
|
|
18885
18936
|
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]);
|
|
18886
18937
|
}
|
|
@@ -18890,7 +18941,7 @@ var PanelHeader = defineComponent({
|
|
|
18890
18941
|
});
|
|
18891
18942
|
var PanelBody = defineComponent({
|
|
18892
18943
|
name: "DPanelBody",
|
|
18893
|
-
props:
|
|
18944
|
+
props: panelProps,
|
|
18894
18945
|
setup(props, ctx2) {
|
|
18895
18946
|
const animationName = inject("showAnimation");
|
|
18896
18947
|
const hasLeftPadding = inject("hasLeftPadding");
|
|
@@ -18901,8 +18952,9 @@ var PanelBody = defineComponent({
|
|
|
18901
18952
|
onMounted(() => {
|
|
18902
18953
|
if (bodyEl.value) {
|
|
18903
18954
|
const dom = bodyEl.value;
|
|
18904
|
-
if (isCollapsed[key])
|
|
18955
|
+
if (isCollapsed[key]) {
|
|
18905
18956
|
dom.style.height = `${dom.offsetHeight}px`;
|
|
18957
|
+
}
|
|
18906
18958
|
}
|
|
18907
18959
|
});
|
|
18908
18960
|
const enter = (element) => {
|
|
@@ -18950,18 +19002,15 @@ var PanelFooter = defineComponent({
|
|
|
18950
19002
|
};
|
|
18951
19003
|
}
|
|
18952
19004
|
});
|
|
18953
|
-
Panel.install = function(app) {
|
|
18954
|
-
app.component(Panel.name, Panel);
|
|
18955
|
-
app.component(PanelHeader.name, PanelHeader);
|
|
18956
|
-
app.component(PanelBody.name, PanelBody);
|
|
18957
|
-
app.component(PanelFooter.name, PanelFooter);
|
|
18958
|
-
};
|
|
18959
19005
|
var PanelInstall = {
|
|
18960
19006
|
title: "Panel \u9762\u677F",
|
|
18961
19007
|
category: "\u901A\u7528",
|
|
18962
19008
|
status: "100%",
|
|
18963
19009
|
install(app) {
|
|
18964
|
-
app.
|
|
19010
|
+
app.component(Panel.name, Panel);
|
|
19011
|
+
app.component(PanelHeader.name, PanelHeader);
|
|
19012
|
+
app.component(PanelBody.name, PanelBody);
|
|
19013
|
+
app.component(PanelFooter.name, PanelFooter);
|
|
18965
19014
|
}
|
|
18966
19015
|
};
|
|
18967
19016
|
var PopoverInstall = {
|
|
@@ -19032,7 +19081,7 @@ var Progress = defineComponent({
|
|
|
19032
19081
|
a ${radius},${radius} 0 1 1 0,${endPositionY}`;
|
|
19033
19082
|
const len = Math.PI * 2 * radius;
|
|
19034
19083
|
data.trailPath = {
|
|
19035
|
-
stroke: "#dfe1e6",
|
|
19084
|
+
stroke: "var(--devui-dividing-line, #dfe1e6)",
|
|
19036
19085
|
strokeDasharray: `${len}px ${len}px`,
|
|
19037
19086
|
strokeDashoffset: `0`,
|
|
19038
19087
|
transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"
|
|
@@ -19490,7 +19539,7 @@ var Radio = defineComponent({
|
|
|
19490
19539
|
return props.value === _value;
|
|
19491
19540
|
});
|
|
19492
19541
|
const radioName = computed(() => {
|
|
19493
|
-
return radioGroupConf ? radioGroupConf.name.value : props.name;
|
|
19542
|
+
return radioGroupConf ? radioGroupConf.name.value : props.name || void 0;
|
|
19494
19543
|
});
|
|
19495
19544
|
const judgeCanChange = (_value) => {
|
|
19496
19545
|
const beforeChange = props.beforeChange || (radioGroupConf ? radioGroupConf.beforeChange : null);
|
|
@@ -19557,13 +19606,19 @@ var Radio = defineComponent({
|
|
|
19557
19606
|
"viewBox": "0 0 1024 1024",
|
|
19558
19607
|
"xmlns": "http://www.w3.org/2000/svg"
|
|
19559
19608
|
}, [createVNode("circle", {
|
|
19560
|
-
"class":
|
|
19609
|
+
"class": {
|
|
19610
|
+
"devui-radio-material-outer": true,
|
|
19611
|
+
disabled
|
|
19612
|
+
},
|
|
19561
19613
|
"cx": "512",
|
|
19562
19614
|
"cy": "512",
|
|
19563
19615
|
"r": "486.5",
|
|
19564
19616
|
"stroke-width": "51"
|
|
19565
19617
|
}, null), createVNode("circle", {
|
|
19566
|
-
"class":
|
|
19618
|
+
"class": {
|
|
19619
|
+
"devui-radio-material-inner": true,
|
|
19620
|
+
disabled
|
|
19621
|
+
},
|
|
19567
19622
|
"cx": "512",
|
|
19568
19623
|
"fill-rule": "nonzero",
|
|
19569
19624
|
"cy": "512",
|
|
@@ -19626,19 +19681,13 @@ var RadioGroup = defineComponent({
|
|
|
19626
19681
|
}, [getContent()]);
|
|
19627
19682
|
}
|
|
19628
19683
|
});
|
|
19629
|
-
Radio.install = function(app) {
|
|
19630
|
-
app.component(Radio.name, Radio);
|
|
19631
|
-
};
|
|
19632
|
-
RadioGroup.install = function(app) {
|
|
19633
|
-
app.component(RadioGroup.name, RadioGroup);
|
|
19634
|
-
};
|
|
19635
19684
|
var RadioInstall = {
|
|
19636
19685
|
title: "Radio \u5355\u9009\u6846",
|
|
19637
19686
|
category: "\u6570\u636E\u5F55\u5165",
|
|
19638
19687
|
status: "100%",
|
|
19639
19688
|
install(app) {
|
|
19640
|
-
app.
|
|
19641
|
-
app.
|
|
19689
|
+
app.component(Radio.name, Radio);
|
|
19690
|
+
app.component(RadioGroup.name, RadioGroup);
|
|
19642
19691
|
}
|
|
19643
19692
|
};
|
|
19644
19693
|
const rateProps = {
|
|
@@ -19995,12 +20044,14 @@ var ReadTip = defineComponent({
|
|
|
19995
20044
|
rule.overlayClassName = rule.overlayClassName || options.overlayClassName;
|
|
19996
20045
|
rule.position = rule.position || options.position;
|
|
19997
20046
|
rule.contentTemplate = !!ctx2.slots.contentTemplate;
|
|
19998
|
-
if (!("appendToBody" in rule))
|
|
20047
|
+
if (!("appendToBody" in rule)) {
|
|
19999
20048
|
rule.appendToBody = options.appendToBody;
|
|
20049
|
+
}
|
|
20000
20050
|
const doms = defaultSlot.value.querySelectorAll(rule.selector);
|
|
20001
20051
|
[...doms].map((dom, index2) => {
|
|
20002
|
-
if (rule.appendToBody === false)
|
|
20052
|
+
if (rule.appendToBody === false) {
|
|
20003
20053
|
dom.style.position = "relative";
|
|
20054
|
+
}
|
|
20004
20055
|
let newRule = reactive({
|
|
20005
20056
|
id: null
|
|
20006
20057
|
});
|
|
@@ -20023,8 +20074,9 @@ var ReadTip = defineComponent({
|
|
|
20023
20074
|
rule.status = true;
|
|
20024
20075
|
}
|
|
20025
20076
|
const rules2 = (rules3) => {
|
|
20026
|
-
if (rules3 === null)
|
|
20077
|
+
if (rules3 === null) {
|
|
20027
20078
|
return;
|
|
20079
|
+
}
|
|
20028
20080
|
if (typeof rules3 === "object" && !Array.isArray(rules3)) {
|
|
20029
20081
|
rules3 = [rules3];
|
|
20030
20082
|
}
|
|
@@ -20129,7 +20181,7 @@ var Result = defineComponent({
|
|
|
20129
20181
|
var _a, _b, _c, _d;
|
|
20130
20182
|
return createVNode("div", {
|
|
20131
20183
|
"class": "devui-result"
|
|
20132
|
-
}, [ctx2.slots.icon ? createVNode("div", null, [(_a = ctx2.slots) == null ? void 0 : _a.icon()]) : createVNode(
|
|
20184
|
+
}, [ctx2.slots.icon ? createVNode("div", null, [(_a = ctx2.slots) == null ? void 0 : _a.icon()]) : createVNode(DIcon, {
|
|
20133
20185
|
"name": IconEnum[props.icon] || "",
|
|
20134
20186
|
"class": `devui-result__icon-${props.icon}`,
|
|
20135
20187
|
"size": "64px"
|
|
@@ -20159,9 +20211,9 @@ const DEFAULT_PLUGIN_OPTIONS = {
|
|
|
20159
20211
|
color: "currentColor",
|
|
20160
20212
|
initialOpacity: 0.2,
|
|
20161
20213
|
finalOpacity: 0.1,
|
|
20162
|
-
duration:
|
|
20214
|
+
duration: 400,
|
|
20163
20215
|
easing: "ease-out",
|
|
20164
|
-
|
|
20216
|
+
delay: 75,
|
|
20165
20217
|
disabled: false
|
|
20166
20218
|
};
|
|
20167
20219
|
const createContainer = ({
|
|
@@ -20193,7 +20245,7 @@ const createrippleElement = (x, y, size, options) => {
|
|
|
20193
20245
|
rippleElement.style.borderRadius = "50%";
|
|
20194
20246
|
rippleElement.style.opacity = `${options.initialOpacity}`;
|
|
20195
20247
|
rippleElement.style.transform = `translate(-50%,-50%) scale(0)`;
|
|
20196
|
-
rippleElement.style.transition = `transform ${options.duration}s ${options.easing}, opacity ${options.duration}s ${options.easing}`;
|
|
20248
|
+
rippleElement.style.transition = `transform ${options.duration / 1e3}s ${options.easing}, opacity ${options.duration / 1e3}s ${options.easing}`;
|
|
20197
20249
|
return rippleElement;
|
|
20198
20250
|
};
|
|
20199
20251
|
function magnitude(x1, y1, x2, y2) {
|
|
@@ -20213,6 +20265,13 @@ const getRelativePointer = ({ x, y }, { top, left }) => ({
|
|
|
20213
20265
|
y: y - top
|
|
20214
20266
|
});
|
|
20215
20267
|
const RIPPLE_COUNT = "vRippleCountInternal";
|
|
20268
|
+
function setRippleCount(el, count) {
|
|
20269
|
+
el.dataset[RIPPLE_COUNT] = count.toString();
|
|
20270
|
+
}
|
|
20271
|
+
function getRippleCount(el) {
|
|
20272
|
+
var _a;
|
|
20273
|
+
return parseInt((_a = el.dataset[RIPPLE_COUNT]) != null ? _a : "0", 10);
|
|
20274
|
+
}
|
|
20216
20275
|
function incrementRippleCount(el) {
|
|
20217
20276
|
const count = getRippleCount(el);
|
|
20218
20277
|
setRippleCount(el, count + 1);
|
|
@@ -20221,13 +20280,6 @@ function decrementRippleCount(el) {
|
|
|
20221
20280
|
const count = getRippleCount(el);
|
|
20222
20281
|
setRippleCount(el, count - 1);
|
|
20223
20282
|
}
|
|
20224
|
-
function setRippleCount(el, count) {
|
|
20225
|
-
el.dataset[RIPPLE_COUNT] = count.toString();
|
|
20226
|
-
}
|
|
20227
|
-
function getRippleCount(el) {
|
|
20228
|
-
var _a;
|
|
20229
|
-
return parseInt((_a = el.dataset[RIPPLE_COUNT]) != null ? _a : "0", 10);
|
|
20230
|
-
}
|
|
20231
20283
|
function deleteRippleCount(el) {
|
|
20232
20284
|
delete el.dataset[RIPPLE_COUNT];
|
|
20233
20285
|
}
|
|
@@ -20239,27 +20291,10 @@ const ripple = (event, el, options) => {
|
|
|
20239
20291
|
const size = MULTIPLE_NUMBER * getDistanceToFurthestCorner(x, y, rect);
|
|
20240
20292
|
const rippleContainer = createContainer(computedStyles);
|
|
20241
20293
|
const rippleEl = createrippleElement(x, y, size, options);
|
|
20242
|
-
incrementRippleCount(el);
|
|
20243
20294
|
let originalPositionValue = "";
|
|
20244
|
-
if (computedStyles.position === "static") {
|
|
20245
|
-
if (el.style.position)
|
|
20246
|
-
originalPositionValue = el.style.position;
|
|
20247
|
-
el.style.position = "relative";
|
|
20248
|
-
}
|
|
20249
|
-
rippleContainer.appendChild(rippleEl);
|
|
20250
|
-
el.appendChild(rippleContainer);
|
|
20251
20295
|
let shouldDissolveripple = false;
|
|
20252
|
-
|
|
20253
|
-
|
|
20254
|
-
document.removeEventListener("pointerup", releaseripple);
|
|
20255
|
-
document.removeEventListener("pointercancel", releaseripple);
|
|
20256
|
-
}
|
|
20257
|
-
if (shouldDissolveripple)
|
|
20258
|
-
dissolveripple();
|
|
20259
|
-
else
|
|
20260
|
-
shouldDissolveripple = true;
|
|
20261
|
-
};
|
|
20262
|
-
const dissolveripple = () => {
|
|
20296
|
+
let token = null;
|
|
20297
|
+
function dissolveripple() {
|
|
20263
20298
|
rippleEl.style.transition = "opacity 150ms linear";
|
|
20264
20299
|
rippleEl.style.opacity = "0";
|
|
20265
20300
|
setTimeout(() => {
|
|
@@ -20270,24 +20305,44 @@ const ripple = (event, el, options) => {
|
|
|
20270
20305
|
el.style.position = originalPositionValue;
|
|
20271
20306
|
}
|
|
20272
20307
|
}, 150);
|
|
20273
|
-
}
|
|
20308
|
+
}
|
|
20309
|
+
function releaseripple(e) {
|
|
20310
|
+
if (typeof e !== "undefined") {
|
|
20311
|
+
document.removeEventListener("pointerup", releaseripple);
|
|
20312
|
+
document.removeEventListener("pointercancel", releaseripple);
|
|
20313
|
+
}
|
|
20314
|
+
if (shouldDissolveripple) {
|
|
20315
|
+
dissolveripple();
|
|
20316
|
+
} else {
|
|
20317
|
+
shouldDissolveripple = true;
|
|
20318
|
+
}
|
|
20319
|
+
}
|
|
20320
|
+
function cancelripple() {
|
|
20321
|
+
clearTimeout(token);
|
|
20322
|
+
rippleContainer.remove();
|
|
20323
|
+
document.removeEventListener("pointerup", releaseripple);
|
|
20324
|
+
document.removeEventListener("pointercancel", releaseripple);
|
|
20325
|
+
document.removeEventListener("pointercancel", cancelripple);
|
|
20326
|
+
}
|
|
20327
|
+
incrementRippleCount(el);
|
|
20328
|
+
if (computedStyles.position === "static") {
|
|
20329
|
+
if (el.style.position) {
|
|
20330
|
+
originalPositionValue = el.style.position;
|
|
20331
|
+
}
|
|
20332
|
+
el.style.position = "relative";
|
|
20333
|
+
}
|
|
20334
|
+
rippleContainer.appendChild(rippleEl);
|
|
20335
|
+
el.appendChild(rippleContainer);
|
|
20274
20336
|
document.addEventListener("pointerup", releaseripple);
|
|
20275
20337
|
document.addEventListener("pointercancel", releaseripple);
|
|
20276
|
-
|
|
20338
|
+
token = setTimeout(() => {
|
|
20277
20339
|
document.removeEventListener("pointercancel", cancelripple);
|
|
20278
20340
|
requestAnimationFrame(() => {
|
|
20279
20341
|
rippleEl.style.transform = `translate(-50%,-50%) scale(1)`;
|
|
20280
20342
|
rippleEl.style.opacity = `${options.finalOpacity}`;
|
|
20281
|
-
setTimeout(() => releaseripple(), options.duration
|
|
20343
|
+
setTimeout(() => releaseripple(), options.duration);
|
|
20282
20344
|
});
|
|
20283
|
-
}, options.
|
|
20284
|
-
const cancelripple = () => {
|
|
20285
|
-
clearTimeout(token);
|
|
20286
|
-
rippleContainer.remove();
|
|
20287
|
-
document.removeEventListener("pointerup", releaseripple);
|
|
20288
|
-
document.removeEventListener("pointercancel", releaseripple);
|
|
20289
|
-
document.removeEventListener("pointercancel", cancelripple);
|
|
20290
|
-
};
|
|
20345
|
+
}, options.delay);
|
|
20291
20346
|
document.addEventListener("pointercancel", cancelripple);
|
|
20292
20347
|
};
|
|
20293
20348
|
const optionMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -20298,10 +20353,12 @@ var RippleDirective = {
|
|
|
20298
20353
|
optionMap.set(el, (_a = binding.value) != null ? _a : {});
|
|
20299
20354
|
el.addEventListener("pointerdown", (event) => {
|
|
20300
20355
|
const options = optionMap.get(el);
|
|
20301
|
-
if (binding.value && binding.value.disabled)
|
|
20356
|
+
if (binding.value && binding.value.disabled) {
|
|
20302
20357
|
return;
|
|
20303
|
-
|
|
20358
|
+
}
|
|
20359
|
+
if (options === false) {
|
|
20304
20360
|
return;
|
|
20361
|
+
}
|
|
20305
20362
|
ripple(event, el, __spreadValues(__spreadValues({}, globalOptions), options));
|
|
20306
20363
|
});
|
|
20307
20364
|
},
|
|
@@ -20491,15 +20548,12 @@ var DSearch = defineComponent({
|
|
|
20491
20548
|
};
|
|
20492
20549
|
}
|
|
20493
20550
|
});
|
|
20494
|
-
DSearch.install = function(app) {
|
|
20495
|
-
app.component(DSearch.name, DSearch);
|
|
20496
|
-
};
|
|
20497
20551
|
var SearchInstall = {
|
|
20498
20552
|
title: "Search \u641C\u7D22\u6846",
|
|
20499
20553
|
category: "\u901A\u7528",
|
|
20500
20554
|
status: "100%",
|
|
20501
20555
|
install(app) {
|
|
20502
|
-
app.
|
|
20556
|
+
app.component(DSearch.name, DSearch);
|
|
20503
20557
|
}
|
|
20504
20558
|
};
|
|
20505
20559
|
const selectProps = {
|
|
@@ -20601,8 +20655,9 @@ var Select = defineComponent({
|
|
|
20601
20655
|
const dropdownRef = ref(null);
|
|
20602
20656
|
const isOpen = ref(false);
|
|
20603
20657
|
function toggleChange(bool) {
|
|
20604
|
-
if (props.disabled)
|
|
20658
|
+
if (props.disabled) {
|
|
20605
20659
|
return;
|
|
20660
|
+
}
|
|
20606
20661
|
isOpen.value = bool;
|
|
20607
20662
|
ctx2.emit("toggleChange", bool);
|
|
20608
20663
|
}
|
|
@@ -20617,7 +20672,6 @@ var Select = defineComponent({
|
|
|
20617
20672
|
if (typeof item2 === "object") {
|
|
20618
20673
|
option2 = __spreadValues({
|
|
20619
20674
|
name: item2.name ? item2.name : item2.value + "",
|
|
20620
|
-
value: item2.value,
|
|
20621
20675
|
_checked: false
|
|
20622
20676
|
}, item2);
|
|
20623
20677
|
} else {
|
|
@@ -20642,7 +20696,7 @@ var Select = defineComponent({
|
|
|
20642
20696
|
var _a;
|
|
20643
20697
|
if (props.multiple && Array.isArray(props.modelValue)) {
|
|
20644
20698
|
const selectedOptions = getValuesOption(props.modelValue);
|
|
20645
|
-
return selectedOptions.map((item2) => item2.name).join(",");
|
|
20699
|
+
return selectedOptions.map((item2) => (item2 == null ? void 0 : item2.name) || "").join(",");
|
|
20646
20700
|
} else if (!Array.isArray(props.modelValue)) {
|
|
20647
20701
|
return ((_a = getValuesOption([props.modelValue])[0]) == null ? void 0 : _a.name) || "";
|
|
20648
20702
|
}
|
|
@@ -20659,11 +20713,12 @@ var Select = defineComponent({
|
|
|
20659
20713
|
let {
|
|
20660
20714
|
modelValue
|
|
20661
20715
|
} = props;
|
|
20662
|
-
if (disabledKey && !!item2[disabledKey])
|
|
20716
|
+
if (disabledKey && !!item2[disabledKey]) {
|
|
20663
20717
|
return;
|
|
20718
|
+
}
|
|
20664
20719
|
if (multiple) {
|
|
20665
20720
|
item2._checked = !item2._checked;
|
|
20666
|
-
modelValue = mergeOptions.value.filter((
|
|
20721
|
+
modelValue = mergeOptions.value.filter((item1) => item1._checked).map((item22) => item22.value);
|
|
20667
20722
|
ctx2.emit("update:modelValue", modelValue);
|
|
20668
20723
|
} else {
|
|
20669
20724
|
ctx2.emit("update:modelValue", item2.value);
|
|
@@ -20750,11 +20805,11 @@ var Select = defineComponent({
|
|
|
20750
20805
|
}, null), createVNode("span", {
|
|
20751
20806
|
"onClick": handleClear,
|
|
20752
20807
|
"class": "devui-select-clear"
|
|
20753
|
-
}, [createVNode(
|
|
20808
|
+
}, [createVNode(DIcon, {
|
|
20754
20809
|
"name": "close"
|
|
20755
20810
|
}, null)]), createVNode("span", {
|
|
20756
20811
|
"class": "devui-select-arrow"
|
|
20757
|
-
}, [createVNode(
|
|
20812
|
+
}, [createVNode(DIcon, {
|
|
20758
20813
|
"name": "select-arrow"
|
|
20759
20814
|
}, null)])]), createVNode(Transition, {
|
|
20760
20815
|
"name": "fade",
|
|
@@ -20780,15 +20835,12 @@ var Select = defineComponent({
|
|
|
20780
20835
|
})]);
|
|
20781
20836
|
}
|
|
20782
20837
|
});
|
|
20783
|
-
Select.install = function(app) {
|
|
20784
|
-
app.component(Select.name, Select);
|
|
20785
|
-
};
|
|
20786
20838
|
var SelectInstall = {
|
|
20787
20839
|
title: "Select \u4E0B\u62C9\u6846",
|
|
20788
20840
|
category: "\u6570\u636E\u5F55\u5165",
|
|
20789
20841
|
status: "10%",
|
|
20790
20842
|
install(app) {
|
|
20791
|
-
app.
|
|
20843
|
+
app.component(Select.name, Select);
|
|
20792
20844
|
}
|
|
20793
20845
|
};
|
|
20794
20846
|
var skeleton = "";
|
|
@@ -20902,32 +20954,32 @@ var Skeleton = defineComponent({
|
|
|
20902
20954
|
})]), [[vShow, isShown]]);
|
|
20903
20955
|
}
|
|
20904
20956
|
function renderAvatarStyle(avatarSize, avatarShape) {
|
|
20905
|
-
function renderAvatarShape(
|
|
20906
|
-
return
|
|
20957
|
+
function renderAvatarShape() {
|
|
20958
|
+
return avatarShape === "square" ? "" : "border-radius:50%;";
|
|
20907
20959
|
}
|
|
20908
|
-
function renderAvatarSize(
|
|
20909
|
-
switch (typeof
|
|
20960
|
+
function renderAvatarSize() {
|
|
20961
|
+
switch (typeof avatarSize) {
|
|
20910
20962
|
case "string":
|
|
20911
|
-
return `width:${
|
|
20963
|
+
return `width:${avatarSize};height:${avatarSize};`;
|
|
20912
20964
|
case "number":
|
|
20913
|
-
return `width:${
|
|
20965
|
+
return `width:${avatarSize}px;height:${avatarSize}px;`;
|
|
20914
20966
|
}
|
|
20915
20967
|
}
|
|
20916
|
-
return renderAvatarSize(
|
|
20968
|
+
return renderAvatarSize() + renderAvatarShape();
|
|
20917
20969
|
}
|
|
20918
20970
|
function renderTitle(isVisible, titleWidth, isRound) {
|
|
20919
|
-
function renderTitleWidth(
|
|
20920
|
-
switch (typeof
|
|
20971
|
+
function renderTitleWidth() {
|
|
20972
|
+
switch (typeof titleWidth) {
|
|
20921
20973
|
case "string":
|
|
20922
|
-
return `width: ${
|
|
20974
|
+
return `width: ${titleWidth};`;
|
|
20923
20975
|
case "number":
|
|
20924
|
-
return `width: ${
|
|
20976
|
+
return `width: ${titleWidth}px;`;
|
|
20925
20977
|
}
|
|
20926
20978
|
}
|
|
20927
|
-
function renderTitleVisibility(
|
|
20928
|
-
return
|
|
20979
|
+
function renderTitleVisibility() {
|
|
20980
|
+
return isVisible ? null : "visibility: hidden;";
|
|
20929
20981
|
}
|
|
20930
|
-
return renderTitleWidth(
|
|
20982
|
+
return renderTitleWidth() + renderBorderRadius(isRound) + renderTitleVisibility();
|
|
20931
20983
|
}
|
|
20932
20984
|
function renderDefaultSkeleton() {
|
|
20933
20985
|
return createVNode(Fragment, null, [withDirectives(createVNode("div", {
|
|
@@ -21048,10 +21100,10 @@ var SkeletonItem = defineComponent({
|
|
|
21048
21100
|
})]);
|
|
21049
21101
|
}
|
|
21050
21102
|
function renderAvatarStyle(avatarShape) {
|
|
21051
|
-
function renderAvatarShape(
|
|
21052
|
-
return
|
|
21103
|
+
function renderAvatarShape() {
|
|
21104
|
+
return avatarShape === "square" ? "" : "border-radius:50%;";
|
|
21053
21105
|
}
|
|
21054
|
-
return renderAvatarShape(
|
|
21106
|
+
return renderAvatarShape();
|
|
21055
21107
|
}
|
|
21056
21108
|
return () => {
|
|
21057
21109
|
var _a;
|
|
@@ -21131,33 +21183,41 @@ var Slider = defineComponent({
|
|
|
21131
21183
|
const currentPosition = ref(0);
|
|
21132
21184
|
const newPostion = ref(0);
|
|
21133
21185
|
const percentDispaly = ref("");
|
|
21134
|
-
|
|
21135
|
-
|
|
21136
|
-
|
|
21137
|
-
|
|
21138
|
-
"
|
|
21139
|
-
|
|
21140
|
-
|
|
21141
|
-
|
|
21142
|
-
|
|
21143
|
-
|
|
21144
|
-
|
|
21145
|
-
|
|
21146
|
-
|
|
21147
|
-
|
|
21186
|
+
function handleOnInput(event) {
|
|
21187
|
+
inputValue.value = parseInt(event.target.value);
|
|
21188
|
+
if (!inputValue.value) {
|
|
21189
|
+
inputValue.value = props.min;
|
|
21190
|
+
percentDispaly.value = "0%";
|
|
21191
|
+
} else {
|
|
21192
|
+
if (inputValue.value < props.min || inputValue.value > props.max) {
|
|
21193
|
+
return;
|
|
21194
|
+
}
|
|
21195
|
+
const re = /^(?:[1-9]?\d|100)$/;
|
|
21196
|
+
if (re.test(`${inputValue.value}`)) {
|
|
21197
|
+
percentDispaly.value = (inputValue.value - props.min) * 100 / (props.max - props.min) + "%";
|
|
21198
|
+
ctx2.emit("update:modelValue", inputValue.value);
|
|
21199
|
+
}
|
|
21200
|
+
}
|
|
21148
21201
|
}
|
|
21149
|
-
|
|
21150
|
-
const sliderWidth = sliderRunway.value.clientWidth;
|
|
21151
|
-
|
|
21152
|
-
|
|
21153
|
-
|
|
21154
|
-
|
|
21155
|
-
|
|
21202
|
+
function setPostion(newPosition) {
|
|
21203
|
+
const sliderWidth = Math.round(sliderRunway.value.clientWidth);
|
|
21204
|
+
if (newPosition < 0) {
|
|
21205
|
+
newPosition = 0;
|
|
21206
|
+
}
|
|
21207
|
+
const LengthPerStep = sliderWidth / ((props.max - props.min) / props.step);
|
|
21208
|
+
const steps = Math.round(newPosition / LengthPerStep);
|
|
21209
|
+
const value = steps * LengthPerStep;
|
|
21210
|
+
if (Math.round(value) >= sliderWidth) {
|
|
21211
|
+
currentPosition.value = sliderWidth;
|
|
21212
|
+
inputValue.value = props.max;
|
|
21213
|
+
percentDispaly.value = "100%";
|
|
21214
|
+
ctx2.emit("update:modelValue", props.max);
|
|
21156
21215
|
return;
|
|
21157
|
-
|
|
21158
|
-
|
|
21159
|
-
|
|
21160
|
-
|
|
21216
|
+
}
|
|
21217
|
+
percentDispaly.value = Math.round(value * 100 / sliderWidth) + "%";
|
|
21218
|
+
inputValue.value = Math.round(value * (props.max - props.min) / sliderWidth) + props.min;
|
|
21219
|
+
currentPosition.value = newPosition;
|
|
21220
|
+
ctx2.emit("update:modelValue", inputValue.value);
|
|
21161
21221
|
}
|
|
21162
21222
|
function dragStart(event) {
|
|
21163
21223
|
isClick = false;
|
|
@@ -21180,25 +21240,34 @@ var Slider = defineComponent({
|
|
|
21180
21240
|
window.removeEventListener("mousemove", onDragging);
|
|
21181
21241
|
window.removeEventListener("mouseup", onDragEnd);
|
|
21182
21242
|
}
|
|
21183
|
-
|
|
21184
|
-
|
|
21185
|
-
|
|
21186
|
-
|
|
21187
|
-
|
|
21188
|
-
|
|
21189
|
-
|
|
21190
|
-
|
|
21191
|
-
|
|
21192
|
-
|
|
21193
|
-
|
|
21194
|
-
|
|
21195
|
-
|
|
21243
|
+
const renderShowInput = () => {
|
|
21244
|
+
return props.showInput ? createVNode("div", {
|
|
21245
|
+
"class": "devui-input__out-wrap"
|
|
21246
|
+
}, [createVNode("input", {
|
|
21247
|
+
"onInput": handleOnInput,
|
|
21248
|
+
"value": inputValue.value + ""
|
|
21249
|
+
}, null)]) : "";
|
|
21250
|
+
};
|
|
21251
|
+
if (props.modelValue > props.max) {
|
|
21252
|
+
percentDispaly.value = "100%";
|
|
21253
|
+
} else if (props.modelValue < props.min) {
|
|
21254
|
+
percentDispaly.value = "0%";
|
|
21255
|
+
} else {
|
|
21256
|
+
percentDispaly.value = (props.modelValue - props.min) * 100 / (props.max - props.min) + "%";
|
|
21257
|
+
}
|
|
21258
|
+
onMounted(() => {
|
|
21259
|
+
const sliderWidth = sliderRunway.value.clientWidth;
|
|
21260
|
+
currentPosition.value = sliderWidth * (inputValue.value - props.min) / (props.max - props.min);
|
|
21261
|
+
});
|
|
21262
|
+
function handleButtonMousedown(event) {
|
|
21263
|
+
popoverShow.value = true;
|
|
21264
|
+
if (props.disabled) {
|
|
21196
21265
|
return;
|
|
21197
21266
|
}
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21267
|
+
event.preventDefault();
|
|
21268
|
+
dragStart(event);
|
|
21269
|
+
window.addEventListener("mousemove", onDragging);
|
|
21270
|
+
window.addEventListener("mouseup", onDragEnd);
|
|
21202
21271
|
}
|
|
21203
21272
|
function handleRunwayMousedown(event) {
|
|
21204
21273
|
if (!props.disabled && isClick) {
|
|
@@ -21210,22 +21279,6 @@ var Slider = defineComponent({
|
|
|
21210
21279
|
return;
|
|
21211
21280
|
}
|
|
21212
21281
|
}
|
|
21213
|
-
function handleOnInput(event) {
|
|
21214
|
-
inputValue.value = parseInt(event.target.value);
|
|
21215
|
-
if (!inputValue.value) {
|
|
21216
|
-
inputValue.value = props.min;
|
|
21217
|
-
percentDispaly.value = "0%";
|
|
21218
|
-
} else {
|
|
21219
|
-
if (inputValue.value < props.min || inputValue.value > props.max) {
|
|
21220
|
-
return;
|
|
21221
|
-
}
|
|
21222
|
-
const re = /^(?:[1-9]?\d|100)$/;
|
|
21223
|
-
if (re.test(`${inputValue.value}`)) {
|
|
21224
|
-
percentDispaly.value = (inputValue.value - props.min) * 100 / (props.max - props.min) + "%";
|
|
21225
|
-
ctx2.emit("update:modelValue", inputValue.value);
|
|
21226
|
-
}
|
|
21227
|
-
}
|
|
21228
|
-
}
|
|
21229
21282
|
const disableClass = computed(() => {
|
|
21230
21283
|
return props.disabled ? " disabled" : "";
|
|
21231
21284
|
});
|
|
@@ -21277,25 +21330,7 @@ var SliderInstall = {
|
|
|
21277
21330
|
category: "\u6570\u636E\u5F55\u5165",
|
|
21278
21331
|
status: "100%",
|
|
21279
21332
|
install(app) {
|
|
21280
|
-
app.
|
|
21281
|
-
}
|
|
21282
|
-
};
|
|
21283
|
-
const splitterProps = {
|
|
21284
|
-
orientation: {
|
|
21285
|
-
type: String,
|
|
21286
|
-
default: "horizontal"
|
|
21287
|
-
},
|
|
21288
|
-
splitBarSize: {
|
|
21289
|
-
type: String,
|
|
21290
|
-
default: "2px"
|
|
21291
|
-
},
|
|
21292
|
-
disabledBarSize: {
|
|
21293
|
-
type: String,
|
|
21294
|
-
default: "1px"
|
|
21295
|
-
},
|
|
21296
|
-
showCollapseButton: {
|
|
21297
|
-
type: Boolean,
|
|
21298
|
-
default: true
|
|
21333
|
+
app.component(Slider.name, Slider);
|
|
21299
21334
|
}
|
|
21300
21335
|
};
|
|
21301
21336
|
const tooltipProps = {
|
|
@@ -21447,57 +21482,58 @@ function removeClass(el, className2) {
|
|
|
21447
21482
|
}
|
|
21448
21483
|
}
|
|
21449
21484
|
}
|
|
21450
|
-
|
|
21451
|
-
|
|
21452
|
-
|
|
21453
|
-
|
|
21454
|
-
|
|
21455
|
-
|
|
21456
|
-
|
|
21457
|
-
|
|
21458
|
-
|
|
21459
|
-
|
|
21460
|
-
|
|
21461
|
-
}
|
|
21462
|
-
};
|
|
21463
|
-
function bindEvent(el) {
|
|
21464
|
-
bind(el, "mousedown", onMousedown);
|
|
21485
|
+
function normalizeEvent(evt) {
|
|
21486
|
+
return {
|
|
21487
|
+
pageX: evt.pageX,
|
|
21488
|
+
pageY: evt.pageY,
|
|
21489
|
+
clientX: evt.clientX,
|
|
21490
|
+
clientY: evt.clientY,
|
|
21491
|
+
offsetX: evt.offsetX,
|
|
21492
|
+
offsetY: evt.offsetY,
|
|
21493
|
+
type: evt.type,
|
|
21494
|
+
originalEvent: evt
|
|
21495
|
+
};
|
|
21465
21496
|
}
|
|
21466
|
-
function bind(el,
|
|
21467
|
-
el.addEventListener && el.addEventListener(
|
|
21497
|
+
function bind(el, eventName, callback) {
|
|
21498
|
+
el.addEventListener && el.addEventListener(eventName, callback);
|
|
21468
21499
|
}
|
|
21469
|
-
function unbind(el,
|
|
21470
|
-
el.removeEventListener && el.removeEventListener(
|
|
21500
|
+
function unbind(el, eventName, callback) {
|
|
21501
|
+
el.removeEventListener && el.removeEventListener(eventName, callback);
|
|
21471
21502
|
}
|
|
21472
21503
|
function onMousedown(e) {
|
|
21473
21504
|
var _a;
|
|
21474
|
-
const
|
|
21475
|
-
if (
|
|
21505
|
+
const resizeProps = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.resizeProps;
|
|
21506
|
+
if (!resizeProps) {
|
|
21476
21507
|
return;
|
|
21477
|
-
bind(document, "mousemove", onMousemove);
|
|
21478
|
-
bind(document, "mouseup", onMouseup);
|
|
21479
|
-
$value.onPressEvent(normalizeEvent(e));
|
|
21480
|
-
function onMousemove(e2) {
|
|
21481
|
-
$value.onDragEvent(normalizeEvent(e2));
|
|
21482
21508
|
}
|
|
21483
|
-
function
|
|
21509
|
+
function onMousemove(evt) {
|
|
21510
|
+
resizeProps.onDragEvent(normalizeEvent(evt));
|
|
21511
|
+
}
|
|
21512
|
+
function onMouseup(evt) {
|
|
21484
21513
|
unbind(document, "mousemove", onMousemove);
|
|
21485
21514
|
unbind(document, "mouseup", onMouseup);
|
|
21486
|
-
|
|
21515
|
+
resizeProps.onReleaseEvent(normalizeEvent(evt));
|
|
21487
21516
|
}
|
|
21517
|
+
bind(document, "mousemove", onMousemove);
|
|
21518
|
+
bind(document, "mouseup", onMouseup);
|
|
21519
|
+
resizeProps.onPressEvent(normalizeEvent(e));
|
|
21488
21520
|
}
|
|
21489
|
-
function
|
|
21490
|
-
|
|
21491
|
-
pageX: e.pageX,
|
|
21492
|
-
pageY: e.pageY,
|
|
21493
|
-
clientX: e.clientX,
|
|
21494
|
-
clientY: e.clientY,
|
|
21495
|
-
offsetX: e.offsetX,
|
|
21496
|
-
offsetY: e.offsetY,
|
|
21497
|
-
type: e.type,
|
|
21498
|
-
originalEvent: e
|
|
21499
|
-
};
|
|
21521
|
+
function bindEvent(el) {
|
|
21522
|
+
bind(el, "mousedown", onMousedown);
|
|
21500
21523
|
}
|
|
21524
|
+
const resize = {
|
|
21525
|
+
mounted(el, { value }) {
|
|
21526
|
+
el.resizeProps = value;
|
|
21527
|
+
if (value.enableResize) {
|
|
21528
|
+
bindEvent(el);
|
|
21529
|
+
}
|
|
21530
|
+
},
|
|
21531
|
+
unmounted(el, { value }) {
|
|
21532
|
+
if (value.enableResize) {
|
|
21533
|
+
unbind(el, "mousedown", onMousedown);
|
|
21534
|
+
}
|
|
21535
|
+
}
|
|
21536
|
+
};
|
|
21501
21537
|
const splitterBarProps = {
|
|
21502
21538
|
index: {
|
|
21503
21539
|
type: Number
|
|
@@ -21541,10 +21577,13 @@ var DSplitterBar = defineComponent({
|
|
|
21541
21577
|
}, {
|
|
21542
21578
|
immediate: true
|
|
21543
21579
|
});
|
|
21544
|
-
watch([() => store.state.panes, domRef], ([
|
|
21580
|
+
watch([() => store == null ? void 0 : store.state.panes, domRef], ([, ele]) => {
|
|
21581
|
+
if (!store || !props || props.index === void 0) {
|
|
21582
|
+
return;
|
|
21583
|
+
}
|
|
21545
21584
|
if (!store.isStaticBar(props.index)) {
|
|
21546
21585
|
state.wrapperClass += " resizable";
|
|
21547
|
-
} else {
|
|
21586
|
+
} else if (ele) {
|
|
21548
21587
|
setStyle(ele, {
|
|
21549
21588
|
flexBasis: props.disabledBarSize
|
|
21550
21589
|
});
|
|
@@ -21552,71 +21591,22 @@ var DSplitterBar = defineComponent({
|
|
|
21552
21591
|
}, {
|
|
21553
21592
|
deep: true
|
|
21554
21593
|
});
|
|
21555
|
-
const
|
|
21556
|
-
|
|
21557
|
-
|
|
21558
|
-
|
|
21559
|
-
|
|
21560
|
-
|
|
21561
|
-
|
|
21562
|
-
|
|
21563
|
-
|
|
21564
|
-
|
|
21565
|
-
originalEvent
|
|
21566
|
-
}) {
|
|
21567
|
-
originalEvent.stopPropagation();
|
|
21568
|
-
if (!store.isResizable(props.index))
|
|
21569
|
-
return;
|
|
21570
|
-
initState2 = store.dragState(props.index);
|
|
21571
|
-
coordinate.originalX = originalEvent.pageX;
|
|
21572
|
-
coordinate.originalY = originalEvent.pageY;
|
|
21573
|
-
},
|
|
21574
|
-
onDragEvent: function({
|
|
21575
|
-
originalEvent
|
|
21576
|
-
}) {
|
|
21577
|
-
originalEvent.stopPropagation();
|
|
21578
|
-
if (!store.isResizable(props.index))
|
|
21579
|
-
return;
|
|
21580
|
-
coordinate.pageX = originalEvent.pageX;
|
|
21581
|
-
coordinate.pageY = originalEvent.pageY;
|
|
21582
|
-
let distance;
|
|
21583
|
-
if (props.orientation === "vertical") {
|
|
21584
|
-
distance = coordinate.pageY - coordinate.originalY;
|
|
21585
|
-
} else {
|
|
21586
|
-
distance = coordinate.pageX - coordinate.originalX;
|
|
21587
|
-
}
|
|
21588
|
-
store.setSize(initState2, distance);
|
|
21589
|
-
},
|
|
21590
|
-
onReleaseEvent: function({
|
|
21591
|
-
originalEvent
|
|
21592
|
-
}) {
|
|
21593
|
-
originalEvent.stopPropagation();
|
|
21594
|
-
if (!store.isResizable(props.index))
|
|
21595
|
-
return;
|
|
21596
|
-
coordinate.pageX = originalEvent.pageX;
|
|
21597
|
-
coordinate.pageY = originalEvent.pageY;
|
|
21598
|
-
let distance;
|
|
21599
|
-
if (props.orientation === "vertical") {
|
|
21600
|
-
distance = coordinate.pageY - coordinate.originalY;
|
|
21601
|
-
} else {
|
|
21602
|
-
distance = coordinate.pageX - coordinate.originalX;
|
|
21603
|
-
}
|
|
21604
|
-
store.setSize(initState2, distance);
|
|
21605
|
-
}
|
|
21606
|
-
};
|
|
21607
|
-
const queryPanes = (index2, nearIndex) => {
|
|
21608
|
-
const pane = store.getPane(index2);
|
|
21609
|
-
const nearPane = store.getPane(nearIndex);
|
|
21610
|
-
return {
|
|
21611
|
-
pane,
|
|
21612
|
-
nearPane
|
|
21613
|
-
};
|
|
21594
|
+
const queryPanes = (index2, nearIndex) => {
|
|
21595
|
+
if (!store) {
|
|
21596
|
+
return {};
|
|
21597
|
+
}
|
|
21598
|
+
const pane = store.getPane(index2);
|
|
21599
|
+
const nearPane = store.getPane(nearIndex);
|
|
21600
|
+
return {
|
|
21601
|
+
pane,
|
|
21602
|
+
nearPane
|
|
21603
|
+
};
|
|
21614
21604
|
};
|
|
21615
21605
|
const generateCollapseClass = (pane, nearPane, showIcon) => {
|
|
21616
21606
|
var _a, _b, _c, _d;
|
|
21617
21607
|
const isCollapsible = ((_b = (_a = pane == null ? void 0 : pane.component) == null ? void 0 : _a.props) == null ? void 0 : _b.collapsible) && showIcon;
|
|
21618
21608
|
const isCollapsed = (_d = (_c = pane == null ? void 0 : pane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed;
|
|
21619
|
-
const isNearPaneCollapsed = nearPane.collapsed;
|
|
21609
|
+
const isNearPaneCollapsed = nearPane == null ? void 0 : nearPane.collapsed;
|
|
21620
21610
|
return {
|
|
21621
21611
|
"devui-collapse": isCollapsible,
|
|
21622
21612
|
collapsed: isCollapsed,
|
|
@@ -21625,6 +21615,9 @@ var DSplitterBar = defineComponent({
|
|
|
21625
21615
|
};
|
|
21626
21616
|
const prevClass = computed(() => {
|
|
21627
21617
|
var _a, _b;
|
|
21618
|
+
if (!props || props.index === void 0) {
|
|
21619
|
+
return {};
|
|
21620
|
+
}
|
|
21628
21621
|
const {
|
|
21629
21622
|
pane,
|
|
21630
21623
|
nearPane
|
|
@@ -21634,6 +21627,9 @@ var DSplitterBar = defineComponent({
|
|
|
21634
21627
|
});
|
|
21635
21628
|
const nextClass = computed(() => {
|
|
21636
21629
|
var _a, _b;
|
|
21630
|
+
if (!store || !props || props.index === void 0) {
|
|
21631
|
+
return {};
|
|
21632
|
+
}
|
|
21637
21633
|
const {
|
|
21638
21634
|
pane,
|
|
21639
21635
|
nearPane
|
|
@@ -21643,6 +21639,9 @@ var DSplitterBar = defineComponent({
|
|
|
21643
21639
|
});
|
|
21644
21640
|
const toggleResize = () => {
|
|
21645
21641
|
var _a, _b, _c, _d;
|
|
21642
|
+
if (!domRef.value || !props || props.index === void 0) {
|
|
21643
|
+
return;
|
|
21644
|
+
}
|
|
21646
21645
|
const {
|
|
21647
21646
|
pane,
|
|
21648
21647
|
nearPane
|
|
@@ -21655,10 +21654,16 @@ var DSplitterBar = defineComponent({
|
|
|
21655
21654
|
}
|
|
21656
21655
|
};
|
|
21657
21656
|
const handleCollapsePrePane = (lockStatus) => {
|
|
21657
|
+
if (!store || !props || props.index === void 0) {
|
|
21658
|
+
return;
|
|
21659
|
+
}
|
|
21658
21660
|
store.tooglePane(props.index, props.index + 1, lockStatus);
|
|
21659
21661
|
toggleResize();
|
|
21660
21662
|
};
|
|
21661
21663
|
const handleCollapseNextPane = (lockStatus) => {
|
|
21664
|
+
if (!store || !props || props.index === void 0) {
|
|
21665
|
+
return;
|
|
21666
|
+
}
|
|
21662
21667
|
store.tooglePane(props.index + 1, props.index, lockStatus);
|
|
21663
21668
|
toggleResize();
|
|
21664
21669
|
};
|
|
@@ -21666,11 +21671,78 @@ var DSplitterBar = defineComponent({
|
|
|
21666
21671
|
handleCollapsePrePane(true);
|
|
21667
21672
|
handleCollapseNextPane(true);
|
|
21668
21673
|
};
|
|
21674
|
+
const coordinate = {
|
|
21675
|
+
pageX: 0,
|
|
21676
|
+
pageY: 0,
|
|
21677
|
+
originalX: 0,
|
|
21678
|
+
originalY: 0
|
|
21679
|
+
};
|
|
21680
|
+
let initState2;
|
|
21681
|
+
const resizeProp = {
|
|
21682
|
+
enableResize: true,
|
|
21683
|
+
onPressEvent: function({
|
|
21684
|
+
originalEvent
|
|
21685
|
+
}) {
|
|
21686
|
+
originalEvent.stopPropagation();
|
|
21687
|
+
if (!store || !props || props.index === void 0) {
|
|
21688
|
+
return;
|
|
21689
|
+
}
|
|
21690
|
+
if (!store.isResizable(props.index)) {
|
|
21691
|
+
return;
|
|
21692
|
+
}
|
|
21693
|
+
initState2 = store.dragState(props.index);
|
|
21694
|
+
coordinate.originalX = originalEvent.pageX;
|
|
21695
|
+
coordinate.originalY = originalEvent.pageY;
|
|
21696
|
+
},
|
|
21697
|
+
onDragEvent: function({
|
|
21698
|
+
originalEvent
|
|
21699
|
+
}) {
|
|
21700
|
+
originalEvent.stopPropagation();
|
|
21701
|
+
if (!store || !props || props.index === void 0) {
|
|
21702
|
+
return;
|
|
21703
|
+
}
|
|
21704
|
+
if (!store.isResizable(props.index)) {
|
|
21705
|
+
return;
|
|
21706
|
+
}
|
|
21707
|
+
coordinate.pageX = originalEvent.pageX;
|
|
21708
|
+
coordinate.pageY = originalEvent.pageY;
|
|
21709
|
+
let distance;
|
|
21710
|
+
if (props.orientation === "vertical") {
|
|
21711
|
+
distance = coordinate.pageY - coordinate.originalY;
|
|
21712
|
+
} else {
|
|
21713
|
+
distance = coordinate.pageX - coordinate.originalX;
|
|
21714
|
+
}
|
|
21715
|
+
store.setSize(initState2, distance);
|
|
21716
|
+
},
|
|
21717
|
+
onReleaseEvent: function({
|
|
21718
|
+
originalEvent
|
|
21719
|
+
}) {
|
|
21720
|
+
originalEvent.stopPropagation();
|
|
21721
|
+
if (!store || !props || props.index === void 0) {
|
|
21722
|
+
return;
|
|
21723
|
+
}
|
|
21724
|
+
if (!store.isResizable(props.index)) {
|
|
21725
|
+
return;
|
|
21726
|
+
}
|
|
21727
|
+
coordinate.pageX = originalEvent.pageX;
|
|
21728
|
+
coordinate.pageY = originalEvent.pageY;
|
|
21729
|
+
let distance;
|
|
21730
|
+
if (props.orientation === "vertical") {
|
|
21731
|
+
distance = coordinate.pageY - coordinate.originalY;
|
|
21732
|
+
} else {
|
|
21733
|
+
distance = coordinate.pageX - coordinate.originalX;
|
|
21734
|
+
}
|
|
21735
|
+
store.setSize(initState2, distance);
|
|
21736
|
+
}
|
|
21737
|
+
};
|
|
21669
21738
|
onMounted(() => {
|
|
21670
21739
|
initialCollapseStatus();
|
|
21671
21740
|
});
|
|
21672
21741
|
const renderCollapsedTip = () => {
|
|
21673
21742
|
var _a, _b, _c, _d;
|
|
21743
|
+
if (!props || props.index === void 0) {
|
|
21744
|
+
return "\u6536\u8D77";
|
|
21745
|
+
}
|
|
21674
21746
|
const {
|
|
21675
21747
|
pane,
|
|
21676
21748
|
nearPane
|
|
@@ -21814,6 +21886,24 @@ class SplitterStore {
|
|
|
21814
21886
|
}
|
|
21815
21887
|
}
|
|
21816
21888
|
}
|
|
21889
|
+
const splitterProps = {
|
|
21890
|
+
orientation: {
|
|
21891
|
+
type: String,
|
|
21892
|
+
default: "horizontal"
|
|
21893
|
+
},
|
|
21894
|
+
splitBarSize: {
|
|
21895
|
+
type: String,
|
|
21896
|
+
default: "2px"
|
|
21897
|
+
},
|
|
21898
|
+
disabledBarSize: {
|
|
21899
|
+
type: String,
|
|
21900
|
+
default: "1px"
|
|
21901
|
+
},
|
|
21902
|
+
showCollapseButton: {
|
|
21903
|
+
type: Boolean,
|
|
21904
|
+
default: true
|
|
21905
|
+
}
|
|
21906
|
+
};
|
|
21817
21907
|
var splitter = "";
|
|
21818
21908
|
var Splitter = defineComponent({
|
|
21819
21909
|
name: "DSplitter",
|
|
@@ -21836,8 +21926,9 @@ var Splitter = defineComponent({
|
|
|
21836
21926
|
provide("splitterStore", store);
|
|
21837
21927
|
const domRef = ref();
|
|
21838
21928
|
const refreshSplitterContainerSize = () => {
|
|
21839
|
-
if (!domRef.value)
|
|
21929
|
+
if (!domRef.value) {
|
|
21840
21930
|
return;
|
|
21931
|
+
}
|
|
21841
21932
|
let containerSize = 0;
|
|
21842
21933
|
if (props.orientation === "vertical") {
|
|
21843
21934
|
containerSize = domRef.value.clientHeight;
|
|
@@ -21854,7 +21945,9 @@ var Splitter = defineComponent({
|
|
|
21854
21945
|
return;
|
|
21855
21946
|
}
|
|
21856
21947
|
refreshSplitterContainerSize();
|
|
21857
|
-
|
|
21948
|
+
if (domRef.value) {
|
|
21949
|
+
observer.observe(domRef.value);
|
|
21950
|
+
}
|
|
21858
21951
|
});
|
|
21859
21952
|
onUnmounted(() => {
|
|
21860
21953
|
observer.disconnect();
|
|
@@ -21950,27 +22043,35 @@ var SplitterPane = defineComponent({
|
|
|
21950
22043
|
}
|
|
21951
22044
|
};
|
|
21952
22045
|
watch([() => props.size, domRef], ([size, ele]) => {
|
|
21953
|
-
|
|
22046
|
+
if (size && ele) {
|
|
22047
|
+
setSizeStyle(size, ele);
|
|
22048
|
+
}
|
|
21954
22049
|
}, {
|
|
21955
22050
|
immediate: true
|
|
21956
22051
|
});
|
|
21957
22052
|
const orientation = inject("orientation");
|
|
21958
22053
|
let initialSize = "";
|
|
21959
22054
|
onMounted(() => {
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
|
|
21963
|
-
|
|
22055
|
+
if (props.size) {
|
|
22056
|
+
initialSize = props.size;
|
|
22057
|
+
}
|
|
22058
|
+
if (store) {
|
|
22059
|
+
store.setPanes({
|
|
22060
|
+
panes: store.state.panes
|
|
22061
|
+
});
|
|
22062
|
+
}
|
|
21964
22063
|
});
|
|
21965
22064
|
onUpdated(() => {
|
|
21966
|
-
store
|
|
21967
|
-
|
|
21968
|
-
|
|
22065
|
+
if (store) {
|
|
22066
|
+
store.setPanes({
|
|
22067
|
+
panes: store.state.panes
|
|
22068
|
+
});
|
|
22069
|
+
}
|
|
21969
22070
|
});
|
|
21970
22071
|
const getPaneSize = () => {
|
|
21971
22072
|
const ele = domRef.value;
|
|
21972
22073
|
if (!ele) {
|
|
21973
|
-
return;
|
|
22074
|
+
return 0;
|
|
21974
22075
|
}
|
|
21975
22076
|
if (orientation === "vertical") {
|
|
21976
22077
|
return ele.offsetHeight;
|
|
@@ -22327,15 +22428,12 @@ var Status = defineComponent({
|
|
|
22327
22428
|
};
|
|
22328
22429
|
}
|
|
22329
22430
|
});
|
|
22330
|
-
Status.install = function(app) {
|
|
22331
|
-
app.component(Status.name, Status);
|
|
22332
|
-
};
|
|
22333
22431
|
var StatusInstall = {
|
|
22334
22432
|
title: "Status \u72B6\u6001",
|
|
22335
22433
|
category: "\u901A\u7528",
|
|
22336
22434
|
status: "100%",
|
|
22337
22435
|
install(app) {
|
|
22338
|
-
app.
|
|
22436
|
+
app.component(Status.name, Status);
|
|
22339
22437
|
}
|
|
22340
22438
|
};
|
|
22341
22439
|
var stepsGuide = "";
|
|
@@ -22377,8 +22475,9 @@ function useStepsGuidePosition(props, currentStep) {
|
|
|
22377
22475
|
zIndex: props.zIndex
|
|
22378
22476
|
});
|
|
22379
22477
|
const updateGuidePosition = () => {
|
|
22380
|
-
if (!currentStep.value || !stepsRef.value)
|
|
22478
|
+
if (!currentStep.value || !stepsRef.value) {
|
|
22381
22479
|
return;
|
|
22480
|
+
}
|
|
22382
22481
|
const baseTop = window.pageYOffset - document.documentElement.clientTop;
|
|
22383
22482
|
const baseLeft = window.pageXOffset - document.documentElement.clientLeft;
|
|
22384
22483
|
const currentStepPosition = currentStep.value.position;
|
|
@@ -22461,8 +22560,9 @@ function useStepsGuideCtrl(props, ctx2, updateGuidePosition, stepIndex) {
|
|
|
22461
22560
|
console.error(`stepIndex is not within the value range`);
|
|
22462
22561
|
}
|
|
22463
22562
|
}
|
|
22464
|
-
if (index2 === -1)
|
|
22563
|
+
if (index2 === -1) {
|
|
22465
22564
|
closeGuide();
|
|
22565
|
+
}
|
|
22466
22566
|
};
|
|
22467
22567
|
return {
|
|
22468
22568
|
stepsCount,
|
|
@@ -22488,8 +22588,9 @@ var StepsGuide = defineComponent({
|
|
|
22488
22588
|
});
|
|
22489
22589
|
const currentStep = computed(() => {
|
|
22490
22590
|
const _step = props.steps[stepIndex.value];
|
|
22491
|
-
if (_step)
|
|
22591
|
+
if (_step) {
|
|
22492
22592
|
_step.position = _step.position || "top";
|
|
22593
|
+
}
|
|
22493
22594
|
return _step;
|
|
22494
22595
|
});
|
|
22495
22596
|
const {
|
|
@@ -22897,7 +22998,8 @@ const TableProps = {
|
|
|
22897
22998
|
type: String,
|
|
22898
22999
|
validator(value) {
|
|
22899
23000
|
return value === "sm" || value === "md" || value === "lg";
|
|
22900
|
-
}
|
|
23001
|
+
},
|
|
23002
|
+
default: "sm"
|
|
22901
23003
|
},
|
|
22902
23004
|
rowHoveredHighlight: {
|
|
22903
23005
|
type: Boolean,
|
|
@@ -22909,7 +23011,7 @@ const TableProps = {
|
|
|
22909
23011
|
},
|
|
22910
23012
|
checkable: {
|
|
22911
23013
|
type: Boolean,
|
|
22912
|
-
default:
|
|
23014
|
+
default: false
|
|
22913
23015
|
},
|
|
22914
23016
|
tableLayout: {
|
|
22915
23017
|
type: String,
|
|
@@ -22925,15 +23027,48 @@ const TableProps = {
|
|
|
22925
23027
|
headerBg: {
|
|
22926
23028
|
type: Boolean,
|
|
22927
23029
|
default: false
|
|
23030
|
+
},
|
|
23031
|
+
spanMethod: {
|
|
23032
|
+
type: Function
|
|
23033
|
+
},
|
|
23034
|
+
borderType: {
|
|
23035
|
+
type: String,
|
|
23036
|
+
default: ""
|
|
22928
23037
|
}
|
|
22929
23038
|
};
|
|
22930
23039
|
const TABLE_TOKEN = Symbol();
|
|
23040
|
+
function createBem(namespace, element, modifier) {
|
|
23041
|
+
let cls = namespace;
|
|
23042
|
+
if (element) {
|
|
23043
|
+
cls += `__${element}`;
|
|
23044
|
+
}
|
|
23045
|
+
if (modifier) {
|
|
23046
|
+
cls += `--${modifier}`;
|
|
23047
|
+
}
|
|
23048
|
+
return cls;
|
|
23049
|
+
}
|
|
23050
|
+
function useNamespace(block) {
|
|
23051
|
+
const namespace = `devui-${block}`;
|
|
23052
|
+
const b = () => createBem(namespace);
|
|
23053
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
23054
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
23055
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
23056
|
+
return {
|
|
23057
|
+
b,
|
|
23058
|
+
e,
|
|
23059
|
+
m,
|
|
23060
|
+
em
|
|
23061
|
+
};
|
|
23062
|
+
}
|
|
22931
23063
|
function useTable(props) {
|
|
23064
|
+
const ns = useNamespace("table");
|
|
22932
23065
|
const classes = computed(() => ({
|
|
22933
|
-
"
|
|
22934
|
-
"
|
|
22935
|
-
"header-bg": props.headerBg,
|
|
22936
|
-
"
|
|
23066
|
+
[ns.e("view")]: true,
|
|
23067
|
+
[ns.m("striped")]: props.striped,
|
|
23068
|
+
[ns.m("header-bg")]: props.headerBg,
|
|
23069
|
+
[ns.m("layout-auto")]: props.tableLayout === "auto",
|
|
23070
|
+
[ns.m(`${props.size}`)]: true,
|
|
23071
|
+
[ns.m(`${props.borderType}`)]: props.borderType
|
|
22937
23072
|
}));
|
|
22938
23073
|
const style2 = computed(() => ({
|
|
22939
23074
|
maxHeight: props.maxHeight,
|
|
@@ -22944,13 +23079,14 @@ function useTable(props) {
|
|
|
22944
23079
|
return { classes, style: style2 };
|
|
22945
23080
|
}
|
|
22946
23081
|
const useFixedColumn = (column) => {
|
|
23082
|
+
const ns = useNamespace("table");
|
|
22947
23083
|
const stickyCell = computed(() => {
|
|
22948
23084
|
const col2 = column.value;
|
|
22949
23085
|
if (col2.fixedLeft) {
|
|
22950
|
-
return
|
|
23086
|
+
return `${ns.m("sticky-cell")} left`;
|
|
22951
23087
|
}
|
|
22952
23088
|
if (col2.fixedRight) {
|
|
22953
|
-
return
|
|
23089
|
+
return `${ns.m("sticky-cell")} right`;
|
|
22954
23090
|
}
|
|
22955
23091
|
return void 0;
|
|
22956
23092
|
});
|
|
@@ -23093,10 +23229,10 @@ var ColGroup = defineComponent({
|
|
|
23093
23229
|
name: "DColGroup",
|
|
23094
23230
|
setup() {
|
|
23095
23231
|
const parent = inject(TABLE_TOKEN);
|
|
23096
|
-
const columns = parent.store.states._columns;
|
|
23097
|
-
return () => parent.props.tableLayout === "fixed" ? createVNode("colgroup", null, [parent.props.checkable ? createVNode("col", {
|
|
23232
|
+
const columns = parent == null ? void 0 : parent.store.states._columns;
|
|
23233
|
+
return () => (parent == null ? void 0 : parent.props.tableLayout) === "fixed" ? createVNode("colgroup", null, [parent.props.checkable ? createVNode("col", {
|
|
23098
23234
|
"width": 36
|
|
23099
|
-
}, null) : null, columns.value.map((column, index2) => {
|
|
23235
|
+
}, null) : null, columns == null ? void 0 : columns.value.map((column, index2) => {
|
|
23100
23236
|
return createVNode("col", {
|
|
23101
23237
|
"key": index2,
|
|
23102
23238
|
"width": column.realWidth
|
|
@@ -23276,8 +23412,6 @@ const Filter = defineComponent({
|
|
|
23276
23412
|
})]);
|
|
23277
23413
|
}
|
|
23278
23414
|
});
|
|
23279
|
-
var header = "";
|
|
23280
|
-
var body = "";
|
|
23281
23415
|
const useSort = (store, column) => {
|
|
23282
23416
|
const directionRef = ref("DESC");
|
|
23283
23417
|
watch([directionRef, column], ([direction, column2]) => {
|
|
@@ -23287,13 +23421,53 @@ const useSort = (store, column) => {
|
|
|
23287
23421
|
}, { immediate: true });
|
|
23288
23422
|
return directionRef;
|
|
23289
23423
|
};
|
|
23290
|
-
const
|
|
23424
|
+
const useFilter = (store, column) => {
|
|
23291
23425
|
const filteredRef = shallowRef();
|
|
23292
23426
|
watch(filteredRef, (results2) => {
|
|
23293
23427
|
store.filterData(column.value.field, results2);
|
|
23294
23428
|
});
|
|
23295
23429
|
return filteredRef;
|
|
23296
23430
|
};
|
|
23431
|
+
var TH = defineComponent({
|
|
23432
|
+
name: "DTableHeaderTh",
|
|
23433
|
+
props: {
|
|
23434
|
+
column: {
|
|
23435
|
+
type: Object,
|
|
23436
|
+
required: true
|
|
23437
|
+
}
|
|
23438
|
+
},
|
|
23439
|
+
setup(props) {
|
|
23440
|
+
const table2 = inject(TABLE_TOKEN);
|
|
23441
|
+
const {
|
|
23442
|
+
column
|
|
23443
|
+
} = toRefs(props);
|
|
23444
|
+
const directionRef = useSort(table2.store, column);
|
|
23445
|
+
const filteredRef = useFilter(table2.store, column);
|
|
23446
|
+
const {
|
|
23447
|
+
stickyCell,
|
|
23448
|
+
offsetStyle
|
|
23449
|
+
} = useFixedColumn(column);
|
|
23450
|
+
return () => {
|
|
23451
|
+
var _a, _b;
|
|
23452
|
+
return createVNode("th", {
|
|
23453
|
+
"class": stickyCell.value,
|
|
23454
|
+
"style": offsetStyle.value
|
|
23455
|
+
}, [createVNode("div", {
|
|
23456
|
+
"class": "header-container"
|
|
23457
|
+
}, [(_b = (_a = props.column).renderHeader) == null ? void 0 : _b.call(_a), props.column.filterable && createVNode(Filter, {
|
|
23458
|
+
"modelValue": filteredRef.value,
|
|
23459
|
+
"onUpdate:modelValue": ($event) => filteredRef.value = $event,
|
|
23460
|
+
"filterList": props.column.filterList,
|
|
23461
|
+
"customTemplate": props.column.customFilterTemplate
|
|
23462
|
+
}, null)]), props.column.sortable && createVNode(Sort, {
|
|
23463
|
+
"modelValue": directionRef.value,
|
|
23464
|
+
"onUpdate:modelValue": ($event) => directionRef.value = $event
|
|
23465
|
+
}, null)]);
|
|
23466
|
+
};
|
|
23467
|
+
}
|
|
23468
|
+
});
|
|
23469
|
+
var header = "";
|
|
23470
|
+
var body = "";
|
|
23297
23471
|
var TableHeader = defineComponent({
|
|
23298
23472
|
name: "DTableHeader",
|
|
23299
23473
|
setup() {
|
|
@@ -23304,60 +23478,111 @@ var TableHeader = defineComponent({
|
|
|
23304
23478
|
_columns: columns,
|
|
23305
23479
|
isFixedLeft
|
|
23306
23480
|
} = table2.store.states;
|
|
23481
|
+
const ns = useNamespace("table");
|
|
23307
23482
|
const thAttrs = computed(() => isFixedLeft.value ? {
|
|
23308
|
-
class: "
|
|
23483
|
+
class: `${ns.m("sticky-cell")} left`,
|
|
23309
23484
|
style: "left:0;"
|
|
23310
23485
|
} : null);
|
|
23311
|
-
const checkbox2 = computed(() => table2.props.checkable ? createVNode("th",
|
|
23312
|
-
"
|
|
23486
|
+
const checkbox2 = computed(() => table2.props.checkable ? createVNode("th", mergeProps({
|
|
23487
|
+
"class": ns.e("checkable-cell")
|
|
23488
|
+
}, thAttrs.value), [createVNode(Checkbox, {
|
|
23313
23489
|
"modelValue": checkAll.value,
|
|
23314
23490
|
"onUpdate:modelValue": ($event) => checkAll.value = $event,
|
|
23315
23491
|
"halfchecked": halfChecked.value
|
|
23316
23492
|
}, null)]) : null);
|
|
23317
23493
|
return () => {
|
|
23318
23494
|
return createVNode("thead", {
|
|
23319
|
-
"class": "
|
|
23320
|
-
}, [createVNode("tr", null, [checkbox2.value, columns.value.map((column, index2) => createVNode(
|
|
23495
|
+
"class": ns.e("thead")
|
|
23496
|
+
}, [createVNode("tr", null, [checkbox2.value, columns.value.map((column, index2) => createVNode(TH, {
|
|
23321
23497
|
"key": index2,
|
|
23322
23498
|
"column": column
|
|
23323
23499
|
}, null))])]);
|
|
23324
23500
|
};
|
|
23325
23501
|
}
|
|
23326
23502
|
});
|
|
23327
|
-
|
|
23503
|
+
var TD = defineComponent({
|
|
23504
|
+
name: "DTableBodyTd",
|
|
23328
23505
|
props: {
|
|
23329
23506
|
column: {
|
|
23330
23507
|
type: Object,
|
|
23331
|
-
|
|
23508
|
+
default: () => ({})
|
|
23509
|
+
},
|
|
23510
|
+
row: {
|
|
23511
|
+
type: Object,
|
|
23512
|
+
default: () => ({})
|
|
23513
|
+
},
|
|
23514
|
+
index: {
|
|
23515
|
+
type: Number,
|
|
23516
|
+
default: 0
|
|
23332
23517
|
}
|
|
23333
23518
|
},
|
|
23334
23519
|
setup(props) {
|
|
23335
|
-
const
|
|
23336
|
-
const {
|
|
23337
|
-
column
|
|
23338
|
-
} = toRefs(props);
|
|
23339
|
-
const directionRef = useSort(table2.store, column);
|
|
23340
|
-
const filteredRef = useFliter(table2.store, column);
|
|
23520
|
+
const column = toRef(props, "column");
|
|
23341
23521
|
const {
|
|
23342
23522
|
stickyCell,
|
|
23343
23523
|
offsetStyle
|
|
23344
23524
|
} = useFixedColumn(column);
|
|
23345
|
-
return () =>
|
|
23346
|
-
|
|
23347
|
-
"
|
|
23348
|
-
|
|
23349
|
-
|
|
23350
|
-
|
|
23351
|
-
|
|
23352
|
-
"onUpdate:modelValue": ($event) => filteredRef.value = $event,
|
|
23353
|
-
"filterList": props.column.filterList,
|
|
23354
|
-
"customTemplate": props.column.customFilterTemplate
|
|
23355
|
-
}, null)]), props.column.sortable && createVNode(Sort, {
|
|
23356
|
-
"modelValue": directionRef.value,
|
|
23357
|
-
"onUpdate:modelValue": ($event) => directionRef.value = $event
|
|
23358
|
-
}, null)]);
|
|
23525
|
+
return () => {
|
|
23526
|
+
var _a, _b;
|
|
23527
|
+
return createVNode("td", {
|
|
23528
|
+
"class": stickyCell.value,
|
|
23529
|
+
"style": offsetStyle.value
|
|
23530
|
+
}, [(_b = (_a = column.value).renderCell) == null ? void 0 : _b.call(_a, props.row, props.index)]);
|
|
23531
|
+
};
|
|
23359
23532
|
}
|
|
23360
23533
|
});
|
|
23534
|
+
function useMergeCell() {
|
|
23535
|
+
const table2 = inject(TABLE_TOKEN);
|
|
23536
|
+
const { _data: data, _columns: columns } = table2.store.states;
|
|
23537
|
+
const getSpan = (row2, column, rowIndex, columnIndex) => {
|
|
23538
|
+
const fn = table2 == null ? void 0 : table2.props.spanMethod;
|
|
23539
|
+
let rowspan = 1;
|
|
23540
|
+
let colspan = 1;
|
|
23541
|
+
if (typeof fn === "function") {
|
|
23542
|
+
const result2 = fn({ row: row2, column, rowIndex, columnIndex });
|
|
23543
|
+
if (Array.isArray(result2)) {
|
|
23544
|
+
rowspan = result2[0];
|
|
23545
|
+
colspan = result2[1];
|
|
23546
|
+
} else if (typeof result2 === "object") {
|
|
23547
|
+
rowspan = result2.rowspan;
|
|
23548
|
+
colspan = result2.colspan;
|
|
23549
|
+
}
|
|
23550
|
+
}
|
|
23551
|
+
return { rowspan, colspan };
|
|
23552
|
+
};
|
|
23553
|
+
const tableSpans = computed(() => {
|
|
23554
|
+
const result2 = {};
|
|
23555
|
+
if (table2 == null ? void 0 : table2.props.spanMethod) {
|
|
23556
|
+
data.value.forEach((row2, rowIndex) => {
|
|
23557
|
+
columns.value.forEach((column, columnIndex) => {
|
|
23558
|
+
const { rowspan, colspan } = getSpan(row2, column, rowIndex, columnIndex);
|
|
23559
|
+
if (rowspan > 1 || colspan > 1) {
|
|
23560
|
+
result2[`${rowIndex}-${columnIndex}`] = [rowspan, colspan];
|
|
23561
|
+
}
|
|
23562
|
+
});
|
|
23563
|
+
});
|
|
23564
|
+
}
|
|
23565
|
+
return result2;
|
|
23566
|
+
});
|
|
23567
|
+
const removeCells = computed(() => {
|
|
23568
|
+
const result2 = [];
|
|
23569
|
+
for (const indexKey of Object.keys(tableSpans.value)) {
|
|
23570
|
+
const indexArray = indexKey.split("-").map((item2) => Number(item2));
|
|
23571
|
+
const spans = tableSpans.value[indexKey];
|
|
23572
|
+
for (let i = 1; i < spans[0]; i++) {
|
|
23573
|
+
result2.push(`${indexArray[0] + i}-${indexArray[1]}`);
|
|
23574
|
+
for (let j = 1; j < spans[1]; j++) {
|
|
23575
|
+
result2.push(`${indexArray[0] + i}-${indexArray[1] + j}`);
|
|
23576
|
+
}
|
|
23577
|
+
}
|
|
23578
|
+
for (let i = 1; i < spans[1]; i++) {
|
|
23579
|
+
result2.push(`${indexArray[0]}-${indexArray[1] + i}`);
|
|
23580
|
+
}
|
|
23581
|
+
}
|
|
23582
|
+
return result2;
|
|
23583
|
+
});
|
|
23584
|
+
return { tableSpans, removeCells };
|
|
23585
|
+
}
|
|
23361
23586
|
var TableBody = defineComponent({
|
|
23362
23587
|
name: "DTableBody",
|
|
23363
23588
|
setup() {
|
|
@@ -23368,55 +23593,48 @@ var TableBody = defineComponent({
|
|
|
23368
23593
|
_checkList: checkList,
|
|
23369
23594
|
isFixedLeft
|
|
23370
23595
|
} = table2.store.states;
|
|
23596
|
+
const ns = useNamespace("table");
|
|
23371
23597
|
const hoverEnabled = computed(() => table2.props.rowHoveredHighlight);
|
|
23598
|
+
const {
|
|
23599
|
+
tableSpans,
|
|
23600
|
+
removeCells
|
|
23601
|
+
} = useMergeCell();
|
|
23372
23602
|
const tdAttrs = computed(() => isFixedLeft.value ? {
|
|
23373
|
-
class: "
|
|
23603
|
+
class: `${ns.m("sticky-cell")} left`,
|
|
23374
23604
|
style: "left:0;"
|
|
23375
23605
|
} : null);
|
|
23376
|
-
const renderCheckbox = (index2) => table2.props.checkable ? createVNode("td",
|
|
23606
|
+
const renderCheckbox = (index2) => table2.props.checkable ? createVNode("td", mergeProps({
|
|
23607
|
+
"class": ns.e("checkable-cell")
|
|
23608
|
+
}, tdAttrs.value), [createVNode(Checkbox, {
|
|
23377
23609
|
"modelValue": checkList.value[index2],
|
|
23378
23610
|
"onUpdate:modelValue": ($event) => checkList.value[index2] = $event
|
|
23379
23611
|
}, null)]) : null;
|
|
23380
23612
|
return () => createVNode("tbody", {
|
|
23381
|
-
"class": "
|
|
23613
|
+
"class": ns.e("tbody")
|
|
23382
23614
|
}, [data.value.map((row2, rowIndex) => {
|
|
23383
23615
|
return createVNode("tr", {
|
|
23384
23616
|
"key": rowIndex,
|
|
23385
23617
|
"class": {
|
|
23386
23618
|
"hover-enabled": hoverEnabled.value
|
|
23387
23619
|
}
|
|
23388
|
-
}, [renderCheckbox(rowIndex), columns.value.map((column,
|
|
23389
|
-
|
|
23390
|
-
|
|
23391
|
-
|
|
23392
|
-
|
|
23620
|
+
}, [renderCheckbox(rowIndex), columns.value.map((column, columnIndex) => {
|
|
23621
|
+
var _a;
|
|
23622
|
+
const cellId = `${rowIndex}-${columnIndex}`;
|
|
23623
|
+
const [rowspan, colspan] = (_a = tableSpans.value[cellId]) != null ? _a : [1, 1];
|
|
23624
|
+
if (removeCells.value.includes(cellId)) {
|
|
23625
|
+
return null;
|
|
23626
|
+
}
|
|
23627
|
+
return createVNode(TD, {
|
|
23628
|
+
"column": column,
|
|
23629
|
+
"index": columnIndex,
|
|
23630
|
+
"row": row2,
|
|
23631
|
+
"rowspan": rowspan,
|
|
23632
|
+
"colspan": colspan
|
|
23633
|
+
}, null);
|
|
23634
|
+
})]);
|
|
23393
23635
|
})]);
|
|
23394
23636
|
}
|
|
23395
23637
|
});
|
|
23396
|
-
const TD = defineComponent({
|
|
23397
|
-
props: {
|
|
23398
|
-
column: {
|
|
23399
|
-
type: Object
|
|
23400
|
-
},
|
|
23401
|
-
row: {
|
|
23402
|
-
type: Object
|
|
23403
|
-
},
|
|
23404
|
-
index: {
|
|
23405
|
-
type: Number
|
|
23406
|
-
}
|
|
23407
|
-
},
|
|
23408
|
-
setup(props) {
|
|
23409
|
-
const column = toRef(props, "column");
|
|
23410
|
-
const {
|
|
23411
|
-
stickyCell,
|
|
23412
|
-
offsetStyle
|
|
23413
|
-
} = useFixedColumn(column);
|
|
23414
|
-
return () => createVNode("td", {
|
|
23415
|
-
"class": stickyCell.value,
|
|
23416
|
-
"style": offsetStyle.value
|
|
23417
|
-
}, [column.value.renderCell(props.row, props.index)]);
|
|
23418
|
-
}
|
|
23419
|
-
});
|
|
23420
23638
|
var FixHeader = defineComponent({
|
|
23421
23639
|
props: {
|
|
23422
23640
|
classes: {
|
|
@@ -23428,9 +23646,10 @@ var FixHeader = defineComponent({
|
|
|
23428
23646
|
}
|
|
23429
23647
|
},
|
|
23430
23648
|
setup(props) {
|
|
23649
|
+
const ns = useNamespace("table");
|
|
23431
23650
|
return () => {
|
|
23432
23651
|
return createVNode("div", {
|
|
23433
|
-
"class": "
|
|
23652
|
+
"class": ns.e("fix-header")
|
|
23434
23653
|
}, [createVNode("div", {
|
|
23435
23654
|
"style": "overflow:hidden scroll;"
|
|
23436
23655
|
}, [createVNode("table", {
|
|
@@ -23438,7 +23657,7 @@ var FixHeader = defineComponent({
|
|
|
23438
23657
|
"cellpadding": "0",
|
|
23439
23658
|
"cellspacing": "0"
|
|
23440
23659
|
}, [createVNode(ColGroup, null, null), createVNode(TableHeader, null, null)])]), createVNode("div", {
|
|
23441
|
-
"class": "scroll-view"
|
|
23660
|
+
"class": ns.e("scroll-view")
|
|
23442
23661
|
}, [createVNode("table", {
|
|
23443
23662
|
"class": props.classes,
|
|
23444
23663
|
"cellpadding": "0",
|
|
@@ -23474,6 +23693,9 @@ var NormalHeader = defineComponent({
|
|
|
23474
23693
|
var table = "";
|
|
23475
23694
|
var Table = defineComponent({
|
|
23476
23695
|
name: "DTable",
|
|
23696
|
+
directives: {
|
|
23697
|
+
dLoading: loadingDirective
|
|
23698
|
+
},
|
|
23477
23699
|
props: TableProps,
|
|
23478
23700
|
setup(props, ctx2) {
|
|
23479
23701
|
const table2 = getCurrentInstance();
|
|
@@ -23485,23 +23707,27 @@ var Table = defineComponent({
|
|
|
23485
23707
|
style: style2
|
|
23486
23708
|
} = useTable(props);
|
|
23487
23709
|
const isEmpty2 = computed(() => props.data.length === 0);
|
|
23710
|
+
const ns = useNamespace("table");
|
|
23488
23711
|
ctx2.expose({
|
|
23489
23712
|
getCheckedRows() {
|
|
23490
23713
|
return store.getCheckedRows();
|
|
23491
23714
|
}
|
|
23492
23715
|
});
|
|
23493
|
-
return () =>
|
|
23494
|
-
|
|
23495
|
-
"
|
|
23496
|
-
|
|
23497
|
-
|
|
23498
|
-
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
|
|
23502
|
-
|
|
23503
|
-
|
|
23504
|
-
|
|
23716
|
+
return () => {
|
|
23717
|
+
var _a, _b;
|
|
23718
|
+
return withDirectives(createVNode("div", {
|
|
23719
|
+
"class": ns.b(),
|
|
23720
|
+
"style": style2.value
|
|
23721
|
+
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a), props.fixHeader ? createVNode(FixHeader, {
|
|
23722
|
+
"classes": classes.value,
|
|
23723
|
+
"is-empty": isEmpty2.value
|
|
23724
|
+
}, null) : createVNode(NormalHeader, {
|
|
23725
|
+
"classes": classes.value,
|
|
23726
|
+
"is-empty": isEmpty2.value
|
|
23727
|
+
}, null), isEmpty2.value && createVNode("div", {
|
|
23728
|
+
"class": ns.e("empty")
|
|
23729
|
+
}, [createTextVNode("No Data")])]), [[resolveDirective("dLoading"), props.showLoading]]);
|
|
23730
|
+
};
|
|
23505
23731
|
}
|
|
23506
23732
|
});
|
|
23507
23733
|
const TableColumnProps = {
|
|
@@ -23634,30 +23860,26 @@ var Column = defineComponent({
|
|
|
23634
23860
|
const column = createColumn(toRefs(props), ctx2.slots);
|
|
23635
23861
|
const parent = inject(TABLE_TOKEN);
|
|
23636
23862
|
onMounted(() => {
|
|
23637
|
-
parent.store.insertColumn(column);
|
|
23863
|
+
parent == null ? void 0 : parent.store.insertColumn(column);
|
|
23638
23864
|
watch(() => column.order, () => {
|
|
23639
|
-
parent.store.sortColumn();
|
|
23865
|
+
parent == null ? void 0 : parent.store.sortColumn();
|
|
23640
23866
|
});
|
|
23641
23867
|
});
|
|
23642
23868
|
onBeforeUnmount(() => {
|
|
23643
|
-
parent.store.removeColumn(column);
|
|
23869
|
+
parent == null ? void 0 : parent.store.removeColumn(column);
|
|
23644
23870
|
});
|
|
23645
23871
|
},
|
|
23646
23872
|
render() {
|
|
23647
23873
|
return null;
|
|
23648
23874
|
}
|
|
23649
23875
|
});
|
|
23650
|
-
Table.install = function(app) {
|
|
23651
|
-
app.directive("dLoading", loadingDirective);
|
|
23652
|
-
app.component(Table.name, Table);
|
|
23653
|
-
app.component(Column.name, Column);
|
|
23654
|
-
};
|
|
23655
23876
|
var TableInstall = {
|
|
23656
23877
|
title: "Table \u8868\u683C",
|
|
23657
23878
|
category: "\u6570\u636E\u5C55\u793A",
|
|
23658
23879
|
status: "10%",
|
|
23659
23880
|
install(app) {
|
|
23660
|
-
app.
|
|
23881
|
+
app.component(Table.name, Table);
|
|
23882
|
+
app.component(Column.name, Column);
|
|
23661
23883
|
}
|
|
23662
23884
|
};
|
|
23663
23885
|
const tagProps = {
|
|
@@ -23685,17 +23907,17 @@ const tagProps = {
|
|
|
23685
23907
|
function useClass(props) {
|
|
23686
23908
|
return computed(() => {
|
|
23687
23909
|
const { type: type4, color: color2, deletable } = props;
|
|
23688
|
-
return `devui-tag devui-tag-${type4 || (color2 ? "colorful" : "") || "default"}
|
|
23910
|
+
return `devui-tag-item devui-tag-${type4 || (color2 ? "colorful" : "") || "default"}${deletable ? " devui-tag-deletable" : ""}`;
|
|
23689
23911
|
});
|
|
23690
23912
|
}
|
|
23691
23913
|
function useColor(props) {
|
|
23692
23914
|
return computed(() => {
|
|
23693
23915
|
const { color: color2, type: type4 } = props;
|
|
23694
23916
|
const typeMap = {
|
|
23695
|
-
primary: "#5e7ce0",
|
|
23696
|
-
success: "#50d4ab",
|
|
23697
|
-
warning: "#fac20a",
|
|
23698
|
-
danger: "#f66f6a"
|
|
23917
|
+
primary: "var(--devui-primary, #5e7ce0)",
|
|
23918
|
+
success: "var(--devui-success, #50d4ab)",
|
|
23919
|
+
warning: "var(--devui-warning, #fac20a)",
|
|
23920
|
+
danger: "var(--devui-danger, #f66f6a)"
|
|
23699
23921
|
};
|
|
23700
23922
|
const colorMap = {
|
|
23701
23923
|
"blue-w98": "#3383ff",
|
|
@@ -23708,8 +23930,9 @@ function useColor(props) {
|
|
|
23708
23930
|
"pink-w98": "#f3689a",
|
|
23709
23931
|
"purple-w98": "#a97af8"
|
|
23710
23932
|
};
|
|
23711
|
-
if (!color2 && type4)
|
|
23933
|
+
if (!color2 && type4) {
|
|
23712
23934
|
return typeMap[type4];
|
|
23935
|
+
}
|
|
23713
23936
|
const themeColor = colorMap[color2] || color2;
|
|
23714
23937
|
return themeColor;
|
|
23715
23938
|
});
|
|
@@ -23735,12 +23958,12 @@ var Tag = defineComponent({
|
|
|
23735
23958
|
const tagTitle = titleContent.value || "";
|
|
23736
23959
|
const isDefaultTag = () => !type4.value && !color2.value;
|
|
23737
23960
|
const isShow = ref(true);
|
|
23738
|
-
const handleClick = () => {
|
|
23739
|
-
emit("click");
|
|
23961
|
+
const handleClick = (e) => {
|
|
23962
|
+
emit("click", e);
|
|
23740
23963
|
};
|
|
23741
|
-
const handleDelete = () => {
|
|
23964
|
+
const handleDelete = (e) => {
|
|
23742
23965
|
isShow.value = false;
|
|
23743
|
-
emit("tagDelete");
|
|
23966
|
+
emit("tagDelete", e);
|
|
23744
23967
|
};
|
|
23745
23968
|
const closeIconEl = () => {
|
|
23746
23969
|
return deletable.value ? createVNode("a", {
|
|
@@ -23757,7 +23980,6 @@ var Tag = defineComponent({
|
|
|
23757
23980
|
}, null)]) : null;
|
|
23758
23981
|
};
|
|
23759
23982
|
const unWatch = watch(checked, (newVal) => {
|
|
23760
|
-
console.log("checkedChange");
|
|
23761
23983
|
emit("checkedChange", newVal);
|
|
23762
23984
|
});
|
|
23763
23985
|
onUnmounted(() => unWatch());
|
|
@@ -23771,22 +23993,19 @@ var Tag = defineComponent({
|
|
|
23771
23993
|
"style": {
|
|
23772
23994
|
display: "block",
|
|
23773
23995
|
color: checked.value ? "#fff" : themeColor.value,
|
|
23774
|
-
backgroundColor: checked.value ? themeColor.value : !color2.value ? "" : "#
|
|
23996
|
+
backgroundColor: checked.value ? themeColor.value : !color2.value ? "" : "var(--devui-base-bg, #ffffff)"
|
|
23775
23997
|
},
|
|
23776
23998
|
"title": tagTitle
|
|
23777
23999
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots), closeIconEl()])]), [[vShow, isShow.value]]);
|
|
23778
24000
|
};
|
|
23779
24001
|
}
|
|
23780
24002
|
});
|
|
23781
|
-
Tag.install = function(app) {
|
|
23782
|
-
app.component(Tag.name, Tag);
|
|
23783
|
-
};
|
|
23784
24003
|
var TagInstall = {
|
|
23785
24004
|
title: "Tag \u6807\u7B7E",
|
|
23786
24005
|
category: "\u6570\u636E\u5C55\u793A",
|
|
23787
|
-
status: "
|
|
24006
|
+
status: "100%",
|
|
23788
24007
|
install(app) {
|
|
23789
|
-
app.
|
|
24008
|
+
app.component(Tag.name, Tag);
|
|
23790
24009
|
}
|
|
23791
24010
|
};
|
|
23792
24011
|
var removeBtnSvg = createVNode("svg", mergeProps({
|
|
@@ -23926,8 +24145,9 @@ var TagInput = defineComponent({
|
|
|
23926
24145
|
let res = {
|
|
23927
24146
|
[props.displayProperty]: tagInputVal.value
|
|
23928
24147
|
};
|
|
23929
|
-
if (tagInputVal.value === "" && mergedSuggestions.value.length === 0)
|
|
24148
|
+
if (tagInputVal.value === "" && mergedSuggestions.value.length === 0) {
|
|
23930
24149
|
return false;
|
|
24150
|
+
}
|
|
23931
24151
|
if (props.tags.findIndex((item2) => item2[props.displayProperty] === tagInputVal.value) > -1) {
|
|
23932
24152
|
tagInputVal.value = "";
|
|
23933
24153
|
return false;
|
|
@@ -23951,8 +24171,9 @@ var TagInput = defineComponent({
|
|
|
23951
24171
|
case KEYS_MAP.tab:
|
|
23952
24172
|
case KEYS_MAP.enter:
|
|
23953
24173
|
case KEYS_MAP.space:
|
|
23954
|
-
if (!props.isAddBySpace && KEYS_MAP.space)
|
|
24174
|
+
if (!props.isAddBySpace && KEYS_MAP.space) {
|
|
23955
24175
|
return;
|
|
24176
|
+
}
|
|
23956
24177
|
handleEnter();
|
|
23957
24178
|
break;
|
|
23958
24179
|
case KEYS_MAP.down:
|
|
@@ -24219,250 +24440,15 @@ var Textarea = defineComponent({
|
|
|
24219
24440
|
}, [curValueRef.length, !(maxLength != null ? maxLength : false) ? "" : " / " + maxLength])]);
|
|
24220
24441
|
}
|
|
24221
24442
|
});
|
|
24222
|
-
Textarea.install = function(app) {
|
|
24223
|
-
app.component(Textarea.name, Textarea);
|
|
24224
|
-
};
|
|
24225
|
-
var TextareaInstall = {
|
|
24226
|
-
title: "Textarea \u591A\u884C\u6587\u672C\u6846",
|
|
24227
|
-
category: "\u6570\u636E\u5F55\u5165",
|
|
24228
|
-
status: "100%",
|
|
24229
|
-
install(app) {
|
|
24230
|
-
app.use(Textarea);
|
|
24231
|
-
}
|
|
24232
|
-
};
|
|
24233
|
-
const timeAxisProps = {
|
|
24234
|
-
direction: {
|
|
24235
|
-
type: String,
|
|
24236
|
-
default: "vertical"
|
|
24237
|
-
},
|
|
24238
|
-
center: {
|
|
24239
|
-
type: Boolean,
|
|
24240
|
-
default: false
|
|
24241
|
-
},
|
|
24242
|
-
mode: {
|
|
24243
|
-
type: String,
|
|
24244
|
-
default: "normal"
|
|
24245
|
-
},
|
|
24246
|
-
timePosition: {
|
|
24247
|
-
type: String,
|
|
24248
|
-
default: "left"
|
|
24249
|
-
}
|
|
24250
|
-
};
|
|
24251
|
-
const timeAxisItemProps = {
|
|
24252
|
-
time: {
|
|
24253
|
-
type: String
|
|
24254
|
-
},
|
|
24255
|
-
dotColor: {
|
|
24256
|
-
type: String
|
|
24257
|
-
},
|
|
24258
|
-
lineStyle: {
|
|
24259
|
-
type: String,
|
|
24260
|
-
default: "solid"
|
|
24261
|
-
},
|
|
24262
|
-
lineColor: {
|
|
24263
|
-
type: String
|
|
24264
|
-
},
|
|
24265
|
-
position: {
|
|
24266
|
-
type: String
|
|
24267
|
-
},
|
|
24268
|
-
timePosition: {
|
|
24269
|
-
type: String,
|
|
24270
|
-
default: "left"
|
|
24271
|
-
},
|
|
24272
|
-
type: {
|
|
24273
|
-
type: String,
|
|
24274
|
-
default: "primary"
|
|
24275
|
-
}
|
|
24276
|
-
};
|
|
24277
|
-
var TimeAxisItem = defineComponent({
|
|
24278
|
-
name: "DTimeAxisItem",
|
|
24279
|
-
components: {
|
|
24280
|
-
DIcon: Icon
|
|
24281
|
-
},
|
|
24282
|
-
props: timeAxisItemProps,
|
|
24283
|
-
emits: [],
|
|
24284
|
-
setup(props, ctx2) {
|
|
24285
|
-
const timeAxis2 = inject("timeAxis");
|
|
24286
|
-
const itemClass = "devui-time-axis-item";
|
|
24287
|
-
const renderTime = () => {
|
|
24288
|
-
var _a, _b;
|
|
24289
|
-
return createVNode("div", {
|
|
24290
|
-
"class": `${itemClass}-time`
|
|
24291
|
-
}, [ctx2.slots.time ? (_b = (_a = ctx2.slots).time) == null ? void 0 : _b.call(_a) : props.time]);
|
|
24292
|
-
};
|
|
24293
|
-
const renderContent = () => {
|
|
24294
|
-
var _a, _b;
|
|
24295
|
-
return createVNode("div", {
|
|
24296
|
-
"class": `${itemClass}-content`
|
|
24297
|
-
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a, props)]);
|
|
24298
|
-
};
|
|
24299
|
-
const renderPosition = (types2) => {
|
|
24300
|
-
if (types2.includes(props.position)) {
|
|
24301
|
-
return renderContent();
|
|
24302
|
-
} else {
|
|
24303
|
-
if (timeAxis2.props.direction === "horizontal") {
|
|
24304
|
-
return renderTime();
|
|
24305
|
-
} else {
|
|
24306
|
-
return props.timePosition === "left" ? renderTime() : "";
|
|
24307
|
-
}
|
|
24308
|
-
}
|
|
24309
|
-
};
|
|
24310
|
-
const setTypeIcon = (type4) => {
|
|
24311
|
-
if (type4 === "primary") {
|
|
24312
|
-
return "";
|
|
24313
|
-
}
|
|
24314
|
-
return createVNode("i", {
|
|
24315
|
-
"class": `icon-${type4 === "success" ? "right" : type4}-o`
|
|
24316
|
-
}, null);
|
|
24317
|
-
};
|
|
24318
|
-
const renderDot = () => {
|
|
24319
|
-
var _a, _b;
|
|
24320
|
-
if (ctx2.slots.dot) {
|
|
24321
|
-
return createVNode("div", {
|
|
24322
|
-
"style": {
|
|
24323
|
-
color: props.dotColor
|
|
24324
|
-
},
|
|
24325
|
-
"class": `${itemClass}-dot`
|
|
24326
|
-
}, [createTextVNode(" "), (_b = (_a = ctx2.slots).dot) == null ? void 0 : _b.call(_a)]);
|
|
24327
|
-
} else {
|
|
24328
|
-
return createVNode("div", {
|
|
24329
|
-
"class": `${itemClass}-dot ${itemClass}-type-${props.type}`,
|
|
24330
|
-
"style": {
|
|
24331
|
-
borderColor: props.dotColor
|
|
24332
|
-
}
|
|
24333
|
-
}, [setTypeIcon(props.type)]);
|
|
24334
|
-
}
|
|
24335
|
-
};
|
|
24336
|
-
return () => {
|
|
24337
|
-
return createVNode("div", {
|
|
24338
|
-
"class": itemClass
|
|
24339
|
-
}, [createVNode("div", {
|
|
24340
|
-
"class": `${itemClass}-data-left ${itemClass}-data-top`
|
|
24341
|
-
}, [renderPosition(["top", "left"])]), createVNode("div", {
|
|
24342
|
-
"class": `${itemClass}-axis`
|
|
24343
|
-
}, [renderDot(), timeAxis2.props.direction === "vertical" && props.timePosition === "bottom" ? renderTime() : "", createVNode("div", {
|
|
24344
|
-
"class": `${itemClass}-line ${itemClass}-line-style-${props.lineStyle}`,
|
|
24345
|
-
"style": {
|
|
24346
|
-
borderColor: props.lineColor
|
|
24347
|
-
}
|
|
24348
|
-
}, [ctx2.slots.extra ? createVNode("div", {
|
|
24349
|
-
"class": `${itemClass}-line-extra`
|
|
24350
|
-
}, [ctx2.slots.extra()]) : ""])]), createVNode("div", {
|
|
24351
|
-
"class": `${itemClass}-data-right ${itemClass}-data-bottom`
|
|
24352
|
-
}, [renderPosition(["right", "bottom"])])]);
|
|
24353
|
-
};
|
|
24354
|
-
}
|
|
24355
|
-
});
|
|
24356
|
-
var timeAxis = "";
|
|
24357
|
-
var TimeAxis = defineComponent({
|
|
24358
|
-
name: "DTimeAxis",
|
|
24359
|
-
components: {
|
|
24360
|
-
TimeAxisItem
|
|
24361
|
-
},
|
|
24362
|
-
props: timeAxisProps,
|
|
24363
|
-
emits: [],
|
|
24364
|
-
setup(props, ctx2) {
|
|
24365
|
-
provide("timeAxis", {
|
|
24366
|
-
ctx: ctx2,
|
|
24367
|
-
props
|
|
24368
|
-
});
|
|
24369
|
-
const timeAxis2 = ref();
|
|
24370
|
-
const style2 = reactive({
|
|
24371
|
-
marginLeft: "0px",
|
|
24372
|
-
height: "auto"
|
|
24373
|
-
});
|
|
24374
|
-
const setStyle2 = () => {
|
|
24375
|
-
style2.height = "auto";
|
|
24376
|
-
style2.marginLeft = "0px";
|
|
24377
|
-
if (props.direction === "horizontal") {
|
|
24378
|
-
nextTick(() => {
|
|
24379
|
-
var _a;
|
|
24380
|
-
const el = timeAxis2.value;
|
|
24381
|
-
if (props.center) {
|
|
24382
|
-
style2.marginLeft = (((_a = el == null ? void 0 : el.firstElementChild) == null ? void 0 : _a.clientWidth) || 0) / 2 + "px";
|
|
24383
|
-
}
|
|
24384
|
-
style2.height = Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-data-top")).map((el2) => el2.clientHeight), ...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-data-bottom")).map((el2) => el2.clientHeight)) * 2 + Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-axis")).map((el2) => el2.clientHeight)) + "px";
|
|
24385
|
-
});
|
|
24386
|
-
}
|
|
24387
|
-
};
|
|
24388
|
-
onMounted(() => {
|
|
24389
|
-
setStyle2();
|
|
24390
|
-
});
|
|
24391
|
-
watch(toRef(props, "direction"), () => {
|
|
24392
|
-
setStyle2();
|
|
24393
|
-
});
|
|
24394
|
-
return () => {
|
|
24395
|
-
const renderItemPosition = (item2, position) => {
|
|
24396
|
-
return position ? createVNode(item2, {
|
|
24397
|
-
"position": position
|
|
24398
|
-
}, null) : createVNode(item2, null, null);
|
|
24399
|
-
};
|
|
24400
|
-
const renderItem = () => {
|
|
24401
|
-
var _a, _b, _c;
|
|
24402
|
-
const slots = (_c = (_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)) != null ? _c : [];
|
|
24403
|
-
let children;
|
|
24404
|
-
if (slots.length === 1 && slots[0].type === Fragment) {
|
|
24405
|
-
children = slots[0].children || [];
|
|
24406
|
-
} else {
|
|
24407
|
-
children = slots;
|
|
24408
|
-
}
|
|
24409
|
-
return children.map((item2, index2) => {
|
|
24410
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h;
|
|
24411
|
-
if (index2 + 1 === children.length) {
|
|
24412
|
-
if (!((_a2 = item2.props) == null ? void 0 : _a2.lineStyle) && !((_b2 = item2.props) == null ? void 0 : _b2["line-style"])) {
|
|
24413
|
-
item2 = createVNode(item2, {
|
|
24414
|
-
"line-style": "none"
|
|
24415
|
-
}, null);
|
|
24416
|
-
}
|
|
24417
|
-
}
|
|
24418
|
-
if (!((_c2 = item2.props) == null ? void 0 : _c2.timePosition) && !((_d = item2.props) == null ? void 0 : _d["time-position"])) {
|
|
24419
|
-
item2 = createVNode(item2, {
|
|
24420
|
-
"time-position": props.timePosition ? props.timePosition : "left"
|
|
24421
|
-
}, null);
|
|
24422
|
-
}
|
|
24423
|
-
if (props.direction === "horizontal") {
|
|
24424
|
-
if (((_e = item2.props) == null ? void 0 : _e.position) === "top" || ((_f = item2.props) == null ? void 0 : _f.position) === "bottom")
|
|
24425
|
-
return item2;
|
|
24426
|
-
if (props.mode === "alternative") {
|
|
24427
|
-
return renderItemPosition(item2, index2 % 2 == 0 ? "bottom" : "top");
|
|
24428
|
-
} else {
|
|
24429
|
-
return renderItemPosition(item2, "bottom");
|
|
24430
|
-
}
|
|
24431
|
-
} else {
|
|
24432
|
-
if (((_g = item2.props) == null ? void 0 : _g.position) === "left" || ((_h = item2.props) == null ? void 0 : _h.position) === "right")
|
|
24433
|
-
return item2;
|
|
24434
|
-
if (props.mode === "alternative") {
|
|
24435
|
-
return renderItemPosition(item2, index2 % 2 == 0 ? "left" : "right");
|
|
24436
|
-
} else {
|
|
24437
|
-
return renderItemPosition(item2, "right");
|
|
24438
|
-
}
|
|
24439
|
-
}
|
|
24440
|
-
});
|
|
24441
|
-
};
|
|
24442
|
-
const getDirection = () => {
|
|
24443
|
-
return props.direction === "horizontal" ? "horizontal" : "vertical";
|
|
24444
|
-
};
|
|
24445
|
-
return createVNode("div", {
|
|
24446
|
-
"class": `devui-time-axis devui-time-axis-${getDirection()} ${props.center ? "devui-time-axis-" + getDirection() + "-center" : ""} `,
|
|
24447
|
-
"ref": timeAxis2,
|
|
24448
|
-
"style": style2
|
|
24449
|
-
}, [renderItem()]);
|
|
24450
|
-
};
|
|
24451
|
-
}
|
|
24452
|
-
});
|
|
24453
|
-
TimeAxis.install = function(app) {
|
|
24454
|
-
app.component(TimeAxis.name, TimeAxis);
|
|
24455
|
-
};
|
|
24456
|
-
TimeAxisItem.install = function(app) {
|
|
24457
|
-
app.component(TimeAxisItem.name, TimeAxisItem);
|
|
24443
|
+
Textarea.install = function(app) {
|
|
24444
|
+
app.component(Textarea.name, Textarea);
|
|
24458
24445
|
};
|
|
24459
|
-
var
|
|
24460
|
-
title: "
|
|
24461
|
-
category: "\u6570\u636E\
|
|
24446
|
+
var TextareaInstall = {
|
|
24447
|
+
title: "Textarea \u591A\u884C\u6587\u672C\u6846",
|
|
24448
|
+
category: "\u6570\u636E\u5F55\u5165",
|
|
24462
24449
|
status: "100%",
|
|
24463
24450
|
install(app) {
|
|
24464
|
-
app.use(
|
|
24465
|
-
app.use(TimeAxisItem);
|
|
24451
|
+
app.use(Textarea);
|
|
24466
24452
|
}
|
|
24467
24453
|
};
|
|
24468
24454
|
const timePickerProps = {
|
|
@@ -24581,8 +24567,9 @@ function useTimePicker(hh, mm, ss, minTime, maxTime, format2, autoOpen, disabled
|
|
|
24581
24567
|
e.stopPropagation();
|
|
24582
24568
|
isActive.value = false;
|
|
24583
24569
|
showPopup.value = false;
|
|
24584
|
-
if (disabled)
|
|
24570
|
+
if (disabled) {
|
|
24585
24571
|
return;
|
|
24572
|
+
}
|
|
24586
24573
|
const path = e.composedPath && e.composedPath() || e.path;
|
|
24587
24574
|
const inInputDom = path.includes(devuiTimePicker.value);
|
|
24588
24575
|
inInputDom && mouseInIputFun();
|
|
@@ -24933,8 +24920,9 @@ function useTimeScroll() {
|
|
|
24933
24920
|
} else {
|
|
24934
24921
|
scrollTrackDom.value.style.opacity = 0;
|
|
24935
24922
|
}
|
|
24936
|
-
if (!isDown.value)
|
|
24923
|
+
if (!isDown.value) {
|
|
24937
24924
|
return;
|
|
24925
|
+
}
|
|
24938
24926
|
clickTrackFun(e);
|
|
24939
24927
|
};
|
|
24940
24928
|
const getScrollWidth = () => {
|
|
@@ -25320,10 +25308,10 @@ var TimePicker = defineComponent({
|
|
|
25320
25308
|
"class": "time-input-icon"
|
|
25321
25309
|
}, [createVNode("div", {
|
|
25322
25310
|
"onClick": clearAll
|
|
25323
|
-
}, [showClearIcon.value ? createVNode(
|
|
25311
|
+
}, [showClearIcon.value ? createVNode(DIcon, {
|
|
25324
25312
|
"size": "small",
|
|
25325
25313
|
"name": "close"
|
|
25326
|
-
}, null) : ""]), createVNode("div", null, [createVNode(
|
|
25314
|
+
}, null) : ""]), createVNode("div", null, [createVNode(DIcon, {
|
|
25327
25315
|
"size": "small",
|
|
25328
25316
|
"name": "time"
|
|
25329
25317
|
}, null)])])])]);
|
|
@@ -25341,6 +25329,243 @@ var TimePickerInstall = {
|
|
|
25341
25329
|
app.use(TimePicker);
|
|
25342
25330
|
}
|
|
25343
25331
|
};
|
|
25332
|
+
const timeAxisProps = {
|
|
25333
|
+
direction: {
|
|
25334
|
+
type: String,
|
|
25335
|
+
default: "vertical"
|
|
25336
|
+
},
|
|
25337
|
+
center: {
|
|
25338
|
+
type: Boolean,
|
|
25339
|
+
default: false
|
|
25340
|
+
},
|
|
25341
|
+
mode: {
|
|
25342
|
+
type: String,
|
|
25343
|
+
default: "normal"
|
|
25344
|
+
},
|
|
25345
|
+
timePosition: {
|
|
25346
|
+
type: String,
|
|
25347
|
+
default: "left"
|
|
25348
|
+
}
|
|
25349
|
+
};
|
|
25350
|
+
const timeAxisItemProps = {
|
|
25351
|
+
time: {
|
|
25352
|
+
type: String
|
|
25353
|
+
},
|
|
25354
|
+
dotColor: {
|
|
25355
|
+
type: String
|
|
25356
|
+
},
|
|
25357
|
+
lineStyle: {
|
|
25358
|
+
type: String,
|
|
25359
|
+
default: "solid"
|
|
25360
|
+
},
|
|
25361
|
+
lineColor: {
|
|
25362
|
+
type: String
|
|
25363
|
+
},
|
|
25364
|
+
position: {
|
|
25365
|
+
type: String
|
|
25366
|
+
},
|
|
25367
|
+
timePosition: {
|
|
25368
|
+
type: String,
|
|
25369
|
+
default: "left"
|
|
25370
|
+
},
|
|
25371
|
+
type: {
|
|
25372
|
+
type: String,
|
|
25373
|
+
default: "primary"
|
|
25374
|
+
}
|
|
25375
|
+
};
|
|
25376
|
+
var TimelineItem = defineComponent({
|
|
25377
|
+
name: "DTimelineItem",
|
|
25378
|
+
components: {
|
|
25379
|
+
DIcon
|
|
25380
|
+
},
|
|
25381
|
+
props: timeAxisItemProps,
|
|
25382
|
+
emits: [],
|
|
25383
|
+
setup(props, ctx2) {
|
|
25384
|
+
const timeAxis = inject("timeAxis");
|
|
25385
|
+
const itemClass = "devui-timeline-item";
|
|
25386
|
+
const renderTime = () => {
|
|
25387
|
+
var _a, _b;
|
|
25388
|
+
return createVNode("div", {
|
|
25389
|
+
"class": `${itemClass}-time`
|
|
25390
|
+
}, [ctx2.slots.time ? (_b = (_a = ctx2.slots).time) == null ? void 0 : _b.call(_a) : props.time]);
|
|
25391
|
+
};
|
|
25392
|
+
const renderContent = () => {
|
|
25393
|
+
var _a, _b;
|
|
25394
|
+
return createVNode("div", {
|
|
25395
|
+
"class": `${itemClass}-content`
|
|
25396
|
+
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a, props)]);
|
|
25397
|
+
};
|
|
25398
|
+
const renderPosition = (types2) => {
|
|
25399
|
+
if (types2.includes(props.position)) {
|
|
25400
|
+
return renderContent();
|
|
25401
|
+
} else {
|
|
25402
|
+
if (timeAxis.props.direction === "horizontal") {
|
|
25403
|
+
return renderTime();
|
|
25404
|
+
} else {
|
|
25405
|
+
return props.timePosition === "left" ? renderTime() : "";
|
|
25406
|
+
}
|
|
25407
|
+
}
|
|
25408
|
+
};
|
|
25409
|
+
const setTypeIcon = (type4) => {
|
|
25410
|
+
if (type4 === "primary") {
|
|
25411
|
+
return "";
|
|
25412
|
+
}
|
|
25413
|
+
return createVNode("i", {
|
|
25414
|
+
"class": `icon-${type4 === "success" ? "right" : type4}-o`
|
|
25415
|
+
}, null);
|
|
25416
|
+
};
|
|
25417
|
+
const renderDot = () => {
|
|
25418
|
+
var _a, _b;
|
|
25419
|
+
if (ctx2.slots.dot) {
|
|
25420
|
+
return createVNode("div", {
|
|
25421
|
+
"style": {
|
|
25422
|
+
color: props.dotColor
|
|
25423
|
+
},
|
|
25424
|
+
"class": `${itemClass}-dot`
|
|
25425
|
+
}, [createTextVNode(" "), (_b = (_a = ctx2.slots).dot) == null ? void 0 : _b.call(_a)]);
|
|
25426
|
+
} else {
|
|
25427
|
+
return createVNode("div", {
|
|
25428
|
+
"class": `${itemClass}-dot ${itemClass}-type-${props.type}`,
|
|
25429
|
+
"style": {
|
|
25430
|
+
borderColor: props.dotColor
|
|
25431
|
+
}
|
|
25432
|
+
}, [setTypeIcon(props.type)]);
|
|
25433
|
+
}
|
|
25434
|
+
};
|
|
25435
|
+
return () => {
|
|
25436
|
+
return createVNode("div", {
|
|
25437
|
+
"class": itemClass
|
|
25438
|
+
}, [createVNode("div", {
|
|
25439
|
+
"class": `${itemClass}-data-left ${itemClass}-data-top`
|
|
25440
|
+
}, [renderPosition(["top", "left"])]), createVNode("div", {
|
|
25441
|
+
"class": `${itemClass}-axis`
|
|
25442
|
+
}, [renderDot(), timeAxis.props.direction === "vertical" && props.timePosition === "bottom" ? renderTime() : "", createVNode("div", {
|
|
25443
|
+
"class": `${itemClass}-line ${itemClass}-line-style-${props.lineStyle}`,
|
|
25444
|
+
"style": {
|
|
25445
|
+
borderColor: props.lineColor
|
|
25446
|
+
}
|
|
25447
|
+
}, [ctx2.slots.extra ? createVNode("div", {
|
|
25448
|
+
"class": `${itemClass}-line-extra`
|
|
25449
|
+
}, [ctx2.slots.extra()]) : ""])]), createVNode("div", {
|
|
25450
|
+
"class": `${itemClass}-data-right ${itemClass}-data-bottom`
|
|
25451
|
+
}, [renderPosition(["right", "bottom"])])]);
|
|
25452
|
+
};
|
|
25453
|
+
}
|
|
25454
|
+
});
|
|
25455
|
+
var timeline = "";
|
|
25456
|
+
var Timeline = defineComponent({
|
|
25457
|
+
name: "DTimeline",
|
|
25458
|
+
components: {
|
|
25459
|
+
TimelineItem
|
|
25460
|
+
},
|
|
25461
|
+
props: timeAxisProps,
|
|
25462
|
+
emits: [],
|
|
25463
|
+
setup(props, ctx2) {
|
|
25464
|
+
provide("timeAxis", {
|
|
25465
|
+
ctx: ctx2,
|
|
25466
|
+
props
|
|
25467
|
+
});
|
|
25468
|
+
const timeAxis = ref();
|
|
25469
|
+
const style2 = reactive({
|
|
25470
|
+
marginLeft: "0px",
|
|
25471
|
+
height: "auto"
|
|
25472
|
+
});
|
|
25473
|
+
const setStyle2 = () => {
|
|
25474
|
+
style2.height = "auto";
|
|
25475
|
+
style2.marginLeft = "0px";
|
|
25476
|
+
if (props.direction === "horizontal") {
|
|
25477
|
+
nextTick(() => {
|
|
25478
|
+
var _a;
|
|
25479
|
+
const el = timeAxis.value;
|
|
25480
|
+
if (props.center) {
|
|
25481
|
+
style2.marginLeft = (((_a = el == null ? void 0 : el.firstElementChild) == null ? void 0 : _a.clientWidth) || 0) / 2 + "px";
|
|
25482
|
+
}
|
|
25483
|
+
style2.height = Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-timeline-item-data-top")).map((el2) => el2.clientHeight), ...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-timeline-item-data-bottom")).map((el2) => el2.clientHeight)) * 2 + Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-timeline-item-axis")).map((el2) => el2.clientHeight)) + "px";
|
|
25484
|
+
});
|
|
25485
|
+
}
|
|
25486
|
+
};
|
|
25487
|
+
onMounted(() => {
|
|
25488
|
+
setStyle2();
|
|
25489
|
+
});
|
|
25490
|
+
watch(toRef(props, "direction"), () => {
|
|
25491
|
+
setStyle2();
|
|
25492
|
+
});
|
|
25493
|
+
return () => {
|
|
25494
|
+
const renderItemPosition = (item2, position) => {
|
|
25495
|
+
return position ? createVNode(item2, {
|
|
25496
|
+
"position": position
|
|
25497
|
+
}, null) : createVNode(item2, null, null);
|
|
25498
|
+
};
|
|
25499
|
+
const renderItem = () => {
|
|
25500
|
+
var _a, _b, _c;
|
|
25501
|
+
const slots = (_c = (_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)) != null ? _c : [];
|
|
25502
|
+
let children;
|
|
25503
|
+
if (slots.length === 1 && slots[0].type === Fragment) {
|
|
25504
|
+
children = slots[0].children || [];
|
|
25505
|
+
} else {
|
|
25506
|
+
children = slots;
|
|
25507
|
+
}
|
|
25508
|
+
return children.map((item2, index2) => {
|
|
25509
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h;
|
|
25510
|
+
if (index2 + 1 === children.length) {
|
|
25511
|
+
if (!((_a2 = item2.props) == null ? void 0 : _a2.lineStyle) && !((_b2 = item2.props) == null ? void 0 : _b2["line-style"])) {
|
|
25512
|
+
item2 = createVNode(item2, {
|
|
25513
|
+
"line-style": "none"
|
|
25514
|
+
}, null);
|
|
25515
|
+
}
|
|
25516
|
+
}
|
|
25517
|
+
if (!((_c2 = item2.props) == null ? void 0 : _c2.timePosition) && !((_d = item2.props) == null ? void 0 : _d["time-position"])) {
|
|
25518
|
+
item2 = createVNode(item2, {
|
|
25519
|
+
"time-position": props.timePosition ? props.timePosition : "left"
|
|
25520
|
+
}, null);
|
|
25521
|
+
}
|
|
25522
|
+
if (props.direction === "horizontal") {
|
|
25523
|
+
if (((_e = item2.props) == null ? void 0 : _e.position) === "top" || ((_f = item2.props) == null ? void 0 : _f.position) === "bottom") {
|
|
25524
|
+
return item2;
|
|
25525
|
+
}
|
|
25526
|
+
if (props.mode === "alternative") {
|
|
25527
|
+
return renderItemPosition(item2, index2 % 2 == 0 ? "bottom" : "top");
|
|
25528
|
+
} else {
|
|
25529
|
+
return renderItemPosition(item2, "bottom");
|
|
25530
|
+
}
|
|
25531
|
+
} else {
|
|
25532
|
+
if (((_g = item2.props) == null ? void 0 : _g.position) === "left" || ((_h = item2.props) == null ? void 0 : _h.position) === "right") {
|
|
25533
|
+
return item2;
|
|
25534
|
+
}
|
|
25535
|
+
if (props.mode === "alternative") {
|
|
25536
|
+
return renderItemPosition(item2, index2 % 2 == 0 ? "left" : "right");
|
|
25537
|
+
} else {
|
|
25538
|
+
return renderItemPosition(item2, "right");
|
|
25539
|
+
}
|
|
25540
|
+
}
|
|
25541
|
+
});
|
|
25542
|
+
};
|
|
25543
|
+
const getDirection = () => {
|
|
25544
|
+
return props.direction === "horizontal" ? "horizontal" : "vertical";
|
|
25545
|
+
};
|
|
25546
|
+
return createVNode("div", {
|
|
25547
|
+
"class": `devui-timeline devui-timeline-${getDirection()} ${props.center ? "devui-timeline-" + getDirection() + "-center" : ""} `,
|
|
25548
|
+
"ref": timeAxis,
|
|
25549
|
+
"style": style2
|
|
25550
|
+
}, [renderItem()]);
|
|
25551
|
+
};
|
|
25552
|
+
}
|
|
25553
|
+
});
|
|
25554
|
+
Timeline.install = function(app) {
|
|
25555
|
+
app.component(Timeline.name, Timeline);
|
|
25556
|
+
};
|
|
25557
|
+
TimelineItem.install = function(app) {
|
|
25558
|
+
app.component(TimelineItem.name, TimelineItem);
|
|
25559
|
+
};
|
|
25560
|
+
var TimelineInstall = {
|
|
25561
|
+
title: "Timeline \u65F6\u95F4\u8F74",
|
|
25562
|
+
category: "\u6570\u636E\u5C55\u793A",
|
|
25563
|
+
status: "100%",
|
|
25564
|
+
install(app) {
|
|
25565
|
+
app.use(Timeline);
|
|
25566
|
+
app.use(TimelineItem);
|
|
25567
|
+
}
|
|
25568
|
+
};
|
|
25344
25569
|
var TooltipInstall = {
|
|
25345
25570
|
title: "Tooltip\u63D0\u793A",
|
|
25346
25571
|
category: "\u53CD\u9988",
|
|
@@ -25988,8 +26213,9 @@ var Transfer = defineComponent({
|
|
|
25988
26213
|
isFunction("afterTransfer") && props.afterTransfer.call(null, target);
|
|
25989
26214
|
};
|
|
25990
26215
|
const changeAllSource = (source, value) => {
|
|
25991
|
-
if (source.filterData.every((item2) => item2.disabled))
|
|
26216
|
+
if (source.filterData.every((item2) => item2.disabled)) {
|
|
25992
26217
|
return;
|
|
26218
|
+
}
|
|
25993
26219
|
source.allChecked = value;
|
|
25994
26220
|
if (value) {
|
|
25995
26221
|
source.checkedValues = source.filterData.filter((item2) => !item2.disabled).map((item2) => item2.value);
|
|
@@ -26180,14 +26406,15 @@ const deleteNode = (id, data) => {
|
|
|
26180
26406
|
};
|
|
26181
26407
|
function useToggle$1(data) {
|
|
26182
26408
|
const openedTree = (tree2) => {
|
|
26183
|
-
return tree2.reduce((acc, item2) => item2.open ? acc.concat(item2, openedTree(item2.children)) : acc.concat(item2), []);
|
|
26409
|
+
return tree2.reduce((acc, item2) => item2.open ? acc.concat(item2, item2.children ? openedTree(item2.children) : []) : acc.concat(item2), []);
|
|
26184
26410
|
};
|
|
26185
26411
|
const openedData = ref(openedTree(data.value));
|
|
26186
26412
|
watch(() => data.value, (d) => openedData.value = openedTree(d), { deep: true });
|
|
26187
26413
|
const toggle = (target, item2) => {
|
|
26188
26414
|
target.stopPropagation();
|
|
26189
|
-
if (!item2.children)
|
|
26415
|
+
if (!item2.children) {
|
|
26190
26416
|
return;
|
|
26417
|
+
}
|
|
26191
26418
|
item2.open = !item2.open;
|
|
26192
26419
|
openedData.value = openedTree(data.value);
|
|
26193
26420
|
};
|
|
@@ -26201,7 +26428,7 @@ function useMergeNode(data) {
|
|
|
26201
26428
|
const { [childName]: children, [labelName]: label } = treeItem;
|
|
26202
26429
|
if (Array.isArray(children) && children.length === 1 && children[0][childName] && children[0][childName].length === 1) {
|
|
26203
26430
|
return mergeObject(Object.assign({}, children[0], {
|
|
26204
|
-
[labelName]: `${label}
|
|
26431
|
+
[labelName]: `${label} / ${children[0][labelName]}`
|
|
26205
26432
|
}));
|
|
26206
26433
|
}
|
|
26207
26434
|
return treeItem;
|
|
@@ -26241,12 +26468,15 @@ const useHighlightNode = () => {
|
|
|
26241
26468
|
return key;
|
|
26242
26469
|
};
|
|
26243
26470
|
const handleClick = (key) => {
|
|
26244
|
-
if (nodeClassNameReflectRef.value[key] === IS_DISABLED_FLAG)
|
|
26471
|
+
if (nodeClassNameReflectRef.value[key] === IS_DISABLED_FLAG) {
|
|
26245
26472
|
return;
|
|
26246
|
-
|
|
26473
|
+
}
|
|
26474
|
+
if (prevActiveNodeKey.value === key) {
|
|
26247
26475
|
return;
|
|
26248
|
-
|
|
26476
|
+
}
|
|
26477
|
+
if (prevActiveNodeKey.value) {
|
|
26249
26478
|
nodeClassNameReflectRef.value[prevActiveNodeKey.value] = "";
|
|
26479
|
+
}
|
|
26250
26480
|
nodeClassNameReflectRef.value[key] = HIGHLIGHT_CLASS;
|
|
26251
26481
|
prevActiveNodeKey.value = key;
|
|
26252
26482
|
};
|
|
@@ -26345,7 +26575,7 @@ function useChecked(cbr, ctx2, data) {
|
|
|
26345
26575
|
currentSelected = Object.assign(currentSelected, Object.fromEntries(childLevel.map((key) => [key, isSelected ? "select" : "none"])), { [id]: isSelected ? "select" : "none" });
|
|
26346
26576
|
}
|
|
26347
26577
|
selected.value = currentSelected;
|
|
26348
|
-
const currentSelectedItem = flatData.filter(({ id:
|
|
26578
|
+
const currentSelectedItem = flatData.filter(({ id: itemId }) => currentSelected[itemId] && currentSelected[itemId] !== "none");
|
|
26349
26579
|
ctx2.emit("nodeSelected", currentSelectedItem);
|
|
26350
26580
|
};
|
|
26351
26581
|
return {
|
|
@@ -26390,9 +26620,9 @@ const useLazy = () => {
|
|
|
26390
26620
|
};
|
|
26391
26621
|
};
|
|
26392
26622
|
const reflectIconWithHandle = (data, operator) => {
|
|
26393
|
-
const handleAdd = (
|
|
26394
|
-
const handleEdit = (
|
|
26395
|
-
const handleDelete = (
|
|
26623
|
+
const handleAdd = () => operator.handleAdd();
|
|
26624
|
+
const handleEdit = () => operator.handleEdit();
|
|
26625
|
+
const handleDelete = () => operator.handleDelete();
|
|
26396
26626
|
return createVNode(Fragment, null, [operator.addable && createVNode("span", {
|
|
26397
26627
|
"class": "op-icons icon icon-add",
|
|
26398
26628
|
"onClick": handleAdd
|
|
@@ -26404,13 +26634,13 @@ const reflectIconWithHandle = (data, operator) => {
|
|
|
26404
26634
|
"onClick": handleDelete
|
|
26405
26635
|
}, null)]);
|
|
26406
26636
|
};
|
|
26407
|
-
const useOperate = (
|
|
26637
|
+
const useOperate = () => {
|
|
26408
26638
|
const operateIconReflect = ref([]);
|
|
26409
26639
|
const editStatusReflect = ref({});
|
|
26410
26640
|
const handleReflectIdToIcon = (id, operator) => {
|
|
26411
26641
|
const isNotExistedReflectItem = operateIconReflect.value.every(({
|
|
26412
26642
|
id: d
|
|
26413
|
-
}) => d
|
|
26643
|
+
}) => d !== id);
|
|
26414
26644
|
if (isNotExistedReflectItem) {
|
|
26415
26645
|
editStatusReflect.value[id] = false;
|
|
26416
26646
|
operateIconReflect.value.push({
|
|
@@ -26428,7 +26658,7 @@ const useOperate = (treeData) => {
|
|
|
26428
26658
|
const ACTIVE_NODE = "devui-tree-node__content--value-wrapper";
|
|
26429
26659
|
function useDraggable(draggable, dropType, node, renderData, data) {
|
|
26430
26660
|
const dragState = reactive({
|
|
26431
|
-
dropType:
|
|
26661
|
+
dropType: void 0,
|
|
26432
26662
|
draggingNode: null
|
|
26433
26663
|
});
|
|
26434
26664
|
const treeIdMapValue = ref({});
|
|
@@ -26437,7 +26667,7 @@ function useDraggable(draggable, dropType, node, renderData, data) {
|
|
|
26437
26667
|
}, { deep: true, immediate: true });
|
|
26438
26668
|
const removeDraggingStyle = (target) => {
|
|
26439
26669
|
var _a;
|
|
26440
|
-
(_a = target.querySelector(`.${ACTIVE_NODE}`)) == null ? void 0 : _a.classList.remove(...["prev", "next", "inner"].map((item2) => `devui-drop-${item2}`));
|
|
26670
|
+
(_a = target == null ? void 0 : target.querySelector(`.${ACTIVE_NODE}`)) == null ? void 0 : _a.classList.remove(...["prev", "next", "inner"].map((item2) => `devui-drop-${item2}`));
|
|
26441
26671
|
};
|
|
26442
26672
|
const checkIsParent = (childNodeId, parentNodeId) => {
|
|
26443
26673
|
const realParentId = treeIdMapValue.value[childNodeId].parentId;
|
|
@@ -26449,13 +26679,14 @@ function useDraggable(draggable, dropType, node, renderData, data) {
|
|
|
26449
26679
|
return false;
|
|
26450
26680
|
}
|
|
26451
26681
|
};
|
|
26452
|
-
const handlerDropData = (dragNodeId, dropNodeId,
|
|
26682
|
+
const handlerDropData = (dragNodeId, dropNodeId, currentDropType) => {
|
|
26453
26683
|
const cloneData = lodash.exports.cloneDeep(data.value);
|
|
26454
26684
|
let nowDragNode;
|
|
26455
26685
|
let nowDropNode;
|
|
26456
26686
|
const findDragAndDropNode = (curr) => {
|
|
26457
|
-
if (!Array.isArray(curr))
|
|
26687
|
+
if (!Array.isArray(curr)) {
|
|
26458
26688
|
return;
|
|
26689
|
+
}
|
|
26459
26690
|
curr.every((item2, index2) => {
|
|
26460
26691
|
if (nowDragNode && nowDropNode) {
|
|
26461
26692
|
return false;
|
|
@@ -26472,13 +26703,13 @@ function useDraggable(draggable, dropType, node, renderData, data) {
|
|
|
26472
26703
|
});
|
|
26473
26704
|
};
|
|
26474
26705
|
findDragAndDropNode(cloneData);
|
|
26475
|
-
if (nowDragNode && nowDropNode &&
|
|
26706
|
+
if (nowDragNode && nowDropNode && currentDropType) {
|
|
26476
26707
|
const cloneDrapNode = lodash.exports.cloneDeep(nowDragNode.target[nowDragNode.index]);
|
|
26477
|
-
if (
|
|
26708
|
+
if (currentDropType === "prev") {
|
|
26478
26709
|
nowDropNode.target.splice(nowDropNode.index, 0, cloneDrapNode);
|
|
26479
|
-
} else if (
|
|
26710
|
+
} else if (currentDropType === "next") {
|
|
26480
26711
|
nowDropNode.target.splice(nowDropNode.index + 1, 0, cloneDrapNode);
|
|
26481
|
-
} else if (
|
|
26712
|
+
} else if (currentDropType === "inner") {
|
|
26482
26713
|
const children = nowDropNode.target[nowDropNode.index].children;
|
|
26483
26714
|
if (Array.isArray(children)) {
|
|
26484
26715
|
children.unshift(cloneDrapNode);
|
|
@@ -26494,18 +26725,21 @@ function useDraggable(draggable, dropType, node, renderData, data) {
|
|
|
26494
26725
|
return cloneData;
|
|
26495
26726
|
};
|
|
26496
26727
|
const onDragstart = (event, treeNode) => {
|
|
26728
|
+
var _a;
|
|
26497
26729
|
dragState.draggingNode = event.target;
|
|
26498
|
-
const
|
|
26730
|
+
const treeInfo = {
|
|
26499
26731
|
type: "tree-node",
|
|
26500
26732
|
nodeId: treeNode.id
|
|
26501
26733
|
};
|
|
26502
|
-
event.dataTransfer.setData("Text", JSON.stringify(
|
|
26734
|
+
(_a = event.dataTransfer) == null ? void 0 : _a.setData("Text", JSON.stringify(treeInfo));
|
|
26503
26735
|
};
|
|
26504
26736
|
const onDragover = (event) => {
|
|
26505
26737
|
var _a;
|
|
26506
26738
|
if (draggable) {
|
|
26507
26739
|
event.preventDefault();
|
|
26508
|
-
event.dataTransfer
|
|
26740
|
+
if (event.dataTransfer) {
|
|
26741
|
+
event.dataTransfer.dropEffect = "move";
|
|
26742
|
+
}
|
|
26509
26743
|
if (!node) {
|
|
26510
26744
|
return;
|
|
26511
26745
|
}
|
|
@@ -26538,12 +26772,13 @@ function useDraggable(draggable, dropType, node, renderData, data) {
|
|
|
26538
26772
|
removeDraggingStyle(event.currentTarget);
|
|
26539
26773
|
};
|
|
26540
26774
|
const onDrop2 = (event, dropNode) => {
|
|
26775
|
+
var _a;
|
|
26541
26776
|
removeDraggingStyle(event.currentTarget);
|
|
26542
26777
|
if (!draggable) {
|
|
26543
26778
|
return;
|
|
26544
26779
|
}
|
|
26545
26780
|
event.preventDefault();
|
|
26546
|
-
const transferDataStr = event.dataTransfer.getData("Text");
|
|
26781
|
+
const transferDataStr = (_a = event.dataTransfer) == null ? void 0 : _a.getData("Text");
|
|
26547
26782
|
if (transferDataStr) {
|
|
26548
26783
|
try {
|
|
26549
26784
|
const transferData = JSON.parse(transferDataStr);
|
|
@@ -26572,8 +26807,54 @@ function useDraggable(draggable, dropType, node, renderData, data) {
|
|
|
26572
26807
|
dragState
|
|
26573
26808
|
};
|
|
26574
26809
|
}
|
|
26575
|
-
|
|
26576
|
-
|
|
26810
|
+
const IconOpen$1 = () => createVNode("svg", {
|
|
26811
|
+
"width": "16px",
|
|
26812
|
+
"height": "16px",
|
|
26813
|
+
"viewBox": "0 0 16 16",
|
|
26814
|
+
"version": "1.1",
|
|
26815
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
26816
|
+
"class": "svg-icon svg-icon-close"
|
|
26817
|
+
}, [createVNode("g", {
|
|
26818
|
+
"stroke-width": "1",
|
|
26819
|
+
"fill": "none",
|
|
26820
|
+
"fill-rule": "evenodd"
|
|
26821
|
+
}, [createVNode("rect", {
|
|
26822
|
+
"x": "0.5",
|
|
26823
|
+
"y": "0.5",
|
|
26824
|
+
"width": "15",
|
|
26825
|
+
"height": "15",
|
|
26826
|
+
"rx": "2",
|
|
26827
|
+
"stroke": "#5e7ce0"
|
|
26828
|
+
}, null), createVNode("rect", {
|
|
26829
|
+
"x": "4",
|
|
26830
|
+
"y": "7",
|
|
26831
|
+
"width": "8",
|
|
26832
|
+
"height": "2",
|
|
26833
|
+
"fill": "#5e7ce0"
|
|
26834
|
+
}, null)])]);
|
|
26835
|
+
const IconClose$1 = () => createVNode("svg", {
|
|
26836
|
+
"width": "16px",
|
|
26837
|
+
"height": "16px",
|
|
26838
|
+
"viewBox": "0 0 16 16",
|
|
26839
|
+
"version": "1.1",
|
|
26840
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
26841
|
+
"class": "svg-icon"
|
|
26842
|
+
}, [createVNode("g", {
|
|
26843
|
+
"stroke": "none",
|
|
26844
|
+
"stroke-width": "1",
|
|
26845
|
+
"fill": "none",
|
|
26846
|
+
"fill-rule": "evenodd"
|
|
26847
|
+
}, [createVNode("rect", {
|
|
26848
|
+
"x": "0.5",
|
|
26849
|
+
"y": "0.5",
|
|
26850
|
+
"width": "15",
|
|
26851
|
+
"height": "15",
|
|
26852
|
+
"rx": "2",
|
|
26853
|
+
"stroke": "#252b3a"
|
|
26854
|
+
}, null), createVNode("path", {
|
|
26855
|
+
"fill": "#252b3a",
|
|
26856
|
+
"d": "M8.75,4 L8.75,7.25 L12,7.25 L12,8.75 L8.749,8.75 L8.75,12 L7.25,12 L7.249,8.75 L4,8.75 L4,7.25 L7.25,7.25 L7.25,4 L8.75,4 Z"
|
|
26857
|
+
}, null)])]);
|
|
26577
26858
|
var NodeContent = defineComponent({
|
|
26578
26859
|
name: "DTreeNodeContent",
|
|
26579
26860
|
props: {
|
|
@@ -26735,21 +27016,21 @@ var Tree = defineComponent({
|
|
|
26735
27016
|
}, 4e3);
|
|
26736
27017
|
});
|
|
26737
27018
|
},
|
|
26738
|
-
renderLoading: (
|
|
27019
|
+
renderLoading: (elementId) => {
|
|
26739
27020
|
return loading.open({
|
|
26740
|
-
target: document.getElementById(
|
|
27021
|
+
target: document.getElementById(elementId),
|
|
26741
27022
|
message: "\u52A0\u8F7D\u4E2D...",
|
|
26742
27023
|
positionType: "relative",
|
|
26743
27024
|
zIndex: 1
|
|
26744
27025
|
});
|
|
26745
27026
|
}
|
|
26746
27027
|
});
|
|
26747
|
-
const renderFoldIcon = (
|
|
27028
|
+
const renderFoldIcon = (treeItem) => {
|
|
26748
27029
|
const handleClick = async (target) => {
|
|
26749
|
-
if (
|
|
26750
|
-
|
|
27030
|
+
if (treeItem.isParent) {
|
|
27031
|
+
treeItem.children = await getLazyData(id);
|
|
26751
27032
|
}
|
|
26752
|
-
return toggle(target,
|
|
27033
|
+
return toggle(target, treeItem);
|
|
26753
27034
|
};
|
|
26754
27035
|
return createVNode("div", {
|
|
26755
27036
|
"class": "devui-tree-node__folder",
|
|
@@ -26799,15 +27080,12 @@ var Tree = defineComponent({
|
|
|
26799
27080
|
};
|
|
26800
27081
|
}
|
|
26801
27082
|
});
|
|
26802
|
-
Tree.install = function(app) {
|
|
26803
|
-
app.component(Tree.name, Tree);
|
|
26804
|
-
};
|
|
26805
27083
|
var TreeInstall = {
|
|
26806
27084
|
title: "Tree \u6811",
|
|
26807
27085
|
category: "\u6570\u636E\u5C55\u793A",
|
|
26808
27086
|
status: "20%",
|
|
26809
27087
|
install(app) {
|
|
26810
|
-
app.
|
|
27088
|
+
app.component(Tree.name, Tree);
|
|
26811
27089
|
}
|
|
26812
27090
|
};
|
|
26813
27091
|
var treeSelect = "";
|
|
@@ -26892,8 +27170,9 @@ function className(classStr, classOpt) {
|
|
|
26892
27170
|
function useToggle(props) {
|
|
26893
27171
|
const visible = ref(false);
|
|
26894
27172
|
const selectToggle = () => {
|
|
26895
|
-
if (props.disabled)
|
|
27173
|
+
if (props.disabled) {
|
|
26896
27174
|
return;
|
|
27175
|
+
}
|
|
26897
27176
|
visible.value = !visible.value;
|
|
26898
27177
|
};
|
|
26899
27178
|
const treeToggle = (e, item2) => {
|
|
@@ -26915,8 +27194,9 @@ function useSelect(props) {
|
|
|
26915
27194
|
inputValue.value = item2.label;
|
|
26916
27195
|
} else {
|
|
26917
27196
|
item2.checked = !item2.checked;
|
|
26918
|
-
if (item2.halfchecked)
|
|
27197
|
+
if (item2.halfchecked) {
|
|
26919
27198
|
item2.halfchecked = false;
|
|
27199
|
+
}
|
|
26920
27200
|
useCache(item2);
|
|
26921
27201
|
searchUp(item2);
|
|
26922
27202
|
searchDown(item2);
|
|
@@ -26927,8 +27207,9 @@ function useSelect(props) {
|
|
|
26927
27207
|
item2.checked === true ? selectedCache.add(item2.label) : selectedCache.has(item2.label) && selectedCache.delete(item2.label);
|
|
26928
27208
|
};
|
|
26929
27209
|
const searchUp = (item2) => {
|
|
26930
|
-
if (!item2.parent)
|
|
27210
|
+
if (!item2.parent) {
|
|
26931
27211
|
return;
|
|
27212
|
+
}
|
|
26932
27213
|
let state = "";
|
|
26933
27214
|
const checkedArr = item2.parent.children.filter((el) => el.checked === true);
|
|
26934
27215
|
switch (checkedArr.length) {
|
|
@@ -26956,8 +27237,9 @@ function useSelect(props) {
|
|
|
26956
27237
|
searchUp(item2.parent);
|
|
26957
27238
|
};
|
|
26958
27239
|
const searchDown = (item2) => {
|
|
26959
|
-
if (!item2.children)
|
|
27240
|
+
if (!item2.children) {
|
|
26960
27241
|
return;
|
|
27242
|
+
}
|
|
26961
27243
|
item2.children.forEach((el) => {
|
|
26962
27244
|
el.checked = item2.checked;
|
|
26963
27245
|
useCache(el);
|
|
@@ -27001,8 +27283,8 @@ function useClear(props, ctx2, data) {
|
|
|
27001
27283
|
handleClearItem
|
|
27002
27284
|
};
|
|
27003
27285
|
}
|
|
27004
|
-
var IconOpen = "data:image/svg+xml;base64,
|
|
27005
|
-
var IconClose = "data:image/svg+xml;base64,
|
|
27286
|
+
var IconOpen = "data:image/svg+xml;base64,PHN2Zw0KICB3aWR0aD0iMTZweCINCiAgaGVpZ2h0PSIxNnB4Ig0KICB2aWV3Qm94PSIwIDAgMTYgMTYiDQogIHZlcnNpb249IjEuMSINCiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayINCiAgY2xhc3M9InN2Zy1pY29uIHN2Zy1pY29uLWNsb3NlIg0KPg0KICA8ZyBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgPHJlY3QgeD0iMC41IiB5PSIwLjUiIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgcng9IjIiIHN0cm9rZT0iIzVlN2NlMCI+PC9yZWN0Pg0KICAgIDxyZWN0IHg9IjQiIHk9IjciIHdpZHRoPSI4IiBoZWlnaHQ9IjIiIGZpbGw9IiM1ZTdjZTAiPjwvcmVjdD4NCiAgPC9nPg0KPC9zdmc+";
|
|
27287
|
+
var IconClose = "data:image/svg+xml;base64,PHN2Zw0KICB3aWR0aD0iMTZweCINCiAgaGVpZ2h0PSIxNnB4Ig0KICB2aWV3Qm94PSIwIDAgMTYgMTYiDQogIHZlcnNpb249IjEuMSINCiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayINCiAgY2xhc3M9InN2Zy1pY29uIg0KPg0KICA8ZyBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4NCiAgICA8cmVjdCB4PSIwLjUiIHk9IjAuNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE1IiByeD0iMiIgc3Ryb2tlPSIjMjUyYjNhIj48L3JlY3Q+DQogICAgPHBhdGgNCiAgICAgIGZpbGw9IiMyNTJiM2EiDQogICAgICBkPSJNOC43NSw0IEw4Ljc1LDcuMjUgTDEyLDcuMjUgTDEyLDguNzUgTDguNzQ5LDguNzUgTDguNzUsMTIgTDcuMjUsMTIgTDcuMjQ5LDguNzUgTDQsOC43NSBMNCw3LjI1IEw3LjI1LDcuMjUgTDcuMjUsNCBMOC43NSw0IFoiDQogICAgPjwvcGF0aD4NCiAgPC9nPg0KPC9zdmc+DQo=";
|
|
27006
27288
|
var TreeSelect = defineComponent({
|
|
27007
27289
|
name: "DTreeSelect",
|
|
27008
27290
|
directives: {
|
|
@@ -27857,8 +28139,8 @@ const installs = [
|
|
|
27857
28139
|
TagInstall,
|
|
27858
28140
|
TagInputInstall,
|
|
27859
28141
|
TextareaInstall,
|
|
27860
|
-
TimeAxisInstall,
|
|
27861
28142
|
TimePickerInstall,
|
|
28143
|
+
TimelineInstall,
|
|
27862
28144
|
TooltipInstall,
|
|
27863
28145
|
TransferInstall,
|
|
27864
28146
|
TreeInstall,
|
|
@@ -27866,9 +28148,9 @@ const installs = [
|
|
|
27866
28148
|
UploadInstall
|
|
27867
28149
|
];
|
|
27868
28150
|
var vueDevui = {
|
|
27869
|
-
version: "0.0.
|
|
28151
|
+
version: "1.0.0-rc.0",
|
|
27870
28152
|
install(app) {
|
|
27871
28153
|
installs.forEach((p) => app.use(p));
|
|
27872
28154
|
}
|
|
27873
28155
|
};
|
|
27874
|
-
export { Accordion, Alert, Anchor, Aside, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, DButton as Button, Card, Carousel, CarouselItem, Cascader, Checkbox, Col, ColorPicker, Column, Comment, Content, Countdown, DatePicker, DraggableDirective, Drawer, DrawerService, Dropdown, DropdownMenu, DroppableDirective, EditableSelect, FixedOverlay, FlexibleOverlay, Footer$1 as Footer, Form, FormControl, FormItem, FormLabel, FormOperation, Fullscreen, Gantt, Header$1 as Header, Icon, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, List, ListItem, loadingDirective as Loading, loading as LoadingService, Modal, NavSprite, Notification, NotificationService, Pagination, Panel, Popover, Progress, QuadrantDiagram, Radio, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, Statistic, Status, StepsGuide, StickSlider, Sticky, Switch, Table, Tabs, Tag, TagInput, Textarea,
|
|
28156
|
+
export { Accordion, Alert, Anchor, Aside, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, DButton as Button, Card, Carousel, CarouselItem, Cascader, Checkbox, Col, ColorPicker, Column, Comment, Content, Countdown, DatePicker, DraggableDirective, Drawer, DrawerService, Dropdown, DropdownMenu, DroppableDirective, EditableSelect, FixedOverlay, FlexibleOverlay, Footer$1 as Footer, Form, FormControl, FormItem, FormLabel, FormOperation, Fullscreen, Gantt, Header$1 as Header, DIcon as Icon, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, List, ListItem, loadingDirective as Loading, loading as LoadingService, Modal, NavSprite, Notification, NotificationService, Pagination, Panel, PanelBody, PanelFooter, PanelHeader, Popover, Progress, QuadrantDiagram, Radio, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, Statistic, Status, StepsGuide, StickSlider, Sticky, Switch, Table, Tabs, Tag, TagInput, Textarea, TimePicker, Timeline, TimelineItem, DTooltip as Tooltip, Transfer, Tree, TreeSelect, Upload, vueDevui as default };
|