vue-devui 1.0.0 → 1.1.0
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 +36 -5
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +27 -16
- package/auto-complete/index.umd.js +11 -11
- package/auto-complete/style.css +1 -1
- package/button/index.es.js +7 -6
- package/button/index.umd.js +5 -5
- package/button/style.css +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +19 -14
- package/checkbox/index.umd.js +8 -8
- package/checkbox/style.css +1 -1
- package/date-picker-pro/index.es.js +138 -133
- package/date-picker-pro/index.umd.js +13 -13
- package/date-picker-pro/style.css +1 -1
- package/drawer/index.es.js +22 -5
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +16 -3
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +67 -62
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +14 -8
- package/form/index.umd.js +5 -5
- package/form/style.css +1 -1
- package/icon/index.es.js +2 -1
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +22 -11
- package/input/index.umd.js +4 -4
- package/input/style.css +1 -1
- package/input-number/index.es.js +26 -23
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/loading/index.es.js +51 -51
- package/loading/index.umd.js +1 -1
- package/mention/index.es.js +33 -17
- package/mention/index.umd.js +10 -10
- package/mention/style.css +1 -1
- package/message/index.es.js +2 -1
- package/message/index.umd.js +1 -1
- package/message/style.css +1 -1
- package/modal/index.es.js +158 -43
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +7 -9
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/paginationInjectionKey.js +3 -0
- package/overlay/index.es.js +12 -2
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +2 -2
- package/pagination/index.es.js +10160 -278
- package/pagination/index.umd.js +27 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +4 -0
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +13 -5
- package/popover/index.umd.js +9 -9
- package/popover/style.css +1 -1
- package/radio/index.es.js +14 -8
- package/radio/index.umd.js +4 -4
- package/radio/style.css +1 -1
- package/result/index.es.js +2 -1
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/search/index.es.js +23 -12
- package/search/index.umd.js +4 -4
- package/search/style.css +1 -1
- package/select/index.es.js +134 -113
- package/select/index.umd.js +10 -10
- package/select/style.css +1 -1
- package/skeleton/style.css +1 -1
- package/splitter/index.es.js +30 -7
- package/splitter/index.umd.js +16 -16
- package/splitter/style.css +1 -1
- package/status/index.es.js +4 -0
- package/status/index.umd.js +1 -1
- package/steps/index.es.js +2 -1
- package/steps/index.umd.js +1 -1
- package/steps/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +14 -8
- package/switch/index.umd.js +13 -13
- package/switch/style.css +1 -1
- package/table/index.es.js +159 -66
- package/table/index.umd.js +7 -7
- package/table/style.css +1 -1
- package/tabs/index.es.js +95 -44
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +1 -1
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +17 -9
- package/textarea/index.umd.js +13 -13
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +154 -151
- package/time-picker/index.umd.js +14 -14
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +141 -117
- package/time-select/index.umd.js +13 -13
- package/time-select/style.css +1 -1
- package/timeline/index.es.js +2 -1
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +28 -6
- package/tooltip/index.umd.js +7 -7
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +47 -38
- package/tree/index.umd.js +7 -7
- package/tree/style.css +1 -1
- package/upload/index.es.js +9 -10
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +3496 -3121
- package/vue-devui.umd.js +21 -21
- package/alert/index.d.ts +0 -7
- package/auto-complete/index.d.ts +0 -7
- package/avatar/index.d.ts +0 -7
- package/badge/index.d.ts +0 -7
- package/button/index.d.ts +0 -7
- package/card/index.d.ts +0 -7
- package/checkbox/index.d.ts +0 -7
- package/collapse/index.d.ts +0 -7
- package/countdown/index.d.ts +0 -7
- package/date-picker-pro/index.d.ts +0 -7
- package/drawer/index.d.ts +0 -7
- package/dropdown/index.d.ts +0 -7
- package/editable-select/index.d.ts +0 -7
- package/form/index.d.ts +0 -7
- package/fullscreen/index.d.ts +0 -7
- package/grid/index.d.ts +0 -7
- package/icon/index.d.ts +0 -7
- package/image-preview/index.d.ts +0 -7
- package/index.d.ts +0 -7
- package/input/index.d.ts +0 -7
- package/input-number/index.d.ts +0 -7
- package/layout/index.d.ts +0 -7
- package/loading/index.d.ts +0 -7
- package/mention/index.d.ts +0 -7
- package/menu/index.d.ts +0 -7
- package/message/index.d.ts +0 -7
- package/modal/index.d.ts +0 -7
- package/notification/index.d.ts +0 -7
- package/nuxt/components/Loading.js +0 -3
- package/overlay/index.d.ts +0 -7
- package/pagination/index.d.ts +0 -7
- package/panel/index.d.ts +0 -7
- package/popover/index.d.ts +0 -7
- package/progress/index.d.ts +0 -7
- package/radio/index.d.ts +0 -7
- package/rate/index.d.ts +0 -7
- package/result/index.d.ts +0 -7
- package/ripple/index.d.ts +0 -7
- package/search/index.d.ts +0 -7
- package/select/index.d.ts +0 -7
- package/skeleton/index.d.ts +0 -7
- package/slider/index.d.ts +0 -7
- package/splitter/index.d.ts +0 -7
- package/statistic/index.d.ts +0 -7
- package/status/index.d.ts +0 -7
- package/steps/index.d.ts +0 -7
- package/switch/index.d.ts +0 -7
- package/table/index.d.ts +0 -7
- package/tabs/index.d.ts +0 -7
- package/tag/index.d.ts +0 -7
- package/textarea/index.d.ts +0 -7
- package/time-picker/index.d.ts +0 -7
- package/time-select/index.d.ts +0 -7
- package/timeline/index.d.ts +0 -7
- package/tooltip/index.d.ts +0 -7
- package/tree/index.d.ts +0 -7
- package/upload/index.d.ts +0 -7
package/tree/index.es.js
CHANGED
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { ref, onUnmounted, computed, reactive, createVNode, defineComponent, toRefs, inject, getCurrentInstance, watch, provide, Transition, mergeProps, unref, nextTick, Comment, Text, h, Fragment, withDirectives, cloneVNode, onMounted, Teleport,
|
|
32
|
+
import { ref, onUnmounted, computed, reactive, createVNode, defineComponent, toRefs, inject, getCurrentInstance, watch, provide, Transition, mergeProps, unref, nextTick, withModifiers, Comment, Text, h, Fragment, withDirectives, cloneVNode, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, renderSlot, useSlots, resolveComponent, isVNode, onUpdated, shallowRef, toRaw, watchEffect, TransitionGroup } from "vue";
|
|
33
33
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
34
34
|
const USE_TREE_TOKEN = "use-tree-token";
|
|
35
35
|
const TREE_INSTANCE = "tree-instance";
|
|
@@ -1618,7 +1618,7 @@ function useOperate() {
|
|
|
1618
1618
|
parentId: parentNode.id,
|
|
1619
1619
|
isLeaf: true,
|
|
1620
1620
|
parentChildNodeCount: children.length + 1,
|
|
1621
|
-
currentIndex:
|
|
1621
|
+
currentIndex: lastChild && typeof lastChild.currentIndex === "number" ? lastChild.currentIndex + 1 : 0
|
|
1622
1622
|
}));
|
|
1623
1623
|
if (currentNode.value.id === void 0) {
|
|
1624
1624
|
currentNode.value.id = randomId();
|
|
@@ -7467,7 +7467,8 @@ function deepAssign(...objects) {
|
|
|
7467
7467
|
var zhCN = {
|
|
7468
7468
|
pagination: {
|
|
7469
7469
|
totalItemText: "\u6240\u6709\u6761\u76EE",
|
|
7470
|
-
goToText: "\u8DF3\u81F3"
|
|
7470
|
+
goToText: "\u8DF3\u81F3",
|
|
7471
|
+
perPage: "\u6761/\u9875"
|
|
7471
7472
|
},
|
|
7472
7473
|
accordion: {
|
|
7473
7474
|
loading: "\u52A0\u8F7D\u4E2D",
|
|
@@ -8029,6 +8030,10 @@ const flexibleOverlayProps = {
|
|
|
8029
8030
|
isArrowCenter: {
|
|
8030
8031
|
type: Boolean,
|
|
8031
8032
|
default: true
|
|
8033
|
+
},
|
|
8034
|
+
clickEventBubble: {
|
|
8035
|
+
type: Boolean,
|
|
8036
|
+
default: false
|
|
8032
8037
|
}
|
|
8033
8038
|
};
|
|
8034
8039
|
function getScrollParent(element) {
|
|
@@ -8143,6 +8148,9 @@ const FlexibleOverlay = defineComponent({
|
|
|
8143
8148
|
expose
|
|
8144
8149
|
}) {
|
|
8145
8150
|
const ns2 = useNamespace("flexible-overlay");
|
|
8151
|
+
const {
|
|
8152
|
+
clickEventBubble
|
|
8153
|
+
} = toRefs(props);
|
|
8146
8154
|
const {
|
|
8147
8155
|
arrowRef,
|
|
8148
8156
|
overlayRef,
|
|
@@ -8156,7 +8164,10 @@ const FlexibleOverlay = defineComponent({
|
|
|
8156
8164
|
return props.modelValue && createVNode("div", mergeProps({
|
|
8157
8165
|
"ref": overlayRef,
|
|
8158
8166
|
"class": ns2.b()
|
|
8159
|
-
}, attrs
|
|
8167
|
+
}, attrs, {
|
|
8168
|
+
"onClick": withModifiers(() => ({}), [clickEventBubble.value ? "" : "stop"]),
|
|
8169
|
+
"onPointerup": withModifiers(() => ({}), ["stop"])
|
|
8170
|
+
}), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
|
|
8160
8171
|
"ref": arrowRef,
|
|
8161
8172
|
"class": ns2.e("arrow")
|
|
8162
8173
|
}, null)]);
|
|
@@ -8274,7 +8285,7 @@ const TransformOriginMap = {
|
|
|
8274
8285
|
function usePopover(props, visible, placement, origin, popoverRef) {
|
|
8275
8286
|
const { trigger, isOpen } = toRefs(props);
|
|
8276
8287
|
const overlayStyles = computed(() => ({
|
|
8277
|
-
zIndex: 1060,
|
|
8288
|
+
zIndex: "var(--devui-z-index-pop-up, 1060)",
|
|
8278
8289
|
transformOrigin: TransformOriginMap[placement.value]
|
|
8279
8290
|
}));
|
|
8280
8291
|
const onDocumentClick = (e) => {
|
|
@@ -8517,8 +8528,6 @@ var Popover = defineComponent({
|
|
|
8517
8528
|
"style": overlayStyles.value
|
|
8518
8529
|
}, attrs, {
|
|
8519
8530
|
"onPositionChange": handlePositionChange,
|
|
8520
|
-
"onClick": withModifiers(() => ({}), ["stop"]),
|
|
8521
|
-
"onPointerup": withModifiers(() => ({}), ["stop"]),
|
|
8522
8531
|
"onMouseenter": onMouseenter,
|
|
8523
8532
|
"onMouseleave": onMouseleave
|
|
8524
8533
|
}), {
|
|
@@ -8717,9 +8726,7 @@ var FormControl = defineComponent({
|
|
|
8717
8726
|
}, {
|
|
8718
8727
|
default: () => {
|
|
8719
8728
|
var _a, _b;
|
|
8720
|
-
return [
|
|
8721
|
-
"class": ns2.e("control-content")
|
|
8722
|
-
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]), createTextVNode(",")];
|
|
8729
|
+
return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
|
|
8723
8730
|
}
|
|
8724
8731
|
}), showFeedback.value && createVNode("span", {
|
|
8725
8732
|
"class": [ns2.e("feedback-icon"), ns2.em("feedback-icon", feedbackStatus.value)]
|
|
@@ -10261,12 +10268,11 @@ defineComponent({
|
|
|
10261
10268
|
}
|
|
10262
10269
|
};
|
|
10263
10270
|
return createVNode("div", {
|
|
10264
|
-
"class": ns2.e("group")
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
}, [getContent()])]);
|
|
10271
|
+
"class": [ns2.e("group"), {
|
|
10272
|
+
"is-row": props.direction === "row",
|
|
10273
|
+
"is-column": props.direction === "column"
|
|
10274
|
+
}]
|
|
10275
|
+
}, [getContent()]);
|
|
10270
10276
|
};
|
|
10271
10277
|
}
|
|
10272
10278
|
});
|
|
@@ -10494,6 +10500,7 @@ var DTreeNode = defineComponent({
|
|
|
10494
10500
|
};
|
|
10495
10501
|
}
|
|
10496
10502
|
});
|
|
10503
|
+
const DEFAULT_ITEM_HEIGHT = 20;
|
|
10497
10504
|
const virtualListProps = {
|
|
10498
10505
|
data: {
|
|
10499
10506
|
type: Array,
|
|
@@ -10509,7 +10516,7 @@ const virtualListProps = {
|
|
|
10509
10516
|
},
|
|
10510
10517
|
itemHeight: {
|
|
10511
10518
|
type: Number,
|
|
10512
|
-
default:
|
|
10519
|
+
default: DEFAULT_ITEM_HEIGHT
|
|
10513
10520
|
},
|
|
10514
10521
|
virtual: {
|
|
10515
10522
|
type: Boolean,
|
|
@@ -10568,19 +10575,17 @@ const resizeObserverProps = {
|
|
|
10568
10575
|
}
|
|
10569
10576
|
};
|
|
10570
10577
|
function useVirtual(props) {
|
|
10578
|
+
const {
|
|
10579
|
+
height,
|
|
10580
|
+
data,
|
|
10581
|
+
itemHeight,
|
|
10582
|
+
virtual
|
|
10583
|
+
} = toRefs(props);
|
|
10571
10584
|
const isVirtual = computed(() => {
|
|
10572
|
-
|
|
10573
|
-
height,
|
|
10574
|
-
virtual
|
|
10575
|
-
} = props;
|
|
10576
|
-
return !!(virtual !== false && height);
|
|
10585
|
+
return Boolean(virtual.value !== false && height.value);
|
|
10577
10586
|
});
|
|
10578
10587
|
const inVirtual = computed(() => {
|
|
10579
|
-
|
|
10580
|
-
height,
|
|
10581
|
-
data
|
|
10582
|
-
} = props;
|
|
10583
|
-
return isVirtual.value && data && 20 * data.length > height;
|
|
10588
|
+
return Boolean(isVirtual.value && data.value.length && itemHeight.value * data.value.length > height.value);
|
|
10584
10589
|
});
|
|
10585
10590
|
return {
|
|
10586
10591
|
isVirtual,
|
|
@@ -10911,7 +10916,6 @@ var ResizeObserverContainer = defineComponent({
|
|
|
10911
10916
|
};
|
|
10912
10917
|
innerStyle.value = __spreadProps(__spreadValues({}, innerStyle.value), {
|
|
10913
10918
|
transform: `translateY(${offset2.value}px)`,
|
|
10914
|
-
position: "absolute",
|
|
10915
10919
|
left: 0,
|
|
10916
10920
|
right: 0,
|
|
10917
10921
|
top: 0
|
|
@@ -11178,7 +11182,6 @@ const ScrollStyle = {
|
|
|
11178
11182
|
overflowY: "auto",
|
|
11179
11183
|
overflowAnchor: "none"
|
|
11180
11184
|
};
|
|
11181
|
-
const DEFAULT_HEIGHT = 20;
|
|
11182
11185
|
var VirtualList = defineComponent({
|
|
11183
11186
|
name: "DVirtualList",
|
|
11184
11187
|
props: virtualListProps,
|
|
@@ -11287,7 +11290,7 @@ var VirtualList = defineComponent({
|
|
|
11287
11290
|
cacheHeight = heights.get(key);
|
|
11288
11291
|
}
|
|
11289
11292
|
if (cacheHeight === void 0) {
|
|
11290
|
-
cacheHeight = props.itemHeight ||
|
|
11293
|
+
cacheHeight = props.itemHeight || DEFAULT_ITEM_HEIGHT;
|
|
11291
11294
|
}
|
|
11292
11295
|
const currentItemBottom = itemTop + cacheHeight;
|
|
11293
11296
|
if (startIndex === void 0 && currentItemBottom >= scrollTop) {
|
|
@@ -11423,7 +11426,7 @@ var VirtualList = defineComponent({
|
|
|
11423
11426
|
});
|
|
11424
11427
|
ctx.expose({
|
|
11425
11428
|
scrollTo(index2) {
|
|
11426
|
-
syncScrollTop(index2 * (props.itemHeight ||
|
|
11429
|
+
syncScrollTop(index2 * (props.itemHeight || DEFAULT_ITEM_HEIGHT));
|
|
11427
11430
|
}
|
|
11428
11431
|
});
|
|
11429
11432
|
return () => {
|
|
@@ -11519,7 +11522,8 @@ var Tree = defineComponent({
|
|
|
11519
11522
|
"data": treeNode,
|
|
11520
11523
|
"check": check.value,
|
|
11521
11524
|
"dragdrop": dragdrop.value,
|
|
11522
|
-
"operate": operate.value
|
|
11525
|
+
"operate": operate.value,
|
|
11526
|
+
"key": treeNode.id
|
|
11523
11527
|
}, {
|
|
11524
11528
|
default: () => slots.content ? renderSlot(useSlots(), "content", {
|
|
11525
11529
|
nodeData: treeNode
|
|
@@ -11537,11 +11541,9 @@ var Tree = defineComponent({
|
|
|
11537
11541
|
}) : createVNode(DTreeNodeLoading, null, null)
|
|
11538
11542
|
});
|
|
11539
11543
|
return () => {
|
|
11540
|
-
const Component = props.height ? VirtualList : "div";
|
|
11541
11544
|
const treeData = getExpendedTree == null ? void 0 : getExpendedTree().value;
|
|
11542
11545
|
const vSlotsProps = {
|
|
11543
|
-
|
|
11544
|
-
item: props.height && ((treeNode) => renderDTreeNode(treeNode))
|
|
11546
|
+
item: (treeNode) => renderDTreeNode(treeNode)
|
|
11545
11547
|
};
|
|
11546
11548
|
let virtualListProps2 = {};
|
|
11547
11549
|
if (props.height) {
|
|
@@ -11551,10 +11553,17 @@ var Tree = defineComponent({
|
|
|
11551
11553
|
itemHeight: NODE_HEIGHT
|
|
11552
11554
|
};
|
|
11553
11555
|
}
|
|
11554
|
-
return createVNode(
|
|
11555
|
-
"ref":
|
|
11556
|
+
return props.height ? createVNode(VirtualList, mergeProps({
|
|
11557
|
+
"ref": virtualListRef,
|
|
11558
|
+
"class": ns2.b()
|
|
11559
|
+
}, virtualListProps2), vSlotsProps) : createVNode("div", {
|
|
11560
|
+
"ref": normalRef,
|
|
11556
11561
|
"class": ns2.b()
|
|
11557
|
-
},
|
|
11562
|
+
}, [createVNode(TransitionGroup, {
|
|
11563
|
+
"name": ns2.m("list")
|
|
11564
|
+
}, {
|
|
11565
|
+
default: () => [treeData == null ? void 0 : treeData.map(renderDTreeNode)]
|
|
11566
|
+
})]);
|
|
11558
11567
|
};
|
|
11559
11568
|
}
|
|
11560
11569
|
});
|