vue-devui 1.0.0-rc.6 → 1.0.0-rc.9
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 +5 -0
- package/alert/index.es.js +37 -11
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +311 -77
- package/auto-complete/index.umd.js +3 -5
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +81 -70
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.es.js +29 -4
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5632 -87
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.es.js +56 -29
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +364 -234
- package/checkbox/index.umd.js +1 -1
- package/checkbox/style.css +1 -1
- package/date-picker/index.es.js +310 -157
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +28 -3
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +125 -45
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +437 -22
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +490 -605
- package/form/index.umd.js +15 -15
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +29 -5
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.es.js +71 -50
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +109 -13
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +34 -11
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +330 -130
- package/input/index.umd.js +1 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +272 -199
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +34 -6
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.es.js +34 -10
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/modal/index.es.js +126 -27
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +125 -25
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/Icon.js +1 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.js +3 -0
- package/nuxt/components/formControlProps.js +3 -0
- package/nuxt/components/formItemProps.js +3 -0
- package/nuxt/components/formProps.js +3 -0
- package/nuxt/components/iconProps.js +1 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/overlay/index.es.js +31 -9
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +2 -1
- package/pagination/index.es.js +135 -124
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/popover/index.es.js +198 -83
- package/popover/index.umd.js +16 -16
- package/popover/style.css +1 -1
- package/progress/index.es.js +76 -20
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +161 -140
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +48 -16
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +108 -12
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/search/index.es.js +379 -167
- package/search/index.umd.js +17 -17
- package/search/style.css +1 -1
- package/select/index.es.js +7339 -556
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +37 -12
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +34 -10
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +201 -84
- package/splitter/index.umd.js +14 -14
- package/splitter/style.css +1 -1
- package/status/index.es.js +26 -2
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +30 -6
- package/switch/index.umd.js +1 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +6808 -585
- package/table/index.umd.js +27 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +136 -70
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +31 -7
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +5631 -80
- package/textarea/index.umd.js +35 -1
- package/textarea/style.css +1 -1
- package/timeline/index.es.js +108 -12
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +190 -74
- package/tooltip/index.umd.js +17 -17
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +376 -256
- package/tree/index.umd.js +1 -1
- package/tree/style.css +1 -1
- package/upload/index.es.js +138 -34
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +6770 -5769
- package/vue-devui.umd.js +27 -21
- package/comment/index.d.ts +0 -7
- package/comment/index.es.js +0 -84
- package/comment/index.umd.js +0 -1
- package/comment/package.json +0 -7
- package/comment/style.css +0 -1
- package/nuxt/components/Comment.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/ReadTip.js +0 -3
- package/nuxt/components/commentProps.js +0 -3
- package/nuxt/components/readTipProps.js +0 -3
- package/read-tip/index.d.ts +0 -7
- package/read-tip/index.es.js +0 -261
- package/read-tip/index.umd.js +0 -1
- package/read-tip/package.json +0 -7
- package/read-tip/style.css +0 -1
package/popover/index.es.js
CHANGED
|
@@ -17,21 +17,45 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps,
|
|
20
|
+
import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, toRefs, provide } from "vue";
|
|
21
21
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
22
|
+
function createBem(namespace, element, modifier) {
|
|
23
|
+
let cls = namespace;
|
|
24
|
+
if (element) {
|
|
25
|
+
cls += `__${element}`;
|
|
26
|
+
}
|
|
27
|
+
if (modifier) {
|
|
28
|
+
cls += `--${modifier}`;
|
|
29
|
+
}
|
|
30
|
+
return cls;
|
|
31
|
+
}
|
|
32
|
+
function useNamespace(block, needDot = false) {
|
|
33
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
34
|
+
const b = () => createBem(namespace);
|
|
35
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
36
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
37
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
38
|
+
return {
|
|
39
|
+
b,
|
|
40
|
+
e,
|
|
41
|
+
m,
|
|
42
|
+
em
|
|
43
|
+
};
|
|
44
|
+
}
|
|
22
45
|
var baseOverlay = "";
|
|
23
46
|
function _isSlot(s) {
|
|
24
47
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
25
48
|
}
|
|
26
49
|
const CommonOverlay = defineComponent({
|
|
27
50
|
setup(props, ctx) {
|
|
51
|
+
const ns2 = useNamespace("overlay");
|
|
28
52
|
return () => {
|
|
29
53
|
let _slot;
|
|
30
54
|
return createVNode(Teleport, {
|
|
31
55
|
"to": "#d-overlay-anchor"
|
|
32
56
|
}, {
|
|
33
57
|
default: () => [createVNode(Transition, {
|
|
34
|
-
"name": "
|
|
58
|
+
"name": ns2.e("fade")
|
|
35
59
|
}, _isSlot(_slot = renderSlot(ctx.slots, "default")) ? _slot : {
|
|
36
60
|
default: () => [_slot]
|
|
37
61
|
})]
|
|
@@ -74,15 +98,12 @@ const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
|
74
98
|
});
|
|
75
99
|
const overlayEmits = ["update:visible", "backdropClick"];
|
|
76
100
|
function useOverlayLogic(props, ctx) {
|
|
101
|
+
const ns2 = useNamespace("overlay");
|
|
77
102
|
const backgroundClass = computed(() => {
|
|
78
|
-
return [
|
|
79
|
-
"devui-overlay-background",
|
|
80
|
-
props.backgroundClass,
|
|
81
|
-
!props.hasBackdrop ? "devui-overlay-background__disabled" : "devui-overlay-background__color"
|
|
82
|
-
];
|
|
103
|
+
return [ns2.e("background"), props.backgroundClass, !props.hasBackdrop ? ns2.em("background", "disabled") : ns2.em("background", "color")];
|
|
83
104
|
});
|
|
84
105
|
const overlayClass = computed(() => {
|
|
85
|
-
return
|
|
106
|
+
return ns2.b();
|
|
86
107
|
});
|
|
87
108
|
const handleBackdropClick = (event) => {
|
|
88
109
|
var _a;
|
|
@@ -292,6 +313,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
292
313
|
emit,
|
|
293
314
|
expose
|
|
294
315
|
}) {
|
|
316
|
+
const ns2 = useNamespace("flexible-overlay");
|
|
295
317
|
const {
|
|
296
318
|
arrowRef,
|
|
297
319
|
overlayRef,
|
|
@@ -304,14 +326,70 @@ const FlexibleOverlay = defineComponent({
|
|
|
304
326
|
var _a;
|
|
305
327
|
return props.modelValue && createVNode("div", mergeProps({
|
|
306
328
|
"ref": overlayRef,
|
|
307
|
-
"class":
|
|
329
|
+
"class": ns2.b()
|
|
308
330
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
|
|
309
331
|
"ref": arrowRef,
|
|
310
|
-
"class": "
|
|
332
|
+
"class": ns2.e("arrow")
|
|
311
333
|
}, null)]);
|
|
312
334
|
};
|
|
313
335
|
}
|
|
314
336
|
});
|
|
337
|
+
const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
|
|
338
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
339
|
+
const ns$1 = useNamespace("popper-trigger");
|
|
340
|
+
function wrapContent(content) {
|
|
341
|
+
return h("span", { class: ns$1.b() }, content);
|
|
342
|
+
}
|
|
343
|
+
function getFirstValidChild(nodes) {
|
|
344
|
+
for (const child of nodes) {
|
|
345
|
+
if (isObject(child)) {
|
|
346
|
+
if (child.type === Comment) {
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
if (child.type === "svg" || child.type === Text) {
|
|
350
|
+
return wrapContent(child);
|
|
351
|
+
}
|
|
352
|
+
if (child.type === Fragment) {
|
|
353
|
+
return getFirstValidChild(child.children);
|
|
354
|
+
}
|
|
355
|
+
return child;
|
|
356
|
+
}
|
|
357
|
+
return wrapContent(child);
|
|
358
|
+
}
|
|
359
|
+
return null;
|
|
360
|
+
}
|
|
361
|
+
var PopperTrigger = defineComponent({
|
|
362
|
+
name: "DPopperTrigger",
|
|
363
|
+
setup(_, ctx) {
|
|
364
|
+
const {
|
|
365
|
+
slots,
|
|
366
|
+
attrs
|
|
367
|
+
} = ctx;
|
|
368
|
+
return () => {
|
|
369
|
+
var _a;
|
|
370
|
+
const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots, attrs);
|
|
371
|
+
const triggerRef = inject(POPPER_TRIGGER_TOKEN);
|
|
372
|
+
if (!defaultSlot) {
|
|
373
|
+
return null;
|
|
374
|
+
}
|
|
375
|
+
const firstValidChild = getFirstValidChild(defaultSlot);
|
|
376
|
+
if (!firstValidChild) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
return withDirectives(cloneVNode(firstValidChild, attrs), [[{
|
|
380
|
+
mounted(el) {
|
|
381
|
+
triggerRef.value = el;
|
|
382
|
+
},
|
|
383
|
+
updated(el) {
|
|
384
|
+
triggerRef.value = el;
|
|
385
|
+
},
|
|
386
|
+
unmounted() {
|
|
387
|
+
triggerRef.value = null;
|
|
388
|
+
}
|
|
389
|
+
}]]);
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
});
|
|
315
393
|
const popoverProps = {
|
|
316
394
|
isOpen: {
|
|
317
395
|
type: Boolean,
|
|
@@ -352,6 +430,10 @@ const popoverProps = {
|
|
|
352
430
|
mouseLeaveDelay: {
|
|
353
431
|
type: Number,
|
|
354
432
|
default: 100
|
|
433
|
+
},
|
|
434
|
+
disabled: {
|
|
435
|
+
type: Boolean,
|
|
436
|
+
default: false
|
|
355
437
|
}
|
|
356
438
|
};
|
|
357
439
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
@@ -1065,7 +1147,7 @@ var lodash = { exports: {} };
|
|
|
1065
1147
|
var objectCtorString = funcToString.call(Object2);
|
|
1066
1148
|
var oldDash = root._;
|
|
1067
1149
|
var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
1068
|
-
var Buffer2 = moduleExports ? context.Buffer : undefined$1,
|
|
1150
|
+
var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
|
|
1069
1151
|
var defineProperty = function() {
|
|
1070
1152
|
try {
|
|
1071
1153
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -1080,7 +1162,7 @@ var lodash = { exports: {} };
|
|
|
1080
1162
|
var metaMap = WeakMap2 && new WeakMap2();
|
|
1081
1163
|
var realNames = {};
|
|
1082
1164
|
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
|
|
1083
|
-
var symbolProto =
|
|
1165
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
1084
1166
|
function lodash2(value) {
|
|
1085
1167
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
1086
1168
|
if (value instanceof LodashWrapper) {
|
|
@@ -1096,7 +1178,7 @@ var lodash = { exports: {} };
|
|
|
1096
1178
|
function object() {
|
|
1097
1179
|
}
|
|
1098
1180
|
return function(proto) {
|
|
1099
|
-
if (!
|
|
1181
|
+
if (!isObject2(proto)) {
|
|
1100
1182
|
return {};
|
|
1101
1183
|
}
|
|
1102
1184
|
if (objectCreate) {
|
|
@@ -1458,7 +1540,7 @@ var lodash = { exports: {} };
|
|
|
1458
1540
|
if (result2 !== undefined$1) {
|
|
1459
1541
|
return result2;
|
|
1460
1542
|
}
|
|
1461
|
-
if (!
|
|
1543
|
+
if (!isObject2(value)) {
|
|
1462
1544
|
return value;
|
|
1463
1545
|
}
|
|
1464
1546
|
var isArr = isArray(value);
|
|
@@ -1805,7 +1887,7 @@ var lodash = { exports: {} };
|
|
|
1805
1887
|
return true;
|
|
1806
1888
|
}
|
|
1807
1889
|
function baseIsNative(value) {
|
|
1808
|
-
if (!
|
|
1890
|
+
if (!isObject2(value) || isMasked(value)) {
|
|
1809
1891
|
return false;
|
|
1810
1892
|
}
|
|
1811
1893
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
@@ -1845,7 +1927,7 @@ var lodash = { exports: {} };
|
|
|
1845
1927
|
return result2;
|
|
1846
1928
|
}
|
|
1847
1929
|
function baseKeysIn(object) {
|
|
1848
|
-
if (!
|
|
1930
|
+
if (!isObject2(object)) {
|
|
1849
1931
|
return nativeKeysIn(object);
|
|
1850
1932
|
}
|
|
1851
1933
|
var isProto = isPrototype(object), result2 = [];
|
|
@@ -1890,7 +1972,7 @@ var lodash = { exports: {} };
|
|
|
1890
1972
|
}
|
|
1891
1973
|
baseFor(source, function(srcValue, key) {
|
|
1892
1974
|
stack || (stack = new Stack());
|
|
1893
|
-
if (
|
|
1975
|
+
if (isObject2(srcValue)) {
|
|
1894
1976
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
1895
1977
|
} else {
|
|
1896
1978
|
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
|
|
@@ -1930,7 +2012,7 @@ var lodash = { exports: {} };
|
|
|
1930
2012
|
newValue = objValue;
|
|
1931
2013
|
if (isArguments(objValue)) {
|
|
1932
2014
|
newValue = toPlainObject(objValue);
|
|
1933
|
-
} else if (!
|
|
2015
|
+
} else if (!isObject2(objValue) || isFunction(objValue)) {
|
|
1934
2016
|
newValue = initCloneObject(srcValue);
|
|
1935
2017
|
}
|
|
1936
2018
|
} else {
|
|
@@ -2069,7 +2151,7 @@ var lodash = { exports: {} };
|
|
|
2069
2151
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
2070
2152
|
}
|
|
2071
2153
|
function baseSet(object, path, value, customizer) {
|
|
2072
|
-
if (!
|
|
2154
|
+
if (!isObject2(object)) {
|
|
2073
2155
|
return object;
|
|
2074
2156
|
}
|
|
2075
2157
|
path = castPath(path, object);
|
|
@@ -2083,7 +2165,7 @@ var lodash = { exports: {} };
|
|
|
2083
2165
|
var objValue = nested[key];
|
|
2084
2166
|
newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
|
|
2085
2167
|
if (newValue === undefined$1) {
|
|
2086
|
-
newValue =
|
|
2168
|
+
newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
|
|
2087
2169
|
}
|
|
2088
2170
|
}
|
|
2089
2171
|
assignValue(nested, key, newValue);
|
|
@@ -2533,7 +2615,7 @@ var lodash = { exports: {} };
|
|
|
2533
2615
|
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
|
2534
2616
|
}
|
|
2535
2617
|
var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
|
|
2536
|
-
return
|
|
2618
|
+
return isObject2(result2) ? result2 : thisBinding;
|
|
2537
2619
|
};
|
|
2538
2620
|
}
|
|
2539
2621
|
function createCurry(func, bitmask, arity) {
|
|
@@ -2847,7 +2929,7 @@ var lodash = { exports: {} };
|
|
|
2847
2929
|
return objValue;
|
|
2848
2930
|
}
|
|
2849
2931
|
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
|
2850
|
-
if (
|
|
2932
|
+
if (isObject2(objValue) && isObject2(srcValue)) {
|
|
2851
2933
|
stack.set(srcValue, objValue);
|
|
2852
2934
|
baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
|
|
2853
2935
|
stack["delete"](srcValue);
|
|
@@ -3195,7 +3277,7 @@ var lodash = { exports: {} };
|
|
|
3195
3277
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
3196
3278
|
}
|
|
3197
3279
|
function isIterateeCall(value, index2, object) {
|
|
3198
|
-
if (!
|
|
3280
|
+
if (!isObject2(object)) {
|
|
3199
3281
|
return false;
|
|
3200
3282
|
}
|
|
3201
3283
|
var type = typeof index2;
|
|
@@ -3238,7 +3320,7 @@ var lodash = { exports: {} };
|
|
|
3238
3320
|
return value === proto;
|
|
3239
3321
|
}
|
|
3240
3322
|
function isStrictComparable(value) {
|
|
3241
|
-
return value === value && !
|
|
3323
|
+
return value === value && !isObject2(value);
|
|
3242
3324
|
}
|
|
3243
3325
|
function matchesStrictComparable(key, srcValue) {
|
|
3244
3326
|
return function(object) {
|
|
@@ -4120,7 +4202,7 @@ var lodash = { exports: {} };
|
|
|
4120
4202
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
4121
4203
|
}
|
|
4122
4204
|
wait = toNumber(wait) || 0;
|
|
4123
|
-
if (
|
|
4205
|
+
if (isObject2(options)) {
|
|
4124
4206
|
leading = !!options.leading;
|
|
4125
4207
|
maxing = "maxWait" in options;
|
|
4126
4208
|
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
@@ -4290,7 +4372,7 @@ var lodash = { exports: {} };
|
|
|
4290
4372
|
if (typeof func != "function") {
|
|
4291
4373
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
4292
4374
|
}
|
|
4293
|
-
if (
|
|
4375
|
+
if (isObject2(options)) {
|
|
4294
4376
|
leading = "leading" in options ? !!options.leading : leading;
|
|
4295
4377
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
4296
4378
|
}
|
|
@@ -4398,7 +4480,7 @@ var lodash = { exports: {} };
|
|
|
4398
4480
|
return typeof value == "number" && nativeIsFinite(value);
|
|
4399
4481
|
}
|
|
4400
4482
|
function isFunction(value) {
|
|
4401
|
-
if (!
|
|
4483
|
+
if (!isObject2(value)) {
|
|
4402
4484
|
return false;
|
|
4403
4485
|
}
|
|
4404
4486
|
var tag = baseGetTag(value);
|
|
@@ -4410,7 +4492,7 @@ var lodash = { exports: {} };
|
|
|
4410
4492
|
function isLength(value) {
|
|
4411
4493
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
4412
4494
|
}
|
|
4413
|
-
function
|
|
4495
|
+
function isObject2(value) {
|
|
4414
4496
|
var type = typeof value;
|
|
4415
4497
|
return value != null && (type == "object" || type == "function");
|
|
4416
4498
|
}
|
|
@@ -4517,9 +4599,9 @@ var lodash = { exports: {} };
|
|
|
4517
4599
|
if (isSymbol(value)) {
|
|
4518
4600
|
return NAN;
|
|
4519
4601
|
}
|
|
4520
|
-
if (
|
|
4602
|
+
if (isObject2(value)) {
|
|
4521
4603
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
4522
|
-
value =
|
|
4604
|
+
value = isObject2(other) ? other + "" : other;
|
|
4523
4605
|
}
|
|
4524
4606
|
if (typeof value != "string") {
|
|
4525
4607
|
return value === 0 ? value : +value;
|
|
@@ -4740,7 +4822,7 @@ var lodash = { exports: {} };
|
|
|
4740
4822
|
var Ctor = object && object.constructor;
|
|
4741
4823
|
if (isArrLike) {
|
|
4742
4824
|
accumulator = isArr ? new Ctor() : [];
|
|
4743
|
-
} else if (
|
|
4825
|
+
} else if (isObject2(object)) {
|
|
4744
4826
|
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
|
4745
4827
|
} else {
|
|
4746
4828
|
accumulator = {};
|
|
@@ -5022,7 +5104,7 @@ var lodash = { exports: {} };
|
|
|
5022
5104
|
}
|
|
5023
5105
|
function truncate(string, options) {
|
|
5024
5106
|
var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
|
|
5025
|
-
if (
|
|
5107
|
+
if (isObject2(options)) {
|
|
5026
5108
|
var separator = "separator" in options ? options.separator : separator;
|
|
5027
5109
|
length = "length" in options ? toInteger(options.length) : length;
|
|
5028
5110
|
omission = "omission" in options ? baseToString(options.omission) : omission;
|
|
@@ -5152,13 +5234,13 @@ var lodash = { exports: {} };
|
|
|
5152
5234
|
});
|
|
5153
5235
|
function mixin(object, source, options) {
|
|
5154
5236
|
var props = keys(source), methodNames = baseFunctions(source, props);
|
|
5155
|
-
if (options == null && !(
|
|
5237
|
+
if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) {
|
|
5156
5238
|
options = source;
|
|
5157
5239
|
source = object;
|
|
5158
5240
|
object = this;
|
|
5159
5241
|
methodNames = baseFunctions(source, keys(source));
|
|
5160
5242
|
}
|
|
5161
|
-
var chain2 = !(
|
|
5243
|
+
var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
|
|
5162
5244
|
arrayEach(methodNames, function(methodName) {
|
|
5163
5245
|
var func = source[methodName];
|
|
5164
5246
|
object[methodName] = func;
|
|
@@ -5504,7 +5586,7 @@ var lodash = { exports: {} };
|
|
|
5504
5586
|
lodash2.isNil = isNil;
|
|
5505
5587
|
lodash2.isNull = isNull;
|
|
5506
5588
|
lodash2.isNumber = isNumber;
|
|
5507
|
-
lodash2.isObject =
|
|
5589
|
+
lodash2.isObject = isObject2;
|
|
5508
5590
|
lodash2.isObjectLike = isObjectLike;
|
|
5509
5591
|
lodash2.isPlainObject = isPlainObject;
|
|
5510
5592
|
lodash2.isRegExp = isRegExp;
|
|
@@ -5800,11 +5882,16 @@ function usePopover(props, visible, placement, origin, popoverRef) {
|
|
|
5800
5882
|
return { overlayStyles };
|
|
5801
5883
|
}
|
|
5802
5884
|
function usePopoverEvent(props, visible, origin) {
|
|
5803
|
-
const { trigger, position, mouseEnterDelay, mouseLeaveDelay } = toRefs(props);
|
|
5885
|
+
const { trigger, position, mouseEnterDelay, mouseLeaveDelay, disabled } = toRefs(props);
|
|
5804
5886
|
const isClick = computed(() => trigger.value === "click");
|
|
5805
5887
|
const placement = ref(position.value[0].split("-")[0]);
|
|
5806
5888
|
const isEnter = ref(false);
|
|
5807
|
-
const onClick = () =>
|
|
5889
|
+
const onClick = () => {
|
|
5890
|
+
if (disabled.value) {
|
|
5891
|
+
return;
|
|
5892
|
+
}
|
|
5893
|
+
isClick.value && (visible.value = !visible.value);
|
|
5894
|
+
};
|
|
5808
5895
|
const enter = lodash.exports.debounce(() => {
|
|
5809
5896
|
isEnter.value && (visible.value = true);
|
|
5810
5897
|
}, mouseEnterDelay.value);
|
|
@@ -5812,6 +5899,9 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
5812
5899
|
!isEnter.value && (visible.value = false);
|
|
5813
5900
|
}, mouseLeaveDelay.value);
|
|
5814
5901
|
const onMouseenter = () => {
|
|
5902
|
+
if (disabled.value) {
|
|
5903
|
+
return;
|
|
5904
|
+
}
|
|
5815
5905
|
if (!isClick.value) {
|
|
5816
5906
|
isEnter.value = true;
|
|
5817
5907
|
enter();
|
|
@@ -5823,6 +5913,15 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
5823
5913
|
leave();
|
|
5824
5914
|
}
|
|
5825
5915
|
};
|
|
5916
|
+
const quickLeave = () => {
|
|
5917
|
+
isEnter.value = false;
|
|
5918
|
+
visible.value = false;
|
|
5919
|
+
};
|
|
5920
|
+
watch(disabled, (newVal) => {
|
|
5921
|
+
if (newVal && visible.value) {
|
|
5922
|
+
quickLeave();
|
|
5923
|
+
}
|
|
5924
|
+
});
|
|
5826
5925
|
const handlePositionChange = (pos) => {
|
|
5827
5926
|
placement.value = pos.split("-")[0];
|
|
5828
5927
|
};
|
|
@@ -5834,11 +5933,12 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
5834
5933
|
origin.value.addEventListener("mouseleave", onMouseleave);
|
|
5835
5934
|
}
|
|
5836
5935
|
});
|
|
5837
|
-
return { placement, handlePositionChange };
|
|
5936
|
+
return { placement, handlePositionChange, onMouseenter, onMouseleave };
|
|
5838
5937
|
}
|
|
5938
|
+
const ns = useNamespace("popover");
|
|
5839
5939
|
function SuccessIcon() {
|
|
5840
5940
|
return createVNode("svg", {
|
|
5841
|
-
"class": "
|
|
5941
|
+
"class": [ns.e("icon"), ns.em("icon", "success")],
|
|
5842
5942
|
"viewBox": "0 0 16 16",
|
|
5843
5943
|
"version": "1.1",
|
|
5844
5944
|
"xmlns": "http://www.w3.org/2000/svg"
|
|
@@ -5862,7 +5962,7 @@ function SuccessIcon() {
|
|
|
5862
5962
|
}
|
|
5863
5963
|
function WarningIcon() {
|
|
5864
5964
|
return createVNode("svg", {
|
|
5865
|
-
"class": "
|
|
5965
|
+
"class": [ns.e("icon"), ns.em("icon", "warning")],
|
|
5866
5966
|
"viewBox": "0 0 16 16",
|
|
5867
5967
|
"version": "1.1",
|
|
5868
5968
|
"xmlns": "http://www.w3.org/2000/svg"
|
|
@@ -5872,14 +5972,14 @@ function WarningIcon() {
|
|
|
5872
5972
|
"fill": "none",
|
|
5873
5973
|
"fill-rule": "evenodd"
|
|
5874
5974
|
}, [createVNode("polygon", {
|
|
5875
|
-
"points": "7.5 1.74501946 1.39184847 13.5954649 7.08947368
|
|
5975
|
+
"points": "7.5 1.74501946 1.39184847 13.5954649 7.08947368 14.2207621 13.9973698 13.5954649 10.9383683 5.61273879 8.40084114 1.27624313"
|
|
5876
5976
|
}, null), createVNode("path", {
|
|
5877
|
-
"d": "M8.51325441,0.127397589 C8.70423071,0.228333932
|
|
5977
|
+
"d": "M8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.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 Z M8.87894737,11.2105263 L7.08947368,11.2105263 L7.08947368,13 L8.87894737,13 L8.87894737,11.2105263 Z M8.96842105,4.5 L7,4.5 L7.08947368,9.86842105 L8.87894737,9.86842105 L8.96842105,4.5 Z"
|
|
5878
5978
|
}, null)])]);
|
|
5879
5979
|
}
|
|
5880
5980
|
function InfoIcon() {
|
|
5881
5981
|
return createVNode("svg", {
|
|
5882
|
-
"class": "
|
|
5982
|
+
"class": [ns.e("icon"), ns.em("icon", "info")],
|
|
5883
5983
|
"viewBox": "0 0 16 16",
|
|
5884
5984
|
"version": "1.1",
|
|
5885
5985
|
"xmlns": "http://www.w3.org/2000/svg"
|
|
@@ -5895,12 +5995,12 @@ function InfoIcon() {
|
|
|
5895
5995
|
}, null), createVNode("g", {
|
|
5896
5996
|
"stroke-width": "1"
|
|
5897
5997
|
}, [createVNode("path", {
|
|
5898
|
-
"d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16
|
|
5998
|
+
"d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,5 L7,5 L7,3 L9,3 L9,5 Z M9,12.6 L7,12.6 L7,6.6 L9,6.6 L9,12.6 Z"
|
|
5899
5999
|
}, null)])])]);
|
|
5900
6000
|
}
|
|
5901
6001
|
function ErrorIcon() {
|
|
5902
6002
|
return createVNode("svg", {
|
|
5903
|
-
"class": "
|
|
6003
|
+
"class": [ns.e("icon"), ns.em("icon", "error")],
|
|
5904
6004
|
"width": "16px",
|
|
5905
6005
|
"height": "16px",
|
|
5906
6006
|
"viewBox": "0 0 16 16",
|
|
@@ -5916,7 +6016,7 @@ function ErrorIcon() {
|
|
|
5916
6016
|
"cy": "8",
|
|
5917
6017
|
"r": "7"
|
|
5918
6018
|
}, null), createVNode("path", {
|
|
5919
|
-
"d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8
|
|
6019
|
+
"d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z",
|
|
5920
6020
|
"fill-rule": "nonzero"
|
|
5921
6021
|
}, null)])]);
|
|
5922
6022
|
}
|
|
@@ -5929,8 +6029,9 @@ var PopoverIcon = defineComponent({
|
|
|
5929
6029
|
}
|
|
5930
6030
|
},
|
|
5931
6031
|
setup(props) {
|
|
6032
|
+
const ns2 = useNamespace("popover");
|
|
5932
6033
|
return () => props.type && props.type !== "default" && createVNode("span", {
|
|
5933
|
-
"class": "
|
|
6034
|
+
"class": ns2.e("icon-wrap")
|
|
5934
6035
|
}, [props.type === "success" && createVNode(SuccessIcon, null, null), props.type === "warning" && createVNode(WarningIcon, null, null), props.type === "info" && createVNode(InfoIcon, null, null), props.type === "error" && createVNode(ErrorIcon, null, null)]);
|
|
5935
6036
|
}
|
|
5936
6037
|
});
|
|
@@ -5939,9 +6040,11 @@ var Popover = defineComponent({
|
|
|
5939
6040
|
name: "DPopover",
|
|
5940
6041
|
inheritAttrs: false,
|
|
5941
6042
|
props: popoverProps,
|
|
6043
|
+
emits: ["show", "hide"],
|
|
5942
6044
|
setup(props, {
|
|
5943
6045
|
slots,
|
|
5944
|
-
attrs
|
|
6046
|
+
attrs,
|
|
6047
|
+
emit
|
|
5945
6048
|
}) {
|
|
5946
6049
|
const {
|
|
5947
6050
|
content,
|
|
@@ -5956,47 +6059,59 @@ var Popover = defineComponent({
|
|
|
5956
6059
|
const visible = ref(false);
|
|
5957
6060
|
const {
|
|
5958
6061
|
placement,
|
|
5959
|
-
handlePositionChange
|
|
6062
|
+
handlePositionChange,
|
|
6063
|
+
onMouseenter,
|
|
6064
|
+
onMouseleave
|
|
5960
6065
|
} = usePopoverEvent(props, visible, origin);
|
|
5961
6066
|
const {
|
|
5962
6067
|
overlayStyles
|
|
5963
6068
|
} = usePopover(props, visible, placement, origin, popoverRef);
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
"
|
|
5969
|
-
}
|
|
5970
|
-
"
|
|
6069
|
+
const ns2 = useNamespace("popover");
|
|
6070
|
+
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
6071
|
+
watch(visible, (newVal) => {
|
|
6072
|
+
if (newVal) {
|
|
6073
|
+
emit("show");
|
|
6074
|
+
} else {
|
|
6075
|
+
emit("hide");
|
|
6076
|
+
}
|
|
6077
|
+
});
|
|
6078
|
+
return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
|
|
6079
|
+
default: () => {
|
|
6080
|
+
var _a;
|
|
6081
|
+
return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
|
|
6082
|
+
}
|
|
6083
|
+
}), createVNode(Teleport, {
|
|
6084
|
+
"to": "body"
|
|
6085
|
+
}, {
|
|
6086
|
+
default: () => [createVNode(Transition, {
|
|
6087
|
+
"name": showAnimation.value ? ns2.m(`fade-${placement.value}`) : ""
|
|
5971
6088
|
}, {
|
|
5972
|
-
default: () => [createVNode(
|
|
5973
|
-
"
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
}
|
|
5996
|
-
})]
|
|
6089
|
+
default: () => [createVNode(FlexibleOverlay, mergeProps({
|
|
6090
|
+
"modelValue": visible.value,
|
|
6091
|
+
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
6092
|
+
"ref": popoverRef,
|
|
6093
|
+
"origin": origin.value,
|
|
6094
|
+
"position": position.value,
|
|
6095
|
+
"align": align.value,
|
|
6096
|
+
"offset": offset2.value,
|
|
6097
|
+
"class": [ns2.e("content"), popType.value !== "default" ? "is-icon" : ""],
|
|
6098
|
+
"show-arrow": true,
|
|
6099
|
+
"is-arrow-center": false,
|
|
6100
|
+
"style": overlayStyles.value
|
|
6101
|
+
}, attrs, {
|
|
6102
|
+
"onPositionChange": handlePositionChange,
|
|
6103
|
+
"onMouseenter": onMouseenter,
|
|
6104
|
+
"onMouseleave": onMouseleave
|
|
6105
|
+
}), {
|
|
6106
|
+
default: () => {
|
|
6107
|
+
var _a;
|
|
6108
|
+
return [createVNode(PopoverIcon, {
|
|
6109
|
+
"type": popType.value
|
|
6110
|
+
}, null), ((_a = slots.content) == null ? void 0 : _a.call(slots)) || createVNode("span", null, [content.value])];
|
|
6111
|
+
}
|
|
5997
6112
|
})]
|
|
5998
|
-
})]
|
|
5999
|
-
};
|
|
6113
|
+
})]
|
|
6114
|
+
})]);
|
|
6000
6115
|
}
|
|
6001
6116
|
});
|
|
6002
6117
|
var index = {
|