vue-devui 1.0.0-rc.13 → 1.0.0-rc.16
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 +161 -156
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +241 -82
- package/auto-complete/index.umd.js +28 -17
- package/auto-complete/style.css +1 -1
- package/avatar/index.umd.js +1 -1
- package/badge/index.umd.js +1 -1
- package/button/index.es.js +21 -42
- package/button/index.umd.js +9 -9
- package/card/index.umd.js +1 -1
- package/checkbox/index.es.js +94 -77
- package/checkbox/index.umd.js +26 -15
- package/collapse/index.es.js +3 -21
- package/collapse/index.umd.js +1 -1
- package/countdown/index.umd.js +1 -1
- package/date-picker-pro/index.es.js +1384 -220
- package/date-picker-pro/index.umd.js +25 -14
- package/date-picker-pro/style.css +1 -1
- package/drawer/index.es.js +4 -17
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.es.js +4 -22
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +254 -99
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +85 -71
- package/form/index.umd.js +22 -11
- package/fullscreen/index.umd.js +1 -1
- package/grid/index.es.js +7 -20
- package/grid/index.umd.js +1 -1
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +12 -23
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +239 -75
- package/input/index.umd.js +27 -16
- package/input-number/index.es.js +1 -16
- package/input-number/index.umd.js +1 -1
- package/layout/index.es.js +1 -1
- package/layout/index.umd.js +1 -1
- package/loading/index.es.js +15 -38
- package/loading/index.umd.js +1 -1
- package/message/index.d.ts +7 -0
- package/message/index.es.js +534 -0
- package/message/index.umd.js +1 -0
- package/message/package.json +7 -0
- package/message/style.css +1 -0
- package/modal/index.es.js +11 -43
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +16 -22
- package/notification/index.umd.js +1 -1
- package/nuxt/components/Message.js +3 -0
- package/nuxt/components/animationInjectionKey.js +3 -0
- package/nuxt/components/messageProps.js +3 -0
- package/nuxt/components/roundInjectionKey.js +3 -0
- package/nuxt/components/skeletonItemProps.js +3 -0
- package/overlay/index.es.js +1 -1
- package/overlay/index.umd.js +1 -1
- package/package.json +4 -2
- package/pagination/index.es.js +152 -2
- package/pagination/index.umd.js +1 -1
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +1 -1
- package/popover/index.umd.js +4 -4
- package/progress/index.umd.js +3 -3
- package/radio/index.es.js +91 -75
- package/radio/index.umd.js +28 -17
- package/radio/style.css +1 -1
- package/rate/index.umd.js +1 -1
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +5 -18
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +255 -78
- package/search/index.umd.js +27 -16
- package/search/style.css +1 -1
- package/select/index.es.js +283 -114
- package/select/index.umd.js +27 -16
- package/select/style.css +1 -1
- package/skeleton/index.es.js +87 -261
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +175 -32
- package/splitter/index.umd.js +13 -13
- package/statistic/index.es.js +0 -21
- package/statistic/index.umd.js +1 -1
- package/status/index.umd.js +1 -1
- package/steps/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +85 -71
- package/switch/index.umd.js +25 -14
- package/table/index.es.js +309 -96
- package/table/index.umd.js +25 -14
- package/table/style.css +1 -1
- package/tabs/index.umd.js +1 -1
- package/tag/index.umd.js +1 -1
- package/textarea/index.es.js +88 -72
- package/textarea/index.umd.js +26 -15
- package/time-picker/index.es.js +248 -89
- package/time-picker/index.umd.js +25 -14
- package/time-select/index.es.js +283 -114
- package/time-select/index.umd.js +26 -15
- package/time-select/style.css +1 -1
- package/timeline/index.umd.js +1 -1
- package/tooltip/index.es.js +1 -1
- package/tooltip/index.umd.js +4 -4
- package/tree/index.es.js +422 -110
- package/tree/index.umd.js +25 -14
- package/tree/style.css +1 -1
- package/upload/index.es.js +168 -49
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +13601 -13023
- package/vue-devui.umd.js +32 -21
- package/LICENSE +0 -23
|
@@ -1,37 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
var __publicField = (obj, key, value) => {
|
|
18
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19
|
-
return value;
|
|
20
|
-
};
|
|
21
|
-
import { defineComponent, ref, createVNode, h, render, computed, nextTick, unref, watch, onUnmounted, mergeProps, getCurrentInstance, withDirectives, withModifiers, resolveComponent, Teleport, Transition, vShow, resolveDirective } from "vue";
|
|
1
|
+
import { defineComponent, ref, createVNode, h, render, computed, nextTick, watch, onUnmounted, unref, mergeProps, reactive, getCurrentInstance, withDirectives, withModifiers, resolveComponent, Teleport, Transition, vShow, resolveDirective } from "vue";
|
|
22
2
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
23
3
|
const editableSelectProps = {
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: ""
|
|
7
|
+
},
|
|
24
8
|
options: {
|
|
25
9
|
type: Array,
|
|
26
10
|
default: () => []
|
|
27
11
|
},
|
|
28
|
-
|
|
29
|
-
type: Boolean
|
|
12
|
+
allowClear: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
30
15
|
},
|
|
31
|
-
|
|
16
|
+
disabled: {
|
|
32
17
|
type: Boolean
|
|
33
18
|
},
|
|
34
|
-
|
|
19
|
+
disabledKey: {
|
|
35
20
|
type: String,
|
|
36
21
|
default: ""
|
|
37
22
|
},
|
|
@@ -39,16 +24,22 @@ const editableSelectProps = {
|
|
|
39
24
|
type: String,
|
|
40
25
|
default: "Search"
|
|
41
26
|
},
|
|
42
|
-
modelValue: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: ""
|
|
45
|
-
},
|
|
46
27
|
width: {
|
|
47
28
|
type: Number
|
|
48
29
|
},
|
|
49
30
|
maxHeight: {
|
|
50
31
|
type: Number
|
|
51
32
|
},
|
|
33
|
+
loading: {
|
|
34
|
+
type: Boolean
|
|
35
|
+
},
|
|
36
|
+
enableLazyLoad: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
40
|
+
searchFn: {
|
|
41
|
+
type: Function
|
|
42
|
+
},
|
|
52
43
|
filterOption: {
|
|
53
44
|
type: [Function, Boolean]
|
|
54
45
|
}
|
|
@@ -110,8 +101,8 @@ const clickoutsideDirective = {
|
|
|
110
101
|
};
|
|
111
102
|
class View {
|
|
112
103
|
constructor() {
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
this.top = "50%";
|
|
105
|
+
this.left = "50%";
|
|
115
106
|
}
|
|
116
107
|
}
|
|
117
108
|
const loadingProps = {
|
|
@@ -129,13 +120,9 @@ const loadingProps = {
|
|
|
129
120
|
};
|
|
130
121
|
class LoadingOptions {
|
|
131
122
|
constructor() {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
__publicField(this, "backdrop", true);
|
|
136
|
-
__publicField(this, "positionType", "relative");
|
|
137
|
-
__publicField(this, "view", new View());
|
|
138
|
-
__publicField(this, "zIndex");
|
|
123
|
+
this.backdrop = true;
|
|
124
|
+
this.positionType = "relative";
|
|
125
|
+
this.view = new View();
|
|
139
126
|
}
|
|
140
127
|
}
|
|
141
128
|
function createBem(namespace, element, modifier) {
|
|
@@ -226,7 +213,7 @@ var Loading = defineComponent({
|
|
|
226
213
|
});
|
|
227
214
|
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
228
215
|
function createComponent(component, props, children = null) {
|
|
229
|
-
const vnode = h(component,
|
|
216
|
+
const vnode = h(component, { ...props }, children);
|
|
230
217
|
const container = document.createElement("div");
|
|
231
218
|
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
232
219
|
render(vnode, container);
|
|
@@ -313,9 +300,12 @@ const removeAttribute = (el) => {
|
|
|
313
300
|
};
|
|
314
301
|
const handleProps = (el, vprops) => {
|
|
315
302
|
var _a;
|
|
316
|
-
const props =
|
|
303
|
+
const props = {
|
|
304
|
+
...new LoadingOptions(),
|
|
305
|
+
...vprops
|
|
306
|
+
};
|
|
317
307
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
318
|
-
const loadingInstance = createComponent(loadingConstructor,
|
|
308
|
+
const loadingInstance = createComponent(loadingConstructor, { ...props }, loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
319
309
|
el.style.position = props.positionType;
|
|
320
310
|
el.options = props;
|
|
321
311
|
el.instance = loadingInstance;
|
|
@@ -346,21 +336,39 @@ function className(classStr, classOpt) {
|
|
|
346
336
|
return classname;
|
|
347
337
|
}
|
|
348
338
|
var editableSelect = "";
|
|
349
|
-
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
339
|
+
function useSelect(props) {
|
|
340
|
+
const normalizeOptions = computed(() => {
|
|
341
|
+
return props.options.map((option) => {
|
|
342
|
+
let res;
|
|
343
|
+
if (option !== "null" && typeof option === "object") {
|
|
344
|
+
res = {
|
|
345
|
+
...option,
|
|
346
|
+
label: option.label || "",
|
|
347
|
+
value: option.value !== void 0 ? option.value : option.label || ""
|
|
348
|
+
};
|
|
349
|
+
} else {
|
|
350
|
+
res = {
|
|
351
|
+
label: String(option),
|
|
352
|
+
value: option
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
return res;
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
return { normalizeOptions };
|
|
359
|
+
}
|
|
360
|
+
function useFilterOptions(enableLazyLoad, normalizeOptions, inputValue, searchFn) {
|
|
361
|
+
const filteredOptions = computed(() => {
|
|
362
|
+
if (!inputValue.value || enableLazyLoad) {
|
|
363
|
+
return normalizeOptions.value;
|
|
359
364
|
}
|
|
365
|
+
return normalizeOptions.value.filter((option) => {
|
|
366
|
+
return searchFn(option, inputValue.value);
|
|
367
|
+
});
|
|
360
368
|
});
|
|
361
|
-
return filteredOptions;
|
|
362
|
-
}
|
|
363
|
-
|
|
369
|
+
return { filteredOptions };
|
|
370
|
+
}
|
|
371
|
+
function useInput(inputValue, ctx2) {
|
|
364
372
|
const onInputChange = (value) => {
|
|
365
373
|
ctx2.emit("search", value);
|
|
366
374
|
};
|
|
@@ -372,20 +380,20 @@ const useInput = (inputValue, ctx2) => {
|
|
|
372
380
|
return {
|
|
373
381
|
handleInput
|
|
374
382
|
};
|
|
375
|
-
}
|
|
376
|
-
|
|
383
|
+
}
|
|
384
|
+
function useLazyLoad(dropdownRef, enableLazyLoad, ctx2) {
|
|
377
385
|
const loadMore = () => {
|
|
378
386
|
const dropdownVal = dropdownRef.value;
|
|
379
|
-
if (
|
|
387
|
+
if (!enableLazyLoad) {
|
|
380
388
|
return;
|
|
381
389
|
}
|
|
382
390
|
if (dropdownVal.clientHeight + dropdownVal.scrollTop >= dropdownVal.scrollHeight) {
|
|
383
|
-
ctx2.emit("loadMore"
|
|
391
|
+
ctx2.emit("loadMore");
|
|
384
392
|
}
|
|
385
393
|
};
|
|
386
394
|
return { loadMore };
|
|
387
|
-
}
|
|
388
|
-
|
|
395
|
+
}
|
|
396
|
+
function useKeyboardSelect(dropdownRef, visible, inputValue, cacheInput, filteredOptions, optionDisabledKey, filterOption, loading2, handleClick, closeMenu, toggleMenu) {
|
|
389
397
|
const hoverIndex = ref(0);
|
|
390
398
|
const selectedIndex = ref(0);
|
|
391
399
|
const updateHoveringIndex = (index2) => {
|
|
@@ -464,7 +472,7 @@ const useKeyboardSelect = (dropdownRef, visible, inputValue, cacheInput, filtere
|
|
|
464
472
|
}
|
|
465
473
|
};
|
|
466
474
|
return { handleKeydown, hoverIndex, selectedIndex };
|
|
467
|
-
}
|
|
475
|
+
}
|
|
468
476
|
const flexibleOverlayProps = {
|
|
469
477
|
modelValue: {
|
|
470
478
|
type: Boolean,
|
|
@@ -630,7 +638,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
630
638
|
};
|
|
631
639
|
}
|
|
632
640
|
});
|
|
633
|
-
|
|
641
|
+
function useCacheFilteredOptions(filteredOptions) {
|
|
634
642
|
const cacheFilteredOptions = computed(() => {
|
|
635
643
|
const map = /* @__PURE__ */ new Map();
|
|
636
644
|
filteredOptions.value.forEach((item) => {
|
|
@@ -642,6 +650,155 @@ const useCacheFilteredOptions = (filteredOptions) => {
|
|
|
642
650
|
return {
|
|
643
651
|
getOptionValue
|
|
644
652
|
};
|
|
653
|
+
}
|
|
654
|
+
function deepAssign(...objects) {
|
|
655
|
+
const isObject = (obj) => obj && typeof obj === "object";
|
|
656
|
+
return objects.reduce((prev, from) => {
|
|
657
|
+
Object.keys(from).forEach((key) => {
|
|
658
|
+
const pVal = prev[key];
|
|
659
|
+
const oVal = from[key];
|
|
660
|
+
if (Array.isArray(pVal) && Array.isArray(oVal)) {
|
|
661
|
+
prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
|
|
662
|
+
} else if (isObject(pVal) && isObject(oVal)) {
|
|
663
|
+
prev[key] = deepAssign(pVal, oVal);
|
|
664
|
+
} else {
|
|
665
|
+
prev[key] = oVal;
|
|
666
|
+
}
|
|
667
|
+
});
|
|
668
|
+
return prev;
|
|
669
|
+
}, {});
|
|
670
|
+
}
|
|
671
|
+
var zhCN = {
|
|
672
|
+
pagination: {
|
|
673
|
+
totalItemText: "\u6240\u6709\u6761\u76EE",
|
|
674
|
+
goToText: "\u8DF3\u81F3"
|
|
675
|
+
},
|
|
676
|
+
accordion: {
|
|
677
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
678
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
679
|
+
},
|
|
680
|
+
autoCompleteDropdown: {
|
|
681
|
+
latestInput: "\u6700\u8FD1\u8F93\u5165"
|
|
682
|
+
},
|
|
683
|
+
cascaderList: {
|
|
684
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
685
|
+
},
|
|
686
|
+
colorPicker: {
|
|
687
|
+
foundationPanel: "\u57FA\u7840\u9762\u677F",
|
|
688
|
+
advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
|
|
689
|
+
},
|
|
690
|
+
datePickerPro: {
|
|
691
|
+
ok: "\u786E\u5B9A",
|
|
692
|
+
placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
|
|
693
|
+
month1: "1\u6708",
|
|
694
|
+
month2: "2\u6708",
|
|
695
|
+
month3: "3\u6708",
|
|
696
|
+
month4: "4\u6708",
|
|
697
|
+
month5: "5\u6708",
|
|
698
|
+
month6: "6\u6708",
|
|
699
|
+
month7: "7\u6708",
|
|
700
|
+
month8: "8\u6708",
|
|
701
|
+
month9: "9\u6708",
|
|
702
|
+
month10: "10\u6708",
|
|
703
|
+
month11: "11\u6708",
|
|
704
|
+
month12: "12\u6708",
|
|
705
|
+
year: "\u5E74",
|
|
706
|
+
startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
|
|
707
|
+
endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
|
|
708
|
+
getWeekDays() {
|
|
709
|
+
return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
|
|
710
|
+
},
|
|
711
|
+
getTimeArr() {
|
|
712
|
+
return ["\u65F6", "\u5206", "\u79D2"];
|
|
713
|
+
},
|
|
714
|
+
getYearMonthStr(year, month) {
|
|
715
|
+
return `${year}\u5E74${month}\u6708`;
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
editableSelect: {
|
|
719
|
+
noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
720
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
721
|
+
},
|
|
722
|
+
input: {
|
|
723
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
724
|
+
},
|
|
725
|
+
splitterBar: {
|
|
726
|
+
collapse: "\u6536\u8D77",
|
|
727
|
+
expand: "\u5C55\u5F00"
|
|
728
|
+
},
|
|
729
|
+
stepsGuide: {
|
|
730
|
+
previous: "\u4E0A\u4E00\u6B65",
|
|
731
|
+
continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
|
|
732
|
+
ok: "\u6211\u77E5\u9053\u5566"
|
|
733
|
+
},
|
|
734
|
+
table: {
|
|
735
|
+
selectAll: "\u5168\u9009",
|
|
736
|
+
ok: "\u786E\u5B9A"
|
|
737
|
+
},
|
|
738
|
+
timePopup: {
|
|
739
|
+
ok: "\u786E\u5B9A"
|
|
740
|
+
},
|
|
741
|
+
transfer: {
|
|
742
|
+
unit: "\u9879",
|
|
743
|
+
panelUnit: "\u9879",
|
|
744
|
+
headerUnit: "\u9879",
|
|
745
|
+
noData: "\u6682\u65E0\u6570\u636E",
|
|
746
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
|
|
747
|
+
},
|
|
748
|
+
tree: {
|
|
749
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
750
|
+
newNode: "\u65B0\u8282\u70B9",
|
|
751
|
+
selectPlaceholder: "\u8BF7\u9009\u62E9"
|
|
752
|
+
},
|
|
753
|
+
upload: {
|
|
754
|
+
placeholder: "\u9009\u62E9\u6587\u4EF6",
|
|
755
|
+
getExistSameNameFilesMsg(sameNames) {
|
|
756
|
+
return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
|
|
757
|
+
},
|
|
758
|
+
getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
|
|
759
|
+
return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
|
|
760
|
+
},
|
|
761
|
+
getBeyondMaximalFileSizeMsg(filename, maximalSize) {
|
|
762
|
+
return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
|
|
763
|
+
},
|
|
764
|
+
getNotAllowedFileTypeMsg(filename, scope) {
|
|
765
|
+
return `\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${scope}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
|
|
766
|
+
}
|
|
767
|
+
},
|
|
768
|
+
search: {
|
|
769
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
|
|
770
|
+
},
|
|
771
|
+
select: {
|
|
772
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
773
|
+
noDataText: "\u65E0\u6570\u636E",
|
|
774
|
+
noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
775
|
+
loadingText: "\u52A0\u8F7D\u4E2D..."
|
|
776
|
+
},
|
|
777
|
+
tagInput: {
|
|
778
|
+
maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
|
|
779
|
+
},
|
|
780
|
+
timeSelect: {
|
|
781
|
+
placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
const lang = ref("zh-CN");
|
|
785
|
+
let langMessages = reactive({
|
|
786
|
+
[lang.value]: zhCN
|
|
787
|
+
});
|
|
788
|
+
const Locale = {
|
|
789
|
+
messages() {
|
|
790
|
+
return langMessages[lang.value];
|
|
791
|
+
},
|
|
792
|
+
lang() {
|
|
793
|
+
return lang.value;
|
|
794
|
+
},
|
|
795
|
+
use(newLang, newMessages) {
|
|
796
|
+
lang.value = newLang;
|
|
797
|
+
this.add({ [newLang]: newMessages });
|
|
798
|
+
},
|
|
799
|
+
add(newMessages = {}) {
|
|
800
|
+
langMessages = deepAssign(langMessages, newMessages);
|
|
801
|
+
}
|
|
645
802
|
};
|
|
646
803
|
const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
|
|
647
804
|
function get(object, path) {
|
|
@@ -656,7 +813,8 @@ function get(object, path) {
|
|
|
656
813
|
function createI18nTranslate(name, app, newPrefix) {
|
|
657
814
|
const prefix = newPrefix || camelize(name) + ".";
|
|
658
815
|
return (path) => {
|
|
659
|
-
|
|
816
|
+
var _a;
|
|
817
|
+
const messages = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
|
|
660
818
|
const message = get(messages, prefix + path) || get(messages, path);
|
|
661
819
|
return message;
|
|
662
820
|
};
|
|
@@ -673,7 +831,6 @@ var EditableSelect = defineComponent({
|
|
|
673
831
|
const app = getCurrentInstance();
|
|
674
832
|
const t = createI18nTranslate("DEditableSelect", app);
|
|
675
833
|
const ns = useNamespace("editable-select");
|
|
676
|
-
const dropdownNS = useNamespace("editable-select-dropdown");
|
|
677
834
|
const dropdownRef = ref();
|
|
678
835
|
const origin = ref();
|
|
679
836
|
const position = ref(["bottom"]);
|
|
@@ -681,30 +838,22 @@ var EditableSelect = defineComponent({
|
|
|
681
838
|
const inputValue = ref(props.modelValue);
|
|
682
839
|
const cacheInput = ref();
|
|
683
840
|
const loading2 = ref(props.loading);
|
|
684
|
-
const
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
}
|
|
692
|
-
return {
|
|
693
|
-
label: option + "",
|
|
694
|
-
value: option
|
|
695
|
-
};
|
|
696
|
-
});
|
|
697
|
-
});
|
|
698
|
-
const filteredOptions = userFilterOptions(normalizeOptions, inputValue, props.filterOption);
|
|
841
|
+
const {
|
|
842
|
+
normalizeOptions
|
|
843
|
+
} = useSelect(props);
|
|
844
|
+
const searchFn = props.searchFn || ((option, term) => option.label.toLocaleLowerCase().includes(term.trim().toLocaleLowerCase()));
|
|
845
|
+
const {
|
|
846
|
+
filteredOptions
|
|
847
|
+
} = useFilterOptions(props.enableLazyLoad, normalizeOptions, inputValue, searchFn);
|
|
699
848
|
const {
|
|
700
849
|
getOptionValue
|
|
701
850
|
} = useCacheFilteredOptions(filteredOptions);
|
|
702
851
|
const emptyText = computed(() => {
|
|
703
|
-
let text
|
|
704
|
-
if (props.
|
|
705
|
-
text = t("noRelatedRecords");
|
|
706
|
-
} else if (props.filterOption === false && !filteredOptions.value.length) {
|
|
852
|
+
let text;
|
|
853
|
+
if (props.enableLazyLoad) {
|
|
707
854
|
text = t("noData");
|
|
855
|
+
} else {
|
|
856
|
+
text = t("noRelatedRecords");
|
|
708
857
|
}
|
|
709
858
|
return text;
|
|
710
859
|
});
|
|
@@ -719,13 +868,13 @@ var EditableSelect = defineComponent({
|
|
|
719
868
|
};
|
|
720
869
|
const {
|
|
721
870
|
loadMore
|
|
722
|
-
} = useLazyLoad(dropdownRef,
|
|
871
|
+
} = useLazyLoad(dropdownRef, props.enableLazyLoad, ctx2);
|
|
723
872
|
const {
|
|
724
873
|
handleInput
|
|
725
874
|
} = useInput(inputValue, ctx2);
|
|
726
875
|
const handleClick = (option, index2, curSelectedIndex) => {
|
|
727
876
|
const {
|
|
728
|
-
|
|
877
|
+
disabledKey
|
|
729
878
|
} = props;
|
|
730
879
|
if (disabledKey && !!option[disabledKey]) {
|
|
731
880
|
return;
|
|
@@ -737,26 +886,29 @@ var EditableSelect = defineComponent({
|
|
|
737
886
|
ctx2.emit("update:modelValue", value + "");
|
|
738
887
|
closeMenu();
|
|
739
888
|
};
|
|
889
|
+
const handleClear = () => {
|
|
890
|
+
inputValue.value = "";
|
|
891
|
+
};
|
|
740
892
|
const {
|
|
741
893
|
handleKeydown,
|
|
742
894
|
hoverIndex,
|
|
743
895
|
selectedIndex
|
|
744
|
-
} = useKeyboardSelect(dropdownRef, visible, inputValue, cacheInput, filteredOptions, props.
|
|
896
|
+
} = useKeyboardSelect(dropdownRef, visible, inputValue, cacheInput, filteredOptions, props.disabledKey, props.filterOption, loading2, (option, index2) => handleClick(option, index2, selectedIndex), closeMenu, toggleMenu);
|
|
745
897
|
const getItemCls = (option, index2) => {
|
|
746
898
|
const {
|
|
747
|
-
|
|
899
|
+
disabledKey
|
|
748
900
|
} = props;
|
|
749
|
-
return className(
|
|
901
|
+
return className(`devui-dropdown-item`, {
|
|
750
902
|
disabled: disabledKey ? !!option[disabledKey] : false,
|
|
751
903
|
selected: index2 === selectedIndex.value,
|
|
752
|
-
[`${
|
|
904
|
+
[`${ns.em("dropdown", "bg")}`]: index2 === hoverIndex.value
|
|
753
905
|
});
|
|
754
906
|
};
|
|
755
907
|
return () => {
|
|
756
|
-
const selectCls = className(`${ns.b()} devui-form-group devui-has-feedback`, {
|
|
908
|
+
const selectCls = className(`${ns.b()} devui-form-group devui-has-feedback ${inputValue.value && props.allowClear && "allow-clear"}`, {
|
|
757
909
|
[`${ns.m("open")}`]: visible.value === true
|
|
758
910
|
});
|
|
759
|
-
const inputCls = className(
|
|
911
|
+
const inputCls = className(`devui-form-control devui-dropdown-origin`, {
|
|
760
912
|
"devui-dropdown-origin-open": visible.value === true
|
|
761
913
|
});
|
|
762
914
|
return withDirectives(createVNode("div", {
|
|
@@ -777,6 +929,11 @@ var EditableSelect = defineComponent({
|
|
|
777
929
|
}, null), createVNode("span", {
|
|
778
930
|
"class": "devui-form-control-feedback"
|
|
779
931
|
}, [createVNode("span", {
|
|
932
|
+
"class": "devui-select-clear-icon",
|
|
933
|
+
"onClick": handleClear
|
|
934
|
+
}, [createVNode(resolveComponent("d-icon"), {
|
|
935
|
+
"name": "icon-remove"
|
|
936
|
+
}, null)]), createVNode("span", {
|
|
780
937
|
"class": "devui-select-chevron-icon"
|
|
781
938
|
}, [createVNode(resolveComponent("d-icon"), {
|
|
782
939
|
"name": "select-arrow"
|
|
@@ -796,12 +953,12 @@ var EditableSelect = defineComponent({
|
|
|
796
953
|
"style": {
|
|
797
954
|
width: props.width + "px"
|
|
798
955
|
},
|
|
799
|
-
"class": `${
|
|
956
|
+
"class": `${ns.e("menu")}`
|
|
800
957
|
}, [withDirectives(createVNode("div", {
|
|
801
|
-
"class":
|
|
958
|
+
"class": `devui-dropdown-menu`
|
|
802
959
|
}, [createVNode("ul", {
|
|
803
960
|
"ref": dropdownRef,
|
|
804
|
-
"class": `${
|
|
961
|
+
"class": `${ns.em("list", "unstyled")} devui-scrollbar scroll-height`,
|
|
805
962
|
"style": {
|
|
806
963
|
maxHeight: props.maxHeight + "px"
|
|
807
964
|
},
|
|
@@ -814,11 +971,9 @@ var EditableSelect = defineComponent({
|
|
|
814
971
|
handleClick(option, index2, selectedIndex);
|
|
815
972
|
}
|
|
816
973
|
}, [ctx2.slots.item ? ctx2.slots.item(option) : option.label]);
|
|
817
|
-
}), withDirectives(createVNode("
|
|
818
|
-
"class":
|
|
819
|
-
}, [
|
|
820
|
-
"class": `${dropdownNS.em("empty", "tip")}`
|
|
821
|
-
}, [ctx2.slots.noResultItem ? ctx2.slots.noResultItem() : emptyText.value])]), [[vShow, !filteredOptions.value.length]])])]), [[resolveDirective("dLoading"), props.loading], [vShow, visible.value]])])]
|
|
974
|
+
}), withDirectives(createVNode("div", {
|
|
975
|
+
"class": "devui-no-data-tip"
|
|
976
|
+
}, [ctx2.slots.noResultItem ? ctx2.slots.noResultItem(inputValue.value) : emptyText.value]), [[vShow, !filteredOptions.value.length]])])]), [[vShow, visible.value], [resolveDirective("d-loading"), props.loading]])])]
|
|
822
977
|
})]
|
|
823
978
|
})]
|
|
824
979
|
})]), [[resolveDirective("click-outside"), closeMenu]]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Ae=Object.defineProperty;var le=Object.getOwnPropertySymbols;var ke=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;var _=(d,t,f)=>t in d?Ae(d,t,{enumerable:!0,configurable:!0,writable:!0,value:f}):d[t]=f,T=(d,t)=>{for(var f in t||(t={}))ke.call(t,f)&&_(d,f,t[f]);if(le)for(var f of le(t))De.call(t,f)&&_(d,f,t[f]);return d};var V=(d,t,f)=>(_(d,typeof t!="symbol"?t+"":t,f),f);(function(d,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],t):(d=typeof globalThis!="undefined"?globalThis:d||self,t(d.index={},d.Vue,d.dom))})(this,function(d,t,f){"use strict";const U={options:{type:Array,default:()=>[]},disabled:{type:Boolean},loading:{type:Boolean},optionDisabledKey:{type:String,default:""},placeholder:{type:String,default:"Search"},modelValue:{type:String,default:""},width:{type:Number},maxHeight:{type:Number},filterOption:{type:[Function,Boolean]}},ae=typeof window!="undefined";function Y(e,n,o){document.addEventListener?e&&n&&o&&e.addEventListener(n,o,!1):e&&n&&o&&e.attachEvent("on"+n,o)}const x=Symbol("@@clickoutside"),M=new Map;let q,R=0,X=!0;function W(e,n,o){return ae&&X&&(X=!1,Y(document,"mousedown",a=>{q=a}),Y(document,"mouseup",a=>{for(const[l,s]of M)s[x].documentHandler(a,q)})),function(a,l){!o||!n.instance||!a.target||!l.target||e.contains(a.target)||e.contains(l.target)||e===a.target||e[x].bindingFn&&e[x].bindingFn()}}const se={beforeMount:function(e,n,o){R++,M.set(R,e),e[x]={nid:R,documentHandler:W(e,n,o),bindingFn:n.value}},updated:function(e,n,o){e[x].documentHandler=W(e,n,o),e[x].bindingFn=n.value},unmounted:function(e){M.delete(e[x].nid),delete e[x]}};class G{constructor(){V(this,"top","50%");V(this,"left","50%")}}const re={message:String,backdrop:Boolean,view:{type:Object,default:()=>new G},zIndex:Number,isFull:{type:Boolean,default:!1}};class ie{constructor(){V(this,"target");V(this,"message");V(this,"loadingTemplateRef");V(this,"backdrop",!0);V(this,"positionType","relative");V(this,"view",new G);V(this,"zIndex")}}function F(e,n,o){let a=e;return n&&(a+=`__${n}`),o&&(a+=`--${o}`),a}function $(e,n=!1){const o=n?`.devui-${e}`:`devui-${e}`;return{b:()=>F(o),e:c=>c?F(o,c):"",m:c=>c?F(o,"",c):"",em:(c,p)=>c&&p?F(o,c,p):""}}var Te="",ce=t.defineComponent({name:"DLoading",inheritAttrs:!1,props:re,setup(e){const n={top:e.view.top,left:e.view.left,zIndex:e.zIndex};e.message||(n.background="none");const o=t.ref(!1);return{style:n,isShow:o,open:()=>{o.value=!0},close:()=>{o.value=!1}}},render(){var c;const{isShow:e,isFull:n,backdrop:o,style:a,message:l,$slots:s}=this,r=$("loading");return e&&t.createVNode("div",{class:[r.b(),n?r.m("full"):""]},[((c=s.default)==null?void 0:c.call(s))||t.createVNode("div",{class:r.e("wrapper")},[o?t.createVNode("div",{class:r.e("mask")},null):null,t.createVNode("div",{style:a,class:r.e("area")},[t.createVNode("div",{class:r.e("busy-default-spinner")},[t.createVNode("div",{class:r.e("bar1")},null),t.createVNode("div",{class:r.e("bar2")},null),t.createVNode("div",{class:r.e("bar3")},null),t.createVNode("div",{class:r.e("bar4")},null)]),l?t.createVNode("span",{class:r.e("text")},[l]):null])])])}});const J=Symbol("dev_component_container");function de(e,n,o=null){const a=t.h(e,T({},n),o),l=document.createElement("div");return a[J]=l,t.render(a,l),a.component}function ue(e){t.render(null,e==null?void 0:e.vnode[J])}const fe=t.defineComponent(ce),A=new WeakSet,B=e=>{if(!e)return!0;if(Array.isArray(e))return e.length===0;if(e instanceof Set||e instanceof Map)return e.size===0;if(e instanceof Promise)return!1;if(typeof e=="object")try{return Object.keys(e).length===0}catch{return!1}return!1},Q=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),me=e=>{switch(Q(e)){case"promise":return[e];case"array":return e.some(o=>Q(o)!=="promise")?(console.error(new TypeError("Binding values should all be of type Promise")),"error"):e;default:return!1}},Z=e=>{A.delete(e),e.instance.proxy.close(),ue(e.instance)},ee=(e,n)=>{var o,a,l;if(n.value){const s=me(n.value);if(s==="error")return;(l=(a=(o=e==null?void 0:e.instance)==null?void 0:o.proxy)==null?void 0:a.open)==null||l.call(a),e.appendChild(e.mask),A.add(e),s&&Promise.all(s).catch(r=>{console.error(new Error("Promise handling errors"),r)}).finally(()=>{Z(e)})}else Z(e)},te=e=>{e.removeAttribute("zindex"),e.removeAttribute("positiontype"),e.removeAttribute("backdrop"),e.removeAttribute("message"),e.removeAttribute("view"),e.removeAttribute("loadingtemplateref")},ne=(e,n)=>{var s;const o=T(T({},new ie),n),a=o.loadingTemplateRef,l=de(fe,T({},o),a?()=>a:null);e.style.position=o.positionType,e.options=o,e.instance=l,e.mask=(s=l==null?void 0:l.proxy)==null?void 0:s.$el},we={mounted:function(e,n,o){ne(e,o.props),te(e),!B(n.value)&&ee(e,n)},updated:function(e,n,o){!B(n.value)&&A.has(e)||B(n.value)&&!A.has(e)||(!A.has(e)&&ne(e,o.props),te(e),ee(e,n))}};function j(e,n){let o=e;return typeof n=="object"&&Object.keys(n).forEach(a=>{n[a]&&(o+=` ${a}`)}),o}var Fe="";const pe=()=>(e,n)=>n.label.toLocaleLowerCase().indexOf(e.toLocaleLowerCase())>-1,ge=(e,n,o)=>t.computed(()=>{const a=[];if(!n.value||o===!1)return e.value;const l=typeof o=="function"?o:pe();return e.value.forEach(s=>{l(n.value,s)&&a.push(s)}),a}),ye=(e,n)=>{const o=l=>{n.emit("search",l)};return{handleInput:l=>{const s=l.target.value;e.value=s,o(s)}}},he=(e,n,o,a)=>({loadMore:()=>{const s=e.value;o===!1&&s.clientHeight+s.scrollTop>=s.scrollHeight&&a.emit("loadMore",n.value)}}),be=(e,n,o,a,l,s,r,c,p,u,g)=>{const y=t.ref(0),E=t.ref(0),N=w=>{y.value=w},b=w=>{const h=e.value,m=h.children[w];t.nextTick(()=>{if(m.scrollIntoViewIfNeeded)m.scrollIntoViewIfNeeded(!1);else{const k=h.getBoundingClientRect(),P=m.getBoundingClientRect();(P.bottom>k.bottom||P.top<k.top)&&m.scrollIntoView(!1)}})},C=()=>{o.value=a.value,u()},L=()=>{const w=l.value.length;return!n.value||!w?g():(w&&w===1?p(l.value[0],1):p(l.value[y.value],y.value),u())},O=w=>{const h=l.value.length;if(!h||h===1||!["ArrowDown","ArrowUp"].includes(w)||r===!1&&c.value)return;let m=0;if(m=y.value,w==="ArrowUp"?(m-=1,m===-1&&(m=h-1)):w==="ArrowDown"&&(m+=1,m===h&&(m=0)),y.value=m,l.value[m][s])return O(w);N(m),b(m)};return{handleKeydown:w=>{const h=w.key||w.code;switch(h){case"Escape":C();break;case"Enter":L();break;default:O(h)}},hoverIndex:y,selectedIndex:E}},ve={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},shiftOffset:{type:Number},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0}};function Ve(e){const n=/(auto|scroll|hidden)/;for(let o=e;o=o.parentElement;o.parentElement!==document.body){const a=window.getComputedStyle(o);if(n.test(a.overflow+a.overflowX+a.overflowY))return o}return window}function Ee(e,n,o,a){let{x:l,y:s}=n;if(!e){const{width:r,height:c}=a;l&&o.includes("start")&&(l=12),l&&o.includes("end")&&(l=Math.round(r-24)),s&&o.includes("start")&&(s=10),s&&o.includes("end")&&(s=c-14)}return{x:l,y:s}}function xe(e,n){const o=t.ref(),a=t.ref();let l=null;const s=(c,p,u,g)=>{const{x:y,y:E}=Ee(e.isArrowCenter,u,p,g.getBoundingClientRect()),N={top:"bottom",right:"left",bottom:"top",left:"right"}[p.split("-")[0]];Object.assign(c.style,{left:y?`${y}px`:"",top:E?`${E}px`:"",right:"",bottom:"",[N]:"-4px"})},r=async()=>{const c=e.origin,p=t.unref(o.value),u=t.unref(a.value),g=[f.offset(e.offset),f.autoPlacement({alignment:e.align,allowedPlacements:e.position})];e.showArrow&&g.push(f.arrow({element:u})),e.shiftOffset!==void 0&&g.push(f.shift());const{x:y,y:E,placement:N,middlewareData:b}=await f.computePosition(c,p,{strategy:"fixed",middleware:g});let C=y,L=E;if(e.shiftOffset!==void 0){const{x:O,y:I}=b.shift;O<0&&(C-=e.shiftOffset),O>0&&(C+=e.shiftOffset),I<0&&(L-=e.shiftOffset),I>0&&(L+=e.shiftOffset)}n("positionChange",N),Object.assign(p.style,{top:`${L}px`,left:`${C}px`}),e.showArrow&&s(u,N,b.arrow,p)};return t.watch(()=>e.modelValue,()=>{e.modelValue&&e.origin?(l=Ve(e.origin),t.nextTick(r),l==null||l.addEventListener("scroll",r),l!==window&&window.addEventListener("scroll",r),window.addEventListener("resize",r)):(l==null||l.removeEventListener("scroll",r),l!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r))}),t.onUnmounted(()=>{l==null||l.removeEventListener("scroll",r),l!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}),{arrowRef:a,overlayRef:o,updatePosition:r}}var $e="";const Ne=t.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:ve,emits:["update:modelValue","positionChange"],setup(e,{slots:n,attrs:o,emit:a,expose:l}){const s=$("flexible-overlay"),{arrowRef:r,overlayRef:c,updatePosition:p}=xe(e,a);return l({updatePosition:p}),()=>{var u;return e.modelValue&&t.createVNode("div",t.mergeProps({ref:c,class:s.b()},o),[(u=n.default)==null?void 0:u.call(n),e.showArrow&&t.createVNode("div",{ref:r,class:s.e("arrow")},null)])}}}),Oe=e=>{const n=t.computed(()=>{const a=new Map;return e.value.forEach(l=>{a.set(l,l.value)}),a});return{getOptionValue:a=>n.value.get(a)}},Se=e=>e.substring(1).replace(/^\S/,n=>n.toLocaleLowerCase());function oe(e,n){const o=n.split(".");let a=e;return o.forEach(l=>{var s;a=(s=a[l])!=null?s:""}),a}function Ce(e,n,o){const a=o||Se(e)+".";return l=>{const s=n==null?void 0:n.appContext.config.globalProperties.langMessages.value;return oe(s,a+l)||oe(s,l)}}var K=t.defineComponent({name:"DEditableSelect",directives:{clickOutside:se,dLoading:we},props:U,emits:["update:modelValue","search","loadMore"],setup(e,n){const o=t.getCurrentInstance(),a=Ce("DEditableSelect",o),l=$("editable-select"),s=$("editable-select-dropdown"),r=t.ref(),c=t.ref(),p=t.ref(["bottom"]),u=t.ref(!1),g=t.ref(e.modelValue),y=t.ref(),E=t.ref(e.loading),N=t.computed(()=>e.options.map(i=>typeof i=="object"?Object.assign({},i,{label:i.label?i.label:i.value,value:i.value}):{label:i+"",value:i})),b=ge(N,g,e.filterOption),{getOptionValue:C}=Oe(b),L=t.computed(()=>{let i="";return e.filterOption!==!1&&!b.value.length?i=a("noRelatedRecords"):e.filterOption===!1&&!b.value.length&&(i=a("noData")),i});t.watch(()=>e.loading,i=>{E.value=i});const O=()=>{u.value=!u.value},I=()=>{u.value=!1},{loadMore:w}=he(r,g,e.filterOption,n),{handleInput:h}=ye(g,n),m=(i,S,v)=>{const{optionDisabledKey:D}=e;if(D&&!!i[D])return;g.value=i.label,y.value=i.label,v.value=S;const H=C(i);n.emit("update:modelValue",H+""),I()},{handleKeydown:k,hoverIndex:P,selectedIndex:z}=be(r,u,g,y,b,e.optionDisabledKey,e.filterOption,E,(i,S)=>m(i,S,z),I,O),Ie=(i,S)=>{const{optionDisabledKey:v}=e;return j(`${s.e("item")}`,{disabled:v?!!i[v]:!1,selected:S===z.value,[`${s.m("bg")}`]:S===P.value})};return()=>{const i=j(`${l.b()} devui-form-group devui-has-feedback`,{[`${l.m("open")}`]:u.value===!0}),S=j(`${l.e("input")} devui-dropdown-origin devui-form-control`,{"devui-dropdown-origin-open":u.value===!0});return t.withDirectives(t.createVNode("div",{class:i,ref:c,style:{width:e.width+"px"}},[t.createVNode("input",{class:S,onClick:t.withModifiers(O,["self"]),onInput:h,onKeydown:k,value:g.value,disabled:e.disabled,placeholder:e.placeholder,type:"text"},null),t.createVNode("span",{class:"devui-form-control-feedback"},[t.createVNode("span",{class:"devui-select-chevron-icon"},[t.createVNode(t.resolveComponent("d-icon"),{name:"select-arrow"},null)])]),t.createVNode(t.Teleport,{to:"body"},{default:()=>[t.createVNode(t.Transition,{name:"fade"},{default:()=>[t.createVNode(Ne,{origin:c.value,modelValue:u.value,"onUpdate:modelValue":v=>u.value=v,position:p.value},{default:()=>[t.createVNode("div",{style:{width:e.width+"px"},class:`${s.b()}`},[t.withDirectives(t.createVNode("div",{class:`${s.e("wrap")}`},[t.createVNode("ul",{ref:r,class:`${s.e("list")}`,style:{maxHeight:e.maxHeight+"px"},onScroll:w},[b.value.map((v,D)=>t.createVNode("li",{class:Ie(v,D),onClick:H=>{H.stopPropagation(),m(v,D,z)}},[n.slots.item?n.slots.item(v):v.label])),t.withDirectives(t.createVNode("li",{class:`${s.e("empty")}`},[t.createVNode("div",{class:`${s.em("empty","tip")}`},[n.slots.noResultItem?n.slots.noResultItem():L.value])]),[[t.vShow,!b.value.length]])])]),[[t.resolveDirective("dLoading"),e.loading],[t.vShow,u.value]])])]})]})]})]),[[t.resolveDirective("click-outside"),I]])}}}),Le={title:"EditableSelect \u53EF\u8F93\u5165\u4E0B\u62C9\u9009\u62E9\u6846",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(e){e.component(K.name,K)}};d.EditableSelect=K,d.default=Le,d.editableSelectProps=U,Object.defineProperty(d,"__esModule",{value:!0}),d[Symbol.toStringTag]="Module"});
|
|
1
|
+
(function(w,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],o):(w=typeof globalThis!="undefined"?globalThis:w||self,o(w.index={},w.Vue,w.dom))})(this,function(w,o,V){"use strict";const _={modelValue:{type:String,default:""},options:{type:Array,default:()=>[]},allowClear:{type:Boolean,default:!1},disabled:{type:Boolean},disabledKey:{type:String,default:""},placeholder:{type:String,default:"Search"},width:{type:Number},maxHeight:{type:Number},loading:{type:Boolean},enableLazyLoad:{type:Boolean,default:!1},searchFn:{type:Function},filterOption:{type:[Function,Boolean]}},ue=typeof window!="undefined";function U(e,n,t){document.addEventListener?e&&n&&t&&e.addEventListener(n,t,!1):e&&n&&t&&e.attachEvent("on"+n,t)}const b=Symbol("@@clickoutside"),T=new Map;let Y,M=0,q=!0;function X(e,n,t){return ue&&q&&(q=!1,U(document,"mousedown",a=>{Y=a}),U(document,"mouseup",a=>{for(const[u,l]of T)l[b].documentHandler(a,Y)})),function(a,u){!t||!n.instance||!a.target||!u.target||e.contains(a.target)||e.contains(u.target)||e===a.target||e[b].bindingFn&&e[b].bindingFn()}}const ae={beforeMount:function(e,n,t){M++,T.set(M,e),e[b]={nid:M,documentHandler:X(e,n,t),bindingFn:n.value}},updated:function(e,n,t){e[b].documentHandler=X(e,n,t),e[b].bindingFn=n.value},unmounted:function(e){T.delete(e[b].nid),delete e[b]}};class W{constructor(){this.top="50%",this.left="50%"}}const le={message:String,backdrop:Boolean,view:{type:Object,default:()=>new W},zIndex:Number,isFull:{type:Boolean,default:!1}};class re{constructor(){this.backdrop=!0,this.positionType="relative",this.view=new W}}function O(e,n,t){let a=e;return n&&(a+=`__${n}`),t&&(a+=`--${t}`),a}function P(e,n=!1){const t=n?`.devui-${e}`:`devui-${e}`;return{b:()=>O(t),e:s=>s?O(t,s):"",m:s=>s?O(t,"",s):"",em:(s,i)=>s&&i?O(t,s,i):""}}var Oe="",se=o.defineComponent({name:"DLoading",inheritAttrs:!1,props:le,setup(e){const n={top:e.view.top,left:e.view.left,zIndex:e.zIndex};e.message||(n.background="none");const t=o.ref(!1);return{style:n,isShow:t,open:()=>{t.value=!0},close:()=>{t.value=!1}}},render(){var s;const{isShow:e,isFull:n,backdrop:t,style:a,message:u,$slots:l}=this,r=P("loading");return e&&o.createVNode("div",{class:[r.b(),n?r.m("full"):""]},[((s=l.default)==null?void 0:s.call(l))||o.createVNode("div",{class:r.e("wrapper")},[t?o.createVNode("div",{class:r.e("mask")},null):null,o.createVNode("div",{style:a,class:r.e("area")},[o.createVNode("div",{class:r.e("busy-default-spinner")},[o.createVNode("div",{class:r.e("bar1")},null),o.createVNode("div",{class:r.e("bar2")},null),o.createVNode("div",{class:r.e("bar3")},null),o.createVNode("div",{class:r.e("bar4")},null)]),u?o.createVNode("span",{class:r.e("text")},[u]):null])])])}});const G=Symbol("dev_component_container");function ie(e,n,t=null){const a=o.h(e,{...n},t),u=document.createElement("div");return a[G]=u,o.render(a,u),a.component}function ce(e){o.render(null,e==null?void 0:e.vnode[G])}const de=o.defineComponent(se),N=new WeakSet,$=e=>{if(!e)return!0;if(Array.isArray(e))return e.length===0;if(e instanceof Set||e instanceof Map)return e.size===0;if(e instanceof Promise)return!1;if(typeof e=="object")try{return Object.keys(e).length===0}catch{return!1}return!1},J=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),fe=e=>{switch(J(e)){case"promise":return[e];case"array":return e.some(t=>J(t)!=="promise")?(console.error(new TypeError("Binding values should all be of type Promise")),"error"):e;default:return!1}},Q=e=>{N.delete(e),e.instance.proxy.close(),ce(e.instance)},Z=(e,n)=>{var t,a,u;if(n.value){const l=fe(n.value);if(l==="error")return;(u=(a=(t=e==null?void 0:e.instance)==null?void 0:t.proxy)==null?void 0:a.open)==null||u.call(a),e.appendChild(e.mask),N.add(e),l&&Promise.all(l).catch(r=>{console.error(new Error("Promise handling errors"),r)}).finally(()=>{Q(e)})}else Q(e)},ee=e=>{e.removeAttribute("zindex"),e.removeAttribute("positiontype"),e.removeAttribute("backdrop"),e.removeAttribute("message"),e.removeAttribute("view"),e.removeAttribute("loadingtemplateref")},te=(e,n)=>{var l;const t={...new re,...n},a=t.loadingTemplateRef,u=ie(de,{...t},a?()=>a:null);e.style.position=t.positionType,e.options=t,e.instance=u,e.mask=(l=u==null?void 0:u.proxy)==null?void 0:l.$el},me={mounted:function(e,n,t){te(e,t.props),ee(e),!$(n.value)&&Z(e,n)},updated:function(e,n,t){!$(n.value)&&N.has(e)||$(n.value)&&!N.has(e)||(!N.has(e)&&te(e,t.props),ee(e),Z(e,n))}};function z(e,n){let t=e;return typeof n=="object"&&Object.keys(n).forEach(a=>{n[a]&&(t+=` ${a}`)}),t}var ke="";function he(e){return{normalizeOptions:o.computed(()=>e.options.map(t=>{let a;return t!=="null"&&typeof t=="object"?a={...t,label:t.label||"",value:t.value!==void 0?t.value:t.label||""}:a={label:String(t),value:t},a}))}}function pe(e,n,t,a){return{filteredOptions:o.computed(()=>!t.value||e?n.value:n.value.filter(l=>a(l,t.value)))}}function ge(e,n){const t=u=>{n.emit("search",u)};return{handleInput:u=>{const l=u.target.value;e.value=l,t(l)}}}function we(e,n,t){return{loadMore:()=>{const u=e.value;!n||u.clientHeight+u.scrollTop>=u.scrollHeight&&t.emit("loadMore")}}}function Ee(e,n,t,a,u,l,r,s,i,c,E){const h=o.ref(0),v=o.ref(0),A=m=>{h.value=m},F=m=>{const p=e.value,d=p.children[m];o.nextTick(()=>{if(d.scrollIntoViewIfNeeded)d.scrollIntoViewIfNeeded(!1);else{const S=p.getBoundingClientRect(),I=d.getBoundingClientRect();(I.bottom>S.bottom||I.top<S.top)&&d.scrollIntoView(!1)}})},B=()=>{t.value=a.value,c()},D=()=>{const m=u.value.length;return!n.value||!m?E():(m&&m===1?i(u.value[0],1):i(u.value[h.value],h.value),c())},C=m=>{const p=u.value.length;if(!p||p===1||!["ArrowDown","ArrowUp"].includes(m)||r===!1&&s.value)return;let d=0;if(d=h.value,m==="ArrowUp"?(d-=1,d===-1&&(d=p-1)):m==="ArrowDown"&&(d+=1,d===p&&(d=0)),h.value=d,u.value[d][l])return C(m);A(d),F(d)};return{handleKeydown:m=>{const p=m.key||m.code;switch(p){case"Escape":B();break;case"Enter":D();break;default:C(p)}},hoverIndex:h,selectedIndex:v}}const ye={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},shiftOffset:{type:Number},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0}};function Fe(e){const n=/(auto|scroll|hidden)/;for(let t=e;t=t.parentElement;t.parentElement!==document.body){const a=window.getComputedStyle(t);if(n.test(a.overflow+a.overflowX+a.overflowY))return t}return window}function be(e,n,t,a){let{x:u,y:l}=n;if(!e){const{width:r,height:s}=a;u&&t.includes("start")&&(u=12),u&&t.includes("end")&&(u=Math.round(r-24)),l&&t.includes("start")&&(l=10),l&&t.includes("end")&&(l=s-14)}return{x:u,y:l}}function ve(e,n){const t=o.ref(),a=o.ref();let u=null;const l=(s,i,c,E)=>{const{x:h,y:v}=be(e.isArrowCenter,c,i,E.getBoundingClientRect()),A={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(s.style,{left:h?`${h}px`:"",top:v?`${v}px`:"",right:"",bottom:"",[A]:"-4px"})},r=async()=>{const s=e.origin,i=o.unref(t.value),c=o.unref(a.value),E=[V.offset(e.offset),V.autoPlacement({alignment:e.align,allowedPlacements:e.position})];e.showArrow&&E.push(V.arrow({element:c})),e.shiftOffset!==void 0&&E.push(V.shift());const{x:h,y:v,placement:A,middlewareData:F}=await V.computePosition(s,i,{strategy:"fixed",middleware:E});let B=h,D=v;if(e.shiftOffset!==void 0){const{x:C,y:x}=F.shift;C<0&&(B-=e.shiftOffset),C>0&&(B+=e.shiftOffset),x<0&&(D-=e.shiftOffset),x>0&&(D+=e.shiftOffset)}n("positionChange",A),Object.assign(i.style,{top:`${D}px`,left:`${B}px`}),e.showArrow&&l(c,A,F.arrow,i)};return o.watch(()=>e.modelValue,()=>{e.modelValue&&e.origin?(u=Fe(e.origin),o.nextTick(r),u==null||u.addEventListener("scroll",r),u!==window&&window.addEventListener("scroll",r),window.addEventListener("resize",r)):(u==null||u.removeEventListener("scroll",r),u!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r))}),o.onUnmounted(()=>{u==null||u.removeEventListener("scroll",r),u!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}),{arrowRef:a,overlayRef:t,updatePosition:r}}var Ie="";const Ae=o.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:ye,emits:["update:modelValue","positionChange"],setup(e,{slots:n,attrs:t,emit:a,expose:u}){const l=P("flexible-overlay"),{arrowRef:r,overlayRef:s,updatePosition:i}=ve(e,a);return u({updatePosition:i}),()=>{var c;return e.modelValue&&o.createVNode("div",o.mergeProps({ref:s,class:l.b()},t),[(c=n.default)==null?void 0:c.call(n),e.showArrow&&o.createVNode("div",{ref:r,class:l.e("arrow")},null)])}}});function Ce(e){const n=o.computed(()=>{const a=new Map;return e.value.forEach(u=>{a.set(u,u.value)}),a});return{getOptionValue:a=>n.value.get(a)}}function ne(...e){const n=t=>t&&typeof t=="object";return e.reduce((t,a)=>(Object.keys(a).forEach(u=>{const l=t[u],r=a[u];Array.isArray(l)&&Array.isArray(r)?t[u]=Array.from(new Set([...r,...l])):n(l)&&n(r)?t[u]=ne(l,r):t[u]=r}),t),{})}var Be={pagination:{totalItemText:"\u6240\u6709\u6761\u76EE",goToText:"\u8DF3\u81F3"},accordion:{loading:"\u52A0\u8F7D\u4E2D",noData:"\u6CA1\u6709\u6570\u636E"},autoCompleteDropdown:{latestInput:"\u6700\u8FD1\u8F93\u5165"},cascaderList:{noData:"\u6CA1\u6709\u6570\u636E"},colorPicker:{foundationPanel:"\u57FA\u7840\u9762\u677F",advancedPanel:"\u9AD8\u7EA7\u9762\u677F"},datePickerPro:{ok:"\u786E\u5B9A",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",month1:"1\u6708",month2:"2\u6708",month3:"3\u6708",month4:"4\u6708",month5:"5\u6708",month6:"6\u6708",month7:"7\u6708",month8:"8\u6708",month9:"9\u6708",month10:"10\u6708",month11:"11\u6708",month12:"12\u6708",year:"\u5E74",startPlaceholder:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",endPlaceholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",getWeekDays(){return["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},getTimeArr(){return["\u65F6","\u5206","\u79D2"]},getYearMonthStr(e,n){return`${e}\u5E74${n}\u6708`}},editableSelect:{noRelatedRecords:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",noData:"\u6CA1\u6709\u6570\u636E"},input:{placeholder:"\u8BF7\u8F93\u5165"},splitterBar:{collapse:"\u6536\u8D77",expand:"\u5C55\u5F00"},stepsGuide:{previous:"\u4E0A\u4E00\u6B65",continue:"\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",ok:"\u6211\u77E5\u9053\u5566"},table:{selectAll:"\u5168\u9009",ok:"\u786E\u5B9A"},timePopup:{ok:"\u786E\u5B9A"},transfer:{unit:"\u9879",panelUnit:"\u9879",headerUnit:"\u9879",noData:"\u6682\u65E0\u6570\u636E",placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"},tree:{loading:"\u52A0\u8F7D\u4E2D",newNode:"\u65B0\u8282\u70B9",selectPlaceholder:"\u8BF7\u9009\u62E9"},upload:{placeholder:"\u9009\u62E9\u6587\u4EF6",getExistSameNameFilesMsg(e){return`\u60A8\u4E0A\u4F20\u7684 "${e}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`},getAllFilesBeyondMaximalFileSizeMsg(e){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${e}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getBeyondMaximalFileSizeMsg(e,n){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${n}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${e}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getNotAllowedFileTypeMsg(e,n){return`\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${n}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${e}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`}},search:{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57"},select:{placeholder:"\u8BF7\u9009\u62E9",noDataText:"\u65E0\u6570\u636E",noMatchText:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",loadingText:"\u52A0\u8F7D\u4E2D..."},tagInput:{maxTagsText:"\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"},timeSelect:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4"}};const k=o.ref("zh-CN");let R=o.reactive({[k.value]:Be});const De={messages(){return R[k.value]},lang(){return k.value},use(e,n){k.value=e,this.add({[e]:n})},add(e={}){R=ne(R,e)}},xe=e=>e.substring(1).replace(/^\S/,n=>n.toLocaleLowerCase());function oe(e,n){const t=n.split(".");let a=e;return t.forEach(u=>{var l;a=(l=a[u])!=null?l:""}),a}function Ve(e,n,t){const a=t||xe(e)+".";return u=>{var s;const l=((s=n==null?void 0:n.appContext.config.globalProperties.langMessages)==null?void 0:s.value)||De.messages();return oe(l,a+u)||oe(l,u)}}var j=o.defineComponent({name:"DEditableSelect",directives:{clickOutside:ae,dLoading:me},props:_,emits:["update:modelValue","search","loadMore"],setup(e,n){const t=o.getCurrentInstance(),a=Ve("DEditableSelect",t),u=P("editable-select"),l=o.ref(),r=o.ref(),s=o.ref(["bottom"]),i=o.ref(!1),c=o.ref(e.modelValue),E=o.ref(),h=o.ref(e.loading),{normalizeOptions:v}=he(e),A=e.searchFn||((f,y)=>f.label.toLocaleLowerCase().includes(y.trim().toLocaleLowerCase())),{filteredOptions:F}=pe(e.enableLazyLoad,v,c,A),{getOptionValue:B}=Ce(F),D=o.computed(()=>{let f;return e.enableLazyLoad?f=a("noData"):f=a("noRelatedRecords"),f});o.watch(()=>e.loading,f=>{h.value=f});const C=()=>{i.value=!i.value},x=()=>{i.value=!1},{loadMore:m}=we(l,e.enableLazyLoad,n),{handleInput:p}=ge(c,n),d=(f,y,g)=>{const{disabledKey:L}=e;if(L&&!!f[L])return;c.value=f.label,E.value=f.label,g.value=y;const K=B(f);n.emit("update:modelValue",K+""),x()},S=()=>{c.value=""},{handleKeydown:I,hoverIndex:Se,selectedIndex:H}=Ee(l,i,c,E,F,e.disabledKey,e.filterOption,h,(f,y)=>d(f,y,H),x,C),Le=(f,y)=>{const{disabledKey:g}=e;return z("devui-dropdown-item",{disabled:g?!!f[g]:!1,selected:y===H.value,[`${u.em("dropdown","bg")}`]:y===Se.value})};return()=>{const f=z(`${u.b()} devui-form-group devui-has-feedback ${c.value&&e.allowClear&&"allow-clear"}`,{[`${u.m("open")}`]:i.value===!0}),y=z("devui-form-control devui-dropdown-origin",{"devui-dropdown-origin-open":i.value===!0});return o.withDirectives(o.createVNode("div",{class:f,ref:r,style:{width:e.width+"px"}},[o.createVNode("input",{class:y,onClick:o.withModifiers(C,["self"]),onInput:p,onKeydown:I,value:c.value,disabled:e.disabled,placeholder:e.placeholder,type:"text"},null),o.createVNode("span",{class:"devui-form-control-feedback"},[o.createVNode("span",{class:"devui-select-clear-icon",onClick:S},[o.createVNode(o.resolveComponent("d-icon"),{name:"icon-remove"},null)]),o.createVNode("span",{class:"devui-select-chevron-icon"},[o.createVNode(o.resolveComponent("d-icon"),{name:"select-arrow"},null)])]),o.createVNode(o.Teleport,{to:"body"},{default:()=>[o.createVNode(o.Transition,{name:"fade"},{default:()=>[o.createVNode(Ae,{origin:r.value,modelValue:i.value,"onUpdate:modelValue":g=>i.value=g,position:s.value},{default:()=>[o.createVNode("div",{style:{width:e.width+"px"},class:`${u.e("menu")}`},[o.withDirectives(o.createVNode("div",{class:"devui-dropdown-menu"},[o.createVNode("ul",{ref:l,class:`${u.em("list","unstyled")} devui-scrollbar scroll-height`,style:{maxHeight:e.maxHeight+"px"},onScroll:m},[F.value.map((g,L)=>o.createVNode("li",{class:Le(g,L),onClick:K=>{K.stopPropagation(),d(g,L,H)}},[n.slots.item?n.slots.item(g):g.label])),o.withDirectives(o.createVNode("div",{class:"devui-no-data-tip"},[n.slots.noResultItem?n.slots.noResultItem(c.value):D.value]),[[o.vShow,!F.value.length]])])]),[[o.vShow,i.value],[o.resolveDirective("d-loading"),e.loading]])])]})]})]})]),[[o.resolveDirective("click-outside"),x]])}}}),Ne={title:"EditableSelect \u53EF\u8F93\u5165\u4E0B\u62C9\u9009\u62E9\u6846",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(e){e.component(j.name,j)}};w.EditableSelect=j,w.default=Ne,w.editableSelectProps=_,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #d7d8da);opacity:.3}.devui-loading__wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:9999}.devui-loading--hidden{overflow:hidden}.devui-loading__text{margin-left:10px}.devui-loading__area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-loading__busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-loading__busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-loading__busy-default-spinner .devui-loading__bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-loading__busy-default-spinner .devui-loading__bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}
|
|
1
|
+
@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #d7d8da);opacity:.3}.devui-loading__wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:9999}.devui-loading--hidden{overflow:hidden}.devui-loading__text{margin-left:10px}.devui-loading__area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-loading__busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-loading__busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-loading__busy-default-spinner .devui-loading__bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-loading__busy-default-spinner .devui-loading__bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-editable-select.devui-form-group.devui-has-feedback>.devui-form-control-feedback{height:100%;display:inline-flex;align-items:center;justify-content:center;padding:0;font-size:var(--devui-font-size, 14px);z-index:10;line-height:0}.devui-editable-select.devui-form-group.devui-has-feedback>.devui-form-control-feedback>span{align-items:center}.devui-editable-select.devui-form-group.devui-has-feedback>.devui-form-control-feedback>span>svg{width:1em;height:1em}.devui-editable-select.devui-form-group.devui-has-feedback .devui-select-clear-icon{pointer-events:auto;display:none;cursor:pointer}.devui-editable-select.devui-form-group.devui-has-feedback .devui-select-clear-icon path{fill:var(--devui-shape-icon-fill, #d7d8da);transition:all var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)) var(--devui-animation-duration-slow, .3s)}.devui-editable-select.devui-form-group.devui-has-feedback .devui-select-clear-icon:hover path{fill:var(--devui-shape-icon-fill-hover, #babbc0)}.devui-editable-select.devui-form-group.devui-has-feedback .devui-select-chevron-icon{display:flex;transition:transform var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-editable-select.devui-form-group.devui-has-feedback .devui-select-chevron-icon svg path{fill:var(--devui-text-weak, #575d6c)}.devui-editable-select.allow-clear:hover .devui-select-chevron-icon{display:none}.devui-editable-select.allow-clear:hover .devui-select-clear-icon{display:flex}.devui-editable-select.devui-editable-select--open .devui-select-chevron-icon{transform:rotate(180deg)}.devui-editable-select .devui-form-control{outline:none;padding-right:24px}.devui-editable-select input::-ms-clear{display:none}.devui-editable-select__menu .devui-dropdown-menu{width:100%;display:block;top:auto!important;left:auto!important;box-shadow:none}.devui-editable-select__menu .devui-dropdown-menu .devui-scrollbar{overflow-y:overlay}.devui-editable-select__menu .devui-dropdown-menu .devui-dropdown-item{cursor:pointer;display:block;width:100%;min-height:36px;line-height:20px;padding:8px 12px;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:var(--devui-border-radius, 4px);transition:color var(--devui-animation-duration-fast, .1s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)),background-color var(--devui-animation-duration-fast, .1s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-editable-select__menu .devui-dropdown-menu .devui-dropdown-item:not(:first-child){margin-top:4px}.devui-editable-select__menu .devui-dropdown-menu .devui-dropdown-item.disabled{cursor:not-allowed;color:var(--devui-disabled-text, #adb0b8)}.devui-editable-select__menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled):hover:not(.selected):not(.active){background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:var(--devui-list-item-hover-text, #252b3a)}.devui-editable-select__menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).devui-editable-select__dropdown--bg{background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:var(--devui-list-item-hover-text, #252b3a)}.devui-editable-select__menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected,.devui-editable-select__menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).active{background-color:var(--devui-list-item-active-bg, #f2f5fc);color:var(--devui-list-item-active-text, #252b3a)}.devui-editable-select__menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected:hover,.devui-editable-select__menu .devui-dropdown-menu .devui-dropdown-item:not(.disabled).active:hover{background-color:var(--devui-list-item-active-bg, #f2f5fc);color:var(--devui-list-item-active-text, #252b3a)}.devui-editable-select__menu ul.devui-editable-select__list-unstyled{margin:0}.devui-editable-select__menu .devui-popup-tips{color:var(--devui-text-weak, #575d6c);padding:4px 12px}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 4px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}
|