vue-devui 1.0.0-rc.8 → 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/alert/index.es.js +2 -2
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +282 -84
- package/auto-complete/index.umd.js +3 -5
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +59 -74
- package/avatar/index.umd.js +1 -1
- package/badge/index.es.js +2 -2
- package/badge/index.umd.js +1 -1
- package/button/index.es.js +111 -38
- package/button/index.umd.js +15 -15
- package/button/style.css +1 -1
- package/card/index.es.js +2 -2
- package/card/index.umd.js +1 -1
- package/checkbox/index.es.js +340 -228
- package/checkbox/index.umd.js +1 -1
- package/checkbox/style.css +1 -1
- package/date-picker/index.es.js +264 -63
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +2 -2
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.es.js +104 -48
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +423 -8
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +304 -184
- package/form/index.umd.js +15 -15
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +2 -2
- package/fullscreen/index.umd.js +1 -1
- package/grid/index.es.js +8 -6
- package/grid/index.umd.js +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 +2 -2
- package/image-preview/index.umd.js +1 -1
- package/input/index.es.js +278 -30
- 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 +2 -2
- package/layout/index.umd.js +1 -1
- package/loading/index.es.js +2 -2
- package/loading/index.umd.js +1 -1
- package/modal/index.es.js +105 -32
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +105 -32
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/CheckboxButton.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/iconProps.js +1 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/overlay/index.es.js +2 -2
- package/overlay/index.umd.js +1 -1
- package/package.json +2 -1
- package/pagination/index.es.js +2 -2
- package/pagination/index.umd.js +1 -1
- package/popover/index.es.js +153 -67
- package/popover/index.umd.js +15 -15
- package/popover/style.css +1 -1
- package/progress/index.es.js +2 -2
- package/progress/index.umd.js +2 -2
- package/radio/index.es.js +139 -143
- package/radio/index.umd.js +1 -1
- package/rate/index.es.js +16 -8
- package/rate/index.umd.js +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 +316 -60
- package/search/index.umd.js +16 -16
- package/search/style.css +1 -1
- package/select/index.es.js +7334 -574
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +2 -2
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +2 -2
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +178 -89
- package/splitter/index.umd.js +17 -17
- package/splitter/style.css +1 -1
- package/status/index.es.js +2 -2
- package/status/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +2 -2
- package/switch/index.umd.js +1 -1
- package/table/index.es.js +1301 -524
- package/table/index.umd.js +18 -18
- package/table/style.css +1 -1
- package/tabs/index.es.js +114 -72
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +6 -7
- package/tag/index.umd.js +1 -1
- package/textarea/index.es.js +5545 -11
- package/textarea/index.umd.js +35 -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 +168 -79
- package/tooltip/index.umd.js +15 -15
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +338 -227
- package/tree/index.umd.js +1 -1
- package/tree/style.css +1 -1
- package/upload/index.es.js +105 -32
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +3269 -1742
- package/vue-devui.umd.js +29 -23
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
package/tooltip/index.es.js
CHANGED
|
@@ -17,7 +17,7 @@ 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
22
|
function createBem(namespace, element, modifier) {
|
|
23
23
|
let cls = namespace;
|
|
@@ -29,8 +29,8 @@ function createBem(namespace, element, modifier) {
|
|
|
29
29
|
}
|
|
30
30
|
return cls;
|
|
31
31
|
}
|
|
32
|
-
function useNamespace(block) {
|
|
33
|
-
const namespace = `devui-${block}`;
|
|
32
|
+
function useNamespace(block, needDot = false) {
|
|
33
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
34
34
|
const b = () => createBem(namespace);
|
|
35
35
|
const e = (element) => element ? createBem(namespace, element) : "";
|
|
36
36
|
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
@@ -48,14 +48,14 @@ function _isSlot(s) {
|
|
|
48
48
|
}
|
|
49
49
|
const CommonOverlay = defineComponent({
|
|
50
50
|
setup(props, ctx) {
|
|
51
|
-
const
|
|
51
|
+
const ns2 = useNamespace("overlay");
|
|
52
52
|
return () => {
|
|
53
53
|
let _slot;
|
|
54
54
|
return createVNode(Teleport, {
|
|
55
55
|
"to": "#d-overlay-anchor"
|
|
56
56
|
}, {
|
|
57
57
|
default: () => [createVNode(Transition, {
|
|
58
|
-
"name":
|
|
58
|
+
"name": ns2.e("fade")
|
|
59
59
|
}, _isSlot(_slot = renderSlot(ctx.slots, "default")) ? _slot : {
|
|
60
60
|
default: () => [_slot]
|
|
61
61
|
})]
|
|
@@ -98,12 +98,12 @@ const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
|
98
98
|
});
|
|
99
99
|
const overlayEmits = ["update:visible", "backdropClick"];
|
|
100
100
|
function useOverlayLogic(props, ctx) {
|
|
101
|
-
const
|
|
101
|
+
const ns2 = useNamespace("overlay");
|
|
102
102
|
const backgroundClass = computed(() => {
|
|
103
|
-
return [
|
|
103
|
+
return [ns2.e("background"), props.backgroundClass, !props.hasBackdrop ? ns2.em("background", "disabled") : ns2.em("background", "color")];
|
|
104
104
|
});
|
|
105
105
|
const overlayClass = computed(() => {
|
|
106
|
-
return
|
|
106
|
+
return ns2.b();
|
|
107
107
|
});
|
|
108
108
|
const handleBackdropClick = (event) => {
|
|
109
109
|
var _a;
|
|
@@ -313,7 +313,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
313
313
|
emit,
|
|
314
314
|
expose
|
|
315
315
|
}) {
|
|
316
|
-
const
|
|
316
|
+
const ns2 = useNamespace("flexible-overlay");
|
|
317
317
|
const {
|
|
318
318
|
arrowRef,
|
|
319
319
|
overlayRef,
|
|
@@ -326,14 +326,70 @@ const FlexibleOverlay = defineComponent({
|
|
|
326
326
|
var _a;
|
|
327
327
|
return props.modelValue && createVNode("div", mergeProps({
|
|
328
328
|
"ref": overlayRef,
|
|
329
|
-
"class":
|
|
329
|
+
"class": ns2.b()
|
|
330
330
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
|
|
331
331
|
"ref": arrowRef,
|
|
332
|
-
"class":
|
|
332
|
+
"class": ns2.e("arrow")
|
|
333
333
|
}, null)]);
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
|
+
const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
|
|
338
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
339
|
+
const ns = useNamespace("popper-trigger");
|
|
340
|
+
function wrapContent(content) {
|
|
341
|
+
return h("span", { class: ns.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
|
+
});
|
|
337
393
|
const tooltipProps = {
|
|
338
394
|
content: {
|
|
339
395
|
type: String,
|
|
@@ -354,6 +410,18 @@ const tooltipProps = {
|
|
|
354
410
|
mouseLeaveDelay: {
|
|
355
411
|
type: Number,
|
|
356
412
|
default: 100
|
|
413
|
+
},
|
|
414
|
+
enterable: {
|
|
415
|
+
type: Boolean,
|
|
416
|
+
default: true
|
|
417
|
+
},
|
|
418
|
+
disabled: {
|
|
419
|
+
type: Boolean,
|
|
420
|
+
default: false
|
|
421
|
+
},
|
|
422
|
+
hideAfter: {
|
|
423
|
+
type: Number,
|
|
424
|
+
default: 0
|
|
357
425
|
}
|
|
358
426
|
};
|
|
359
427
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
@@ -1067,7 +1135,7 @@ var lodash = { exports: {} };
|
|
|
1067
1135
|
var objectCtorString = funcToString.call(Object2);
|
|
1068
1136
|
var oldDash = root._;
|
|
1069
1137
|
var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
1070
|
-
var Buffer2 = moduleExports ? context.Buffer : undefined$1,
|
|
1138
|
+
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;
|
|
1071
1139
|
var defineProperty = function() {
|
|
1072
1140
|
try {
|
|
1073
1141
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -1082,7 +1150,7 @@ var lodash = { exports: {} };
|
|
|
1082
1150
|
var metaMap = WeakMap2 && new WeakMap2();
|
|
1083
1151
|
var realNames = {};
|
|
1084
1152
|
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
|
|
1085
|
-
var symbolProto =
|
|
1153
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
1086
1154
|
function lodash2(value) {
|
|
1087
1155
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
1088
1156
|
if (value instanceof LodashWrapper) {
|
|
@@ -1098,7 +1166,7 @@ var lodash = { exports: {} };
|
|
|
1098
1166
|
function object() {
|
|
1099
1167
|
}
|
|
1100
1168
|
return function(proto) {
|
|
1101
|
-
if (!
|
|
1169
|
+
if (!isObject2(proto)) {
|
|
1102
1170
|
return {};
|
|
1103
1171
|
}
|
|
1104
1172
|
if (objectCreate) {
|
|
@@ -1460,7 +1528,7 @@ var lodash = { exports: {} };
|
|
|
1460
1528
|
if (result2 !== undefined$1) {
|
|
1461
1529
|
return result2;
|
|
1462
1530
|
}
|
|
1463
|
-
if (!
|
|
1531
|
+
if (!isObject2(value)) {
|
|
1464
1532
|
return value;
|
|
1465
1533
|
}
|
|
1466
1534
|
var isArr = isArray(value);
|
|
@@ -1536,7 +1604,7 @@ var lodash = { exports: {} };
|
|
|
1536
1604
|
if (typeof func != "function") {
|
|
1537
1605
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
1538
1606
|
}
|
|
1539
|
-
return
|
|
1607
|
+
return setTimeout2(function() {
|
|
1540
1608
|
func.apply(undefined$1, args);
|
|
1541
1609
|
}, wait);
|
|
1542
1610
|
}
|
|
@@ -1807,7 +1875,7 @@ var lodash = { exports: {} };
|
|
|
1807
1875
|
return true;
|
|
1808
1876
|
}
|
|
1809
1877
|
function baseIsNative(value) {
|
|
1810
|
-
if (!
|
|
1878
|
+
if (!isObject2(value) || isMasked(value)) {
|
|
1811
1879
|
return false;
|
|
1812
1880
|
}
|
|
1813
1881
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
@@ -1847,7 +1915,7 @@ var lodash = { exports: {} };
|
|
|
1847
1915
|
return result2;
|
|
1848
1916
|
}
|
|
1849
1917
|
function baseKeysIn(object) {
|
|
1850
|
-
if (!
|
|
1918
|
+
if (!isObject2(object)) {
|
|
1851
1919
|
return nativeKeysIn(object);
|
|
1852
1920
|
}
|
|
1853
1921
|
var isProto = isPrototype(object), result2 = [];
|
|
@@ -1892,7 +1960,7 @@ var lodash = { exports: {} };
|
|
|
1892
1960
|
}
|
|
1893
1961
|
baseFor(source, function(srcValue, key) {
|
|
1894
1962
|
stack || (stack = new Stack());
|
|
1895
|
-
if (
|
|
1963
|
+
if (isObject2(srcValue)) {
|
|
1896
1964
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
1897
1965
|
} else {
|
|
1898
1966
|
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
|
|
@@ -1932,7 +2000,7 @@ var lodash = { exports: {} };
|
|
|
1932
2000
|
newValue = objValue;
|
|
1933
2001
|
if (isArguments(objValue)) {
|
|
1934
2002
|
newValue = toPlainObject(objValue);
|
|
1935
|
-
} else if (!
|
|
2003
|
+
} else if (!isObject2(objValue) || isFunction(objValue)) {
|
|
1936
2004
|
newValue = initCloneObject(srcValue);
|
|
1937
2005
|
}
|
|
1938
2006
|
} else {
|
|
@@ -2071,7 +2139,7 @@ var lodash = { exports: {} };
|
|
|
2071
2139
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
2072
2140
|
}
|
|
2073
2141
|
function baseSet(object, path, value, customizer) {
|
|
2074
|
-
if (!
|
|
2142
|
+
if (!isObject2(object)) {
|
|
2075
2143
|
return object;
|
|
2076
2144
|
}
|
|
2077
2145
|
path = castPath(path, object);
|
|
@@ -2085,7 +2153,7 @@ var lodash = { exports: {} };
|
|
|
2085
2153
|
var objValue = nested[key];
|
|
2086
2154
|
newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
|
|
2087
2155
|
if (newValue === undefined$1) {
|
|
2088
|
-
newValue =
|
|
2156
|
+
newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
|
|
2089
2157
|
}
|
|
2090
2158
|
}
|
|
2091
2159
|
assignValue(nested, key, newValue);
|
|
@@ -2316,7 +2384,7 @@ var lodash = { exports: {} };
|
|
|
2316
2384
|
end = end === undefined$1 ? length : end;
|
|
2317
2385
|
return !start && end >= length ? array : baseSlice(array, start, end);
|
|
2318
2386
|
}
|
|
2319
|
-
var
|
|
2387
|
+
var clearTimeout2 = ctxClearTimeout || function(id) {
|
|
2320
2388
|
return root.clearTimeout(id);
|
|
2321
2389
|
};
|
|
2322
2390
|
function cloneBuffer(buffer, isDeep) {
|
|
@@ -2535,7 +2603,7 @@ var lodash = { exports: {} };
|
|
|
2535
2603
|
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
|
2536
2604
|
}
|
|
2537
2605
|
var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
|
|
2538
|
-
return
|
|
2606
|
+
return isObject2(result2) ? result2 : thisBinding;
|
|
2539
2607
|
};
|
|
2540
2608
|
}
|
|
2541
2609
|
function createCurry(func, bitmask, arity) {
|
|
@@ -2849,7 +2917,7 @@ var lodash = { exports: {} };
|
|
|
2849
2917
|
return objValue;
|
|
2850
2918
|
}
|
|
2851
2919
|
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
|
2852
|
-
if (
|
|
2920
|
+
if (isObject2(objValue) && isObject2(srcValue)) {
|
|
2853
2921
|
stack.set(srcValue, objValue);
|
|
2854
2922
|
baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
|
|
2855
2923
|
stack["delete"](srcValue);
|
|
@@ -3197,7 +3265,7 @@ var lodash = { exports: {} };
|
|
|
3197
3265
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
3198
3266
|
}
|
|
3199
3267
|
function isIterateeCall(value, index2, object) {
|
|
3200
|
-
if (!
|
|
3268
|
+
if (!isObject2(object)) {
|
|
3201
3269
|
return false;
|
|
3202
3270
|
}
|
|
3203
3271
|
var type = typeof index2;
|
|
@@ -3240,7 +3308,7 @@ var lodash = { exports: {} };
|
|
|
3240
3308
|
return value === proto;
|
|
3241
3309
|
}
|
|
3242
3310
|
function isStrictComparable(value) {
|
|
3243
|
-
return value === value && !
|
|
3311
|
+
return value === value && !isObject2(value);
|
|
3244
3312
|
}
|
|
3245
3313
|
function matchesStrictComparable(key, srcValue) {
|
|
3246
3314
|
return function(object) {
|
|
@@ -3345,7 +3413,7 @@ var lodash = { exports: {} };
|
|
|
3345
3413
|
return object[key];
|
|
3346
3414
|
}
|
|
3347
3415
|
var setData = shortOut(baseSetData);
|
|
3348
|
-
var
|
|
3416
|
+
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
|
3349
3417
|
return root.setTimeout(func, wait);
|
|
3350
3418
|
};
|
|
3351
3419
|
var setToString = shortOut(baseSetToString);
|
|
@@ -4122,7 +4190,7 @@ var lodash = { exports: {} };
|
|
|
4122
4190
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
4123
4191
|
}
|
|
4124
4192
|
wait = toNumber(wait) || 0;
|
|
4125
|
-
if (
|
|
4193
|
+
if (isObject2(options)) {
|
|
4126
4194
|
leading = !!options.leading;
|
|
4127
4195
|
maxing = "maxWait" in options;
|
|
4128
4196
|
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
@@ -4137,7 +4205,7 @@ var lodash = { exports: {} };
|
|
|
4137
4205
|
}
|
|
4138
4206
|
function leadingEdge(time) {
|
|
4139
4207
|
lastInvokeTime = time;
|
|
4140
|
-
timerId =
|
|
4208
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4141
4209
|
return leading ? invokeFunc(time) : result2;
|
|
4142
4210
|
}
|
|
4143
4211
|
function remainingWait(time) {
|
|
@@ -4153,7 +4221,7 @@ var lodash = { exports: {} };
|
|
|
4153
4221
|
if (shouldInvoke(time)) {
|
|
4154
4222
|
return trailingEdge(time);
|
|
4155
4223
|
}
|
|
4156
|
-
timerId =
|
|
4224
|
+
timerId = setTimeout2(timerExpired, remainingWait(time));
|
|
4157
4225
|
}
|
|
4158
4226
|
function trailingEdge(time) {
|
|
4159
4227
|
timerId = undefined$1;
|
|
@@ -4165,7 +4233,7 @@ var lodash = { exports: {} };
|
|
|
4165
4233
|
}
|
|
4166
4234
|
function cancel() {
|
|
4167
4235
|
if (timerId !== undefined$1) {
|
|
4168
|
-
|
|
4236
|
+
clearTimeout2(timerId);
|
|
4169
4237
|
}
|
|
4170
4238
|
lastInvokeTime = 0;
|
|
4171
4239
|
lastArgs = lastCallTime = lastThis = timerId = undefined$1;
|
|
@@ -4183,13 +4251,13 @@ var lodash = { exports: {} };
|
|
|
4183
4251
|
return leadingEdge(lastCallTime);
|
|
4184
4252
|
}
|
|
4185
4253
|
if (maxing) {
|
|
4186
|
-
|
|
4187
|
-
timerId =
|
|
4254
|
+
clearTimeout2(timerId);
|
|
4255
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4188
4256
|
return invokeFunc(lastCallTime);
|
|
4189
4257
|
}
|
|
4190
4258
|
}
|
|
4191
4259
|
if (timerId === undefined$1) {
|
|
4192
|
-
timerId =
|
|
4260
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4193
4261
|
}
|
|
4194
4262
|
return result2;
|
|
4195
4263
|
}
|
|
@@ -4292,7 +4360,7 @@ var lodash = { exports: {} };
|
|
|
4292
4360
|
if (typeof func != "function") {
|
|
4293
4361
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
4294
4362
|
}
|
|
4295
|
-
if (
|
|
4363
|
+
if (isObject2(options)) {
|
|
4296
4364
|
leading = "leading" in options ? !!options.leading : leading;
|
|
4297
4365
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
4298
4366
|
}
|
|
@@ -4400,7 +4468,7 @@ var lodash = { exports: {} };
|
|
|
4400
4468
|
return typeof value == "number" && nativeIsFinite(value);
|
|
4401
4469
|
}
|
|
4402
4470
|
function isFunction(value) {
|
|
4403
|
-
if (!
|
|
4471
|
+
if (!isObject2(value)) {
|
|
4404
4472
|
return false;
|
|
4405
4473
|
}
|
|
4406
4474
|
var tag = baseGetTag(value);
|
|
@@ -4412,7 +4480,7 @@ var lodash = { exports: {} };
|
|
|
4412
4480
|
function isLength(value) {
|
|
4413
4481
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
4414
4482
|
}
|
|
4415
|
-
function
|
|
4483
|
+
function isObject2(value) {
|
|
4416
4484
|
var type = typeof value;
|
|
4417
4485
|
return value != null && (type == "object" || type == "function");
|
|
4418
4486
|
}
|
|
@@ -4519,9 +4587,9 @@ var lodash = { exports: {} };
|
|
|
4519
4587
|
if (isSymbol(value)) {
|
|
4520
4588
|
return NAN;
|
|
4521
4589
|
}
|
|
4522
|
-
if (
|
|
4590
|
+
if (isObject2(value)) {
|
|
4523
4591
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
4524
|
-
value =
|
|
4592
|
+
value = isObject2(other) ? other + "" : other;
|
|
4525
4593
|
}
|
|
4526
4594
|
if (typeof value != "string") {
|
|
4527
4595
|
return value === 0 ? value : +value;
|
|
@@ -4742,7 +4810,7 @@ var lodash = { exports: {} };
|
|
|
4742
4810
|
var Ctor = object && object.constructor;
|
|
4743
4811
|
if (isArrLike) {
|
|
4744
4812
|
accumulator = isArr ? new Ctor() : [];
|
|
4745
|
-
} else if (
|
|
4813
|
+
} else if (isObject2(object)) {
|
|
4746
4814
|
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
|
4747
4815
|
} else {
|
|
4748
4816
|
accumulator = {};
|
|
@@ -5024,7 +5092,7 @@ var lodash = { exports: {} };
|
|
|
5024
5092
|
}
|
|
5025
5093
|
function truncate(string, options) {
|
|
5026
5094
|
var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
|
|
5027
|
-
if (
|
|
5095
|
+
if (isObject2(options)) {
|
|
5028
5096
|
var separator = "separator" in options ? options.separator : separator;
|
|
5029
5097
|
length = "length" in options ? toInteger(options.length) : length;
|
|
5030
5098
|
omission = "omission" in options ? baseToString(options.omission) : omission;
|
|
@@ -5154,13 +5222,13 @@ var lodash = { exports: {} };
|
|
|
5154
5222
|
});
|
|
5155
5223
|
function mixin(object, source, options) {
|
|
5156
5224
|
var props = keys(source), methodNames = baseFunctions(source, props);
|
|
5157
|
-
if (options == null && !(
|
|
5225
|
+
if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) {
|
|
5158
5226
|
options = source;
|
|
5159
5227
|
source = object;
|
|
5160
5228
|
object = this;
|
|
5161
5229
|
methodNames = baseFunctions(source, keys(source));
|
|
5162
5230
|
}
|
|
5163
|
-
var chain2 = !(
|
|
5231
|
+
var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
|
|
5164
5232
|
arrayEach(methodNames, function(methodName) {
|
|
5165
5233
|
var func = source[methodName];
|
|
5166
5234
|
object[methodName] = func;
|
|
@@ -5506,7 +5574,7 @@ var lodash = { exports: {} };
|
|
|
5506
5574
|
lodash2.isNil = isNil;
|
|
5507
5575
|
lodash2.isNull = isNull;
|
|
5508
5576
|
lodash2.isNumber = isNumber;
|
|
5509
|
-
lodash2.isObject =
|
|
5577
|
+
lodash2.isObject = isObject2;
|
|
5510
5578
|
lodash2.isObjectLike = isObjectLike;
|
|
5511
5579
|
lodash2.isPlainObject = isPlainObject;
|
|
5512
5580
|
lodash2.isRegExp = isRegExp;
|
|
@@ -5775,7 +5843,7 @@ const TransformOriginMap = {
|
|
|
5775
5843
|
right: "-8px 50%"
|
|
5776
5844
|
};
|
|
5777
5845
|
function useTooltip(origin, props) {
|
|
5778
|
-
const { position, mouseEnterDelay, mouseLeaveDelay } = toRefs(props);
|
|
5846
|
+
const { position, mouseEnterDelay, mouseLeaveDelay, enterable, disabled, hideAfter } = toRefs(props);
|
|
5779
5847
|
const visible = ref(false);
|
|
5780
5848
|
const isEnter = ref(false);
|
|
5781
5849
|
const positionArr = computed(() => typeof position.value === "string" ? [position.value] : position.value);
|
|
@@ -5790,6 +5858,9 @@ function useTooltip(origin, props) {
|
|
|
5790
5858
|
!isEnter.value && (visible.value = false);
|
|
5791
5859
|
}, mouseLeaveDelay.value);
|
|
5792
5860
|
const onMouseenter = () => {
|
|
5861
|
+
if (disabled.value) {
|
|
5862
|
+
return;
|
|
5863
|
+
}
|
|
5793
5864
|
isEnter.value = true;
|
|
5794
5865
|
enter();
|
|
5795
5866
|
};
|
|
@@ -5800,11 +5871,29 @@ function useTooltip(origin, props) {
|
|
|
5800
5871
|
const onPositionChange = (pos) => {
|
|
5801
5872
|
placement.value = pos;
|
|
5802
5873
|
};
|
|
5874
|
+
const quickLeave = () => {
|
|
5875
|
+
isEnter.value = false;
|
|
5876
|
+
visible.value = false;
|
|
5877
|
+
};
|
|
5878
|
+
const onMouseenterOverlay = () => {
|
|
5879
|
+
if (!enterable.value) {
|
|
5880
|
+
quickLeave();
|
|
5881
|
+
} else {
|
|
5882
|
+
onMouseenter();
|
|
5883
|
+
}
|
|
5884
|
+
};
|
|
5803
5885
|
onMounted(() => {
|
|
5804
5886
|
origin.value.addEventListener("mouseenter", onMouseenter);
|
|
5805
5887
|
origin.value.addEventListener("mouseleave", onMouseleave);
|
|
5806
5888
|
});
|
|
5807
|
-
|
|
5889
|
+
let timer;
|
|
5890
|
+
watch(visible, (newVal) => {
|
|
5891
|
+
if (newVal && hideAfter.value) {
|
|
5892
|
+
timer && clearTimeout(timer);
|
|
5893
|
+
timer = setTimeout(quickLeave, hideAfter.value);
|
|
5894
|
+
}
|
|
5895
|
+
});
|
|
5896
|
+
return { visible, placement, positionArr, overlayStyles, onPositionChange, onMouseenter, onMouseleave, onMouseenterOverlay };
|
|
5808
5897
|
}
|
|
5809
5898
|
var tooltip = "";
|
|
5810
5899
|
var Tooltip = defineComponent({
|
|
@@ -5825,42 +5914,42 @@ var Tooltip = defineComponent({
|
|
|
5825
5914
|
positionArr,
|
|
5826
5915
|
overlayStyles,
|
|
5827
5916
|
onPositionChange,
|
|
5828
|
-
|
|
5829
|
-
|
|
5917
|
+
onMouseleave,
|
|
5918
|
+
onMouseenterOverlay
|
|
5830
5919
|
} = useTooltip(origin, props);
|
|
5831
|
-
const
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
}
|
|
5838
|
-
|
|
5920
|
+
const ns2 = useNamespace("tooltip");
|
|
5921
|
+
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
5922
|
+
return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
|
|
5923
|
+
default: () => {
|
|
5924
|
+
var _a;
|
|
5925
|
+
return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
|
|
5926
|
+
}
|
|
5927
|
+
}), createVNode(Teleport, {
|
|
5928
|
+
"to": "body"
|
|
5929
|
+
}, {
|
|
5930
|
+
default: () => [createVNode(Transition, {
|
|
5931
|
+
"name": showAnimation.value ? ns2.m(`fade-${placement.value}`) : ""
|
|
5839
5932
|
}, {
|
|
5840
|
-
default: () => [createVNode(
|
|
5841
|
-
"
|
|
5933
|
+
default: () => [createVNode(FlexibleOverlay, {
|
|
5934
|
+
"modelValue": visible.value,
|
|
5935
|
+
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
5936
|
+
"ref": tooltipRef,
|
|
5937
|
+
"class": ns2.b(),
|
|
5938
|
+
"origin": origin.value,
|
|
5939
|
+
"position": positionArr.value,
|
|
5940
|
+
"offset": 6,
|
|
5941
|
+
"show-arrow": true,
|
|
5942
|
+
"style": overlayStyles.value,
|
|
5943
|
+
"onPositionChange": onPositionChange,
|
|
5944
|
+
"onMouseenter": onMouseenterOverlay,
|
|
5945
|
+
"onMouseleave": onMouseleave
|
|
5842
5946
|
}, {
|
|
5843
|
-
default: () => [createVNode(
|
|
5844
|
-
"
|
|
5845
|
-
|
|
5846
|
-
"ref": tooltipRef,
|
|
5847
|
-
"class": ns.b(),
|
|
5848
|
-
"origin": origin.value,
|
|
5849
|
-
"position": positionArr.value,
|
|
5850
|
-
"offset": 6,
|
|
5851
|
-
"show-arrow": true,
|
|
5852
|
-
"style": overlayStyles.value,
|
|
5853
|
-
"onPositionChange": onPositionChange,
|
|
5854
|
-
"onMouseenter": onMouseenter,
|
|
5855
|
-
"onMouseleave": onMouseleave
|
|
5856
|
-
}, {
|
|
5857
|
-
default: () => [createVNode("span", {
|
|
5858
|
-
"innerHTML": content.value
|
|
5859
|
-
}, null)]
|
|
5860
|
-
})]
|
|
5947
|
+
default: () => [createVNode("span", {
|
|
5948
|
+
"innerHTML": content.value
|
|
5949
|
+
}, null)]
|
|
5861
5950
|
})]
|
|
5862
|
-
})]
|
|
5863
|
-
};
|
|
5951
|
+
})]
|
|
5952
|
+
})]);
|
|
5864
5953
|
}
|
|
5865
5954
|
});
|
|
5866
5955
|
var index = {
|