vue-devui 1.0.0-rc.0 → 1.0.0-rc.11
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 +78 -116
- package/alert/index.es.js +74 -45
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +8190 -296
- package/auto-complete/index.umd.js +29 -1
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +153 -146
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.es.js +34 -5
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5741 -127
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.es.js +63 -35
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +8068 -255
- package/checkbox/index.umd.js +27 -1
- package/checkbox/style.css +1 -1
- package/{accordion → collapse}/index.d.ts +0 -0
- package/collapse/index.es.js +379 -0
- package/collapse/index.umd.js +1 -0
- package/{anchor → collapse}/package.json +1 -1
- package/collapse/style.css +1 -0
- package/countdown/index.es.js +5 -7
- package/countdown/index.umd.js +1 -1
- package/date-picker/index.es.js +8167 -288
- package/date-picker/index.umd.js +27 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +31 -4
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +297 -181
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +525 -154
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +1048 -1176
- package/form/index.umd.js +16 -16
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +42 -21
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.es.js +101 -86
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +197 -56
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +55 -31
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +8074 -144
- package/input/index.umd.js +27 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +269 -183
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +40 -25
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.es.js +74 -35
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/modal/index.es.js +412 -204
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +307 -57
- 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/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/DropdownPropsKey.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/IconGroup.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/LoadingOptions.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/RadioButton.js +3 -0
- package/nuxt/components/TABLE_TOKEN.js +3 -0
- package/nuxt/components/Tab.js +3 -0
- package/nuxt/components/TimeSelect.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/autoCompleteProps.js +3 -0
- package/nuxt/components/avatarProps.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.js +3 -0
- package/nuxt/components/cardProps.js +3 -0
- package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
- package/nuxt/components/checkboxGroupProps.js +3 -0
- package/nuxt/components/checkboxProps.js +3 -0
- package/nuxt/components/colProps.js +3 -0
- package/nuxt/components/colPropsBaseClass.js +3 -0
- package/nuxt/components/colPropsBaseStyle.js +3 -0
- package/nuxt/components/collapseItemProps.js +3 -0
- package/nuxt/components/collapseProps.js +3 -0
- package/nuxt/components/countdownProps.js +3 -0
- package/nuxt/components/editableSelectProps.js +3 -0
- package/nuxt/components/formItemProps.js +3 -0
- package/nuxt/components/formProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +3 -0
- package/nuxt/components/imagePreviewProps.js +3 -0
- package/nuxt/components/inputProps.js +3 -0
- package/nuxt/components/loadingProps.js +3 -0
- package/nuxt/components/modalProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/progressProps.js +3 -0
- package/nuxt/components/rateProps.js +3 -0
- package/nuxt/components/resultProps.js +3 -0
- package/nuxt/components/rowProps.js +3 -0
- package/nuxt/components/screenSizes.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/skeletonProps.js +3 -0
- package/nuxt/components/sliderProps.js +3 -0
- package/nuxt/components/splitterProps.js +3 -0
- package/nuxt/components/statisticProps.js +3 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/nuxt/components/switchProps.js +3 -0
- package/nuxt/components/tableProps.js +3 -0
- package/nuxt/components/tabsProps.js +3 -0
- package/nuxt/components/tagProps.js +3 -0
- package/nuxt/components/textareaProps.js +3 -0
- package/nuxt/components/timeAxisProps.js +3 -0
- package/nuxt/components/treeProps.js +3 -0
- package/overlay/index.es.js +127 -149
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +11 -44
- package/pagination/index.es.js +158 -148
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/panel/style.css +1 -1
- package/popover/index.es.js +317 -246
- package/popover/index.umd.js +15 -15
- package/popover/style.css +1 -1
- package/progress/index.es.js +110 -56
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +7972 -157
- package/radio/index.umd.js +27 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +77 -55
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +184 -57
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/ripple/index.es.js +47 -42
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +3653 -1122
- package/search/index.umd.js +18 -18
- package/search/style.css +1 -1
- package/select/index.es.js +9170 -596
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +63 -41
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +144 -137
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +469 -349
- package/splitter/index.umd.js +15 -15
- package/splitter/style.css +1 -1
- package/statistic/index.es.js +41 -34
- package/statistic/index.umd.js +1 -1
- package/statistic/style.css +1 -1
- package/status/index.es.js +27 -6
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +7802 -64
- package/switch/index.umd.js +27 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +10459 -1511
- package/table/index.umd.js +27 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +344 -141
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +49 -24
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +7921 -83
- package/textarea/index.umd.js +35 -1
- package/textarea/style.css +1 -1
- package/{anchor → time-select}/index.d.ts +0 -0
- package/{color-picker → time-select}/index.es.js +4171 -2898
- package/time-select/index.umd.js +27 -0
- package/{breadcrumb → time-select}/package.json +1 -1
- package/time-select/style.css +1 -0
- package/{back-top → timeline}/index.d.ts +0 -0
- package/timeline/index.es.js +425 -0
- package/timeline/index.umd.js +1 -0
- package/{back-top → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +308 -236
- package/tooltip/index.umd.js +15 -15
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +5198 -1850
- package/tree/index.umd.js +18 -18
- package/tree/style.css +1 -1
- package/upload/index.es.js +427 -132
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +12064 -15841
- package/vue-devui.umd.js +30 -20
- package/accordion/index.es.js +0 -720
- package/accordion/index.umd.js +0 -1
- package/accordion/package.json +0 -7
- package/accordion/style.css +0 -1
- package/anchor/index.es.js +0 -263
- package/anchor/index.umd.js +0 -1
- package/anchor/style.css +0 -1
- package/back-top/index.es.js +0 -128
- package/back-top/index.umd.js +0 -1
- package/back-top/style.css +0 -1
- package/breadcrumb/index.d.ts +0 -7
- package/breadcrumb/index.es.js +0 -127
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/style.css +0 -1
- package/carousel/index.d.ts +0 -7
- package/carousel/index.es.js +0 -329
- package/carousel/index.umd.js +0 -1
- package/carousel/package.json +0 -7
- package/carousel/style.css +0 -1
- package/cascader/index.d.ts +0 -7
- package/cascader/index.es.js +0 -5963
- package/cascader/index.umd.js +0 -27
- package/cascader/package.json +0 -7
- package/cascader/style.css +0 -1
- package/color-picker/index.d.ts +0 -7
- package/color-picker/index.umd.js +0 -27
- package/color-picker/package.json +0 -7
- package/color-picker/style.css +0 -1
- package/comment/index.d.ts +0 -7
- package/comment/index.es.js +0 -86
- package/comment/index.umd.js +0 -1
- package/comment/package.json +0 -7
- package/comment/style.css +0 -1
- package/dragdrop/index.d.ts +0 -7
- package/dragdrop/index.es.js +0 -157
- package/dragdrop/index.umd.js +0 -1
- package/dragdrop/package.json +0 -7
- package/gantt/index.d.ts +0 -7
- package/gantt/index.es.js +0 -523
- package/gantt/index.umd.js +0 -1
- package/gantt/package.json +0 -7
- package/gantt/style.css +0 -1
- package/input-icon/index.d.ts +0 -7
- package/input-icon/index.es.js +0 -331
- package/input-icon/index.umd.js +0 -1
- package/input-icon/package.json +0 -7
- package/input-icon/style.css +0 -1
- package/list/index.d.ts +0 -7
- package/list/index.es.js +0 -39
- package/list/index.umd.js +0 -1
- package/list/package.json +0 -7
- package/list/style.css +0 -1
- package/nav-sprite/index.d.ts +0 -7
- package/nav-sprite/index.es.js +0 -68
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/nuxt/components/Accordion.js +0 -3
- package/nuxt/components/Anchor.js +0 -3
- package/nuxt/components/BackTop.js +0 -3
- package/nuxt/components/Breadcrumb.js +0 -3
- package/nuxt/components/Carousel.js +0 -3
- package/nuxt/components/CarouselItem.js +0 -3
- package/nuxt/components/Cascader.js +0 -3
- package/nuxt/components/ColorPicker.js +0 -3
- package/nuxt/components/Comment.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/List.js +0 -3
- package/nuxt/components/ListItem.js +0 -3
- package/nuxt/components/NavSprite.js +0 -2
- package/nuxt/components/QuadrantDiagram.js +0 -3
- package/nuxt/components/ReadTip.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/TagInput.js +0 -3
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/TimePicker.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/nuxt/components/overlayEmits.js +0 -3
- package/nuxt/components/overlayProps.js +0 -3
- package/quadrant-diagram/index.d.ts +0 -7
- package/quadrant-diagram/index.es.js +0 -5728
- package/quadrant-diagram/index.umd.js +0 -27
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/read-tip/index.d.ts +0 -7
- package/read-tip/index.es.js +0 -258
- package/read-tip/index.umd.js +0 -1
- package/read-tip/package.json +0 -7
- package/read-tip/style.css +0 -1
- package/steps-guide/index.d.ts +0 -7
- package/steps-guide/index.es.js +0 -239
- package/steps-guide/index.umd.js +0 -1
- package/steps-guide/package.json +0 -7
- package/steps-guide/style.css +0 -1
- package/sticky/index.d.ts +0 -7
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/sticky/package.json +0 -7
- package/tag-input/index.d.ts +0 -7
- package/tag-input/index.es.js +0 -329
- package/tag-input/index.umd.js +0 -1
- package/tag-input/package.json +0 -7
- package/tag-input/style.css +0 -1
- package/time-axis/index.d.ts +0 -7
- package/time-axis/index.es.js +0 -299
- package/time-axis/index.umd.js +0 -1
- package/time-axis/package.json +0 -7
- package/time-axis/style.css +0 -1
- package/time-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1237
- package/time-picker/index.umd.js +0 -1
- package/time-picker/package.json +0 -7
- package/time-picker/style.css +0 -1
- package/transfer/index.d.ts +0 -7
- package/transfer/index.es.js +0 -7608
- package/transfer/index.umd.js +0 -27
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree-select/index.d.ts +0 -7
- package/tree-select/index.es.js +0 -623
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/tabs/index.es.js
CHANGED
|
@@ -1,194 +1,397 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { toRefs, computed, defineComponent, shallowRef, reactive, inject, onUpdated, onBeforeMount, onMounted, watch, createVNode, resolveComponent, provide, mergeProps, onUnmounted } from "vue";
|
|
2
|
+
const tabsProps = {
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: [String, Number],
|
|
5
|
+
default: null
|
|
6
|
+
},
|
|
7
|
+
type: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "tabs"
|
|
10
|
+
},
|
|
11
|
+
showContent: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: true
|
|
14
|
+
},
|
|
15
|
+
reactivable: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: true
|
|
18
|
+
},
|
|
19
|
+
customWidth: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
cssClass: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
beforeChange: {
|
|
28
|
+
type: Function,
|
|
29
|
+
default: null
|
|
30
|
+
},
|
|
31
|
+
closeable: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
35
|
+
addable: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
tabPosition: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "top"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
2
44
|
var tabs = "";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
function createBem(namespace, element, modifier) {
|
|
46
|
+
let cls = namespace;
|
|
47
|
+
if (element) {
|
|
48
|
+
cls += `__${element}`;
|
|
49
|
+
}
|
|
50
|
+
if (modifier) {
|
|
51
|
+
cls += `--${modifier}`;
|
|
52
|
+
}
|
|
53
|
+
return cls;
|
|
54
|
+
}
|
|
55
|
+
function useNamespace(block, needDot = false) {
|
|
56
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
57
|
+
const b = () => createBem(namespace);
|
|
58
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
59
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
60
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
61
|
+
return {
|
|
62
|
+
b,
|
|
63
|
+
e,
|
|
64
|
+
m,
|
|
65
|
+
em
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const ns$1 = useNamespace("tabs");
|
|
69
|
+
function useTabNavRender(props, data) {
|
|
70
|
+
const { cssClass, tabPosition, customWidth } = toRefs(props);
|
|
71
|
+
const ulClasses = computed(() => ({
|
|
72
|
+
[ns$1.e("nav")]: true,
|
|
73
|
+
[ns$1.em("nav", props.type)]: true,
|
|
74
|
+
[cssClass.value]: Boolean(cssClass.value),
|
|
75
|
+
[ns$1.em("nav", "top")]: tabPosition.value === "top",
|
|
76
|
+
[ns$1.em("nav", "right")]: tabPosition.value === "right",
|
|
77
|
+
[ns$1.em("nav", "bottom")]: tabPosition.value === "bottom",
|
|
78
|
+
[ns$1.em("nav", "left")]: tabPosition.value === "left"
|
|
79
|
+
}));
|
|
80
|
+
const aClasses = computed(() => ({
|
|
81
|
+
["custom-width"]: Boolean(customWidth.value)
|
|
82
|
+
}));
|
|
83
|
+
const customStyle = {
|
|
84
|
+
width: props.customWidth ? props.customWidth : ""
|
|
85
|
+
};
|
|
86
|
+
const sliderAnimationStyle = computed(() => {
|
|
87
|
+
if (["top", "bottom"].includes(props.tabPosition)) {
|
|
88
|
+
return {
|
|
89
|
+
left: data.offsetLeft + "px",
|
|
90
|
+
width: data.offsetWidth + "px"
|
|
91
|
+
};
|
|
92
|
+
} else {
|
|
93
|
+
return {
|
|
94
|
+
top: data.offsetTop + "px",
|
|
95
|
+
height: data.offsetHeight + "px",
|
|
96
|
+
width: data.offsetWidth + "px"
|
|
97
|
+
};
|
|
37
98
|
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
50
|
-
const state = reactive({
|
|
51
|
-
data: [],
|
|
52
|
-
active: props.modelValue,
|
|
53
|
-
showContent: props.showContent,
|
|
54
|
-
slots: []
|
|
55
|
-
});
|
|
56
|
-
provide("tabs", {
|
|
57
|
-
state
|
|
58
|
-
});
|
|
59
|
-
const canChange = function(currentTab) {
|
|
60
|
-
let changeResult = Promise.resolve(true);
|
|
61
|
-
if (typeof props.beforeChange === "function") {
|
|
62
|
-
const result = props.beforeChange(currentTab);
|
|
63
|
-
if (typeof result !== "undefined") {
|
|
64
|
-
if (result.then) {
|
|
65
|
-
changeResult = result;
|
|
99
|
+
});
|
|
100
|
+
return { ulClasses, aClasses, customStyle, sliderAnimationStyle };
|
|
101
|
+
}
|
|
102
|
+
function useTabNavFunction(props, tabs2, data, ctx, tabsEle) {
|
|
103
|
+
const update = () => {
|
|
104
|
+
if (props.type === "slider") {
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
const tabEle = tabsEle.value.querySelector("#" + props.modelValue + ".active");
|
|
107
|
+
if (tabEle) {
|
|
108
|
+
if (["top", "bottom"].includes(props.tabPosition)) {
|
|
109
|
+
data.offsetLeft = tabEle.getBoundingClientRect().left - tabsEle.value.getBoundingClientRect().left;
|
|
66
110
|
} else {
|
|
67
|
-
|
|
111
|
+
data.offsetTop = tabEle.getBoundingClientRect().top - tabsEle.value.getBoundingClientRect().top;
|
|
112
|
+
data.offsetHeight = tabEle.getBoundingClientRect().height;
|
|
68
113
|
}
|
|
114
|
+
data.offsetWidth = tabEle.getBoundingClientRect().width;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
const canChange = (currentTab) => {
|
|
120
|
+
let changeResult = Promise.resolve(true);
|
|
121
|
+
if (typeof props.beforeChange === "function") {
|
|
122
|
+
const result = props.beforeChange(currentTab);
|
|
123
|
+
if (typeof result !== "undefined") {
|
|
124
|
+
if (result.then) {
|
|
125
|
+
changeResult = result;
|
|
126
|
+
} else {
|
|
127
|
+
changeResult = Promise.resolve(result);
|
|
69
128
|
}
|
|
70
129
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
130
|
+
}
|
|
131
|
+
return changeResult;
|
|
132
|
+
};
|
|
133
|
+
const activeClick = (item, tabEl) => {
|
|
134
|
+
if (!props.reactivable && props.modelValue === item.id) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
canChange(item.id).then((change) => {
|
|
138
|
+
if (!change) {
|
|
75
139
|
return;
|
|
76
140
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this.offsetLeft = tabEl.getBoundingClientRect().left - this.tabsEle.nativeElement.getBoundingClientRect().left;
|
|
87
|
-
this.offsetWidth = tabEl.getBoundingClientRect().width;
|
|
141
|
+
const tab2 = tabs2.state.data.find((itemOption) => itemOption.id === item.id);
|
|
142
|
+
if (tab2 && !tab2.disabled) {
|
|
143
|
+
tabs2.state.active = item.id;
|
|
144
|
+
if (props.type === "slider" && tabEl && tabsEle) {
|
|
145
|
+
if (["left", "right"].includes(props.tabPosition)) {
|
|
146
|
+
data.offsetLeft = tabEl.getBoundingClientRect().left - tabsEle.value.nativeElement.getBoundingClientRect().left;
|
|
147
|
+
} else {
|
|
148
|
+
data.offsetTop = tabEl.getBoundingClientRect().top - tabsEle.value.nativeElement.getBoundingClientRect().top;
|
|
149
|
+
data.offsetHeight = tabEl.getBoundingClientRect().height;
|
|
88
150
|
}
|
|
89
|
-
|
|
151
|
+
data.offsetWidth = tabEl.getBoundingClientRect().width;
|
|
90
152
|
}
|
|
91
|
-
|
|
92
|
-
};
|
|
93
|
-
const ulClass = [props.type];
|
|
94
|
-
props.cssClass && ulClass.push(props.cssClass);
|
|
95
|
-
props.vertical && ulClass.push("devui-nav-stacked");
|
|
96
|
-
onUpdated(() => {
|
|
97
|
-
if (props.type === "slider") {
|
|
98
|
-
setTimeout(() => {
|
|
99
|
-
const tabEle = tabsEle.value.querySelector("#" + props.modelValue + ".active");
|
|
100
|
-
if (tabEle) {
|
|
101
|
-
data.offsetLeft = tabEle.getBoundingClientRect().left - tabsEle.value.getBoundingClientRect().left;
|
|
102
|
-
data.offsetWidth = tabEle.getBoundingClientRect().width;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
153
|
+
ctx.emit("active-tab-change", tab2.id);
|
|
105
154
|
}
|
|
106
155
|
});
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
156
|
+
};
|
|
157
|
+
const beforeMount = () => {
|
|
158
|
+
if (props.type !== "slider" && props.modelValue === void 0 && tabs2.state.data.length > 0) {
|
|
159
|
+
activeClick(tabs2.state.data[0]);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
const mounted = () => {
|
|
163
|
+
if (props.type === "slider" && props.modelValue === void 0 && tabs2.state.data.length > 0 && tabs2.state.data[0]) {
|
|
164
|
+
activeClick(tabs2.state.data[0].tabsEle.value.getElementById(tabs2.state.data[0].tabId));
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
const tabCanClose = (item) => {
|
|
168
|
+
return (props.closeable || item.closeable) && !item.disabled;
|
|
169
|
+
};
|
|
170
|
+
return { update, activeClick, beforeMount, mounted, tabCanClose };
|
|
171
|
+
}
|
|
172
|
+
function useTabNavEvent(ctx) {
|
|
173
|
+
const onTabRemove = (item, ev) => {
|
|
174
|
+
ev.stopPropagation();
|
|
175
|
+
ctx.emit("tab-remove", item, ev);
|
|
176
|
+
ctx.emit("tab-change", item.id, "delete");
|
|
177
|
+
};
|
|
178
|
+
const onTabAdd = () => {
|
|
179
|
+
ctx.emit("tab-add");
|
|
180
|
+
ctx.emit("tab-change", void 0, "add");
|
|
181
|
+
};
|
|
182
|
+
return { onTabRemove, onTabAdd };
|
|
183
|
+
}
|
|
184
|
+
var tabNav = "";
|
|
185
|
+
var TabNav = defineComponent({
|
|
186
|
+
name: "DTabNav",
|
|
187
|
+
props: tabsProps,
|
|
188
|
+
emits: ["active-tab-change", "tab-remove", "tab-add", "tab-change"],
|
|
189
|
+
setup(props, ctx) {
|
|
190
|
+
const ns2 = useNamespace("tabs");
|
|
191
|
+
const tabsEle = shallowRef();
|
|
192
|
+
const data = reactive({
|
|
193
|
+
offsetLeft: 0,
|
|
194
|
+
offsetWidth: 0,
|
|
195
|
+
offsetTop: 0,
|
|
196
|
+
offsetHeight: 0,
|
|
197
|
+
id: null
|
|
111
198
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
199
|
+
const tabs2 = inject("tabs");
|
|
200
|
+
const {
|
|
201
|
+
ulClasses,
|
|
202
|
+
aClasses,
|
|
203
|
+
customStyle,
|
|
204
|
+
sliderAnimationStyle
|
|
205
|
+
} = useTabNavRender(props, data);
|
|
206
|
+
const {
|
|
207
|
+
update,
|
|
208
|
+
beforeMount,
|
|
209
|
+
mounted,
|
|
210
|
+
activeClick,
|
|
211
|
+
tabCanClose
|
|
212
|
+
} = useTabNavFunction(props, tabs2, data, ctx, tabsEle);
|
|
213
|
+
const {
|
|
214
|
+
onTabRemove,
|
|
215
|
+
onTabAdd
|
|
216
|
+
} = useTabNavEvent(ctx);
|
|
217
|
+
onUpdated(() => update());
|
|
218
|
+
onBeforeMount(() => beforeMount());
|
|
219
|
+
onMounted(() => mounted());
|
|
220
|
+
watch(() => props.modelValue, () => {
|
|
221
|
+
var _a;
|
|
222
|
+
const tab2 = (_a = tabs2 == null ? void 0 : tabs2.state.data) == null ? void 0 : _a.find((item) => item.id === props.modelValue);
|
|
223
|
+
if (tab2) {
|
|
224
|
+
activeClick(tab2);
|
|
115
225
|
}
|
|
116
226
|
});
|
|
117
227
|
return () => {
|
|
118
|
-
|
|
228
|
+
const closeIconEl = (item) => {
|
|
229
|
+
return tabCanClose(item) ? createVNode("span", {
|
|
230
|
+
"class": ns2.e("close-btn"),
|
|
231
|
+
"onClick": (ev) => onTabRemove(item, ev)
|
|
232
|
+
}, [createVNode(resolveComponent("d-icon"), {
|
|
233
|
+
"size": "12px",
|
|
234
|
+
"name": "error-o"
|
|
235
|
+
}, null)]) : null;
|
|
236
|
+
};
|
|
237
|
+
const newButton = props.addable ? createVNode("li", {
|
|
238
|
+
"class": ns2.e("new-tab"),
|
|
239
|
+
"onClick": onTabAdd
|
|
240
|
+
}, [createVNode(resolveComponent("d-icon"), {
|
|
241
|
+
"name": "add"
|
|
242
|
+
}, null)]) : null;
|
|
243
|
+
return createVNode("ul", {
|
|
119
244
|
"ref": tabsEle,
|
|
120
245
|
"role": "tablist",
|
|
121
|
-
"class":
|
|
122
|
-
|
|
123
|
-
}, [state.data.map((item, i) => {
|
|
246
|
+
"class": ulClasses.value
|
|
247
|
+
}, [((tabs2 == null ? void 0 : tabs2.state.data) || []).map((item, i) => {
|
|
124
248
|
return createVNode("li", {
|
|
125
249
|
"role": "presentation",
|
|
126
250
|
"onClick": () => {
|
|
127
251
|
activeClick(item);
|
|
128
252
|
},
|
|
129
|
-
"class": (props.modelValue === (item.id || item.tabId) ? "active" : "") +
|
|
253
|
+
"class": (props.modelValue === (item.id || item.tabId) ? "active" : "") + (item.disabled ? " disabled" : ""),
|
|
130
254
|
"id": item.id || item.tabId
|
|
255
|
+
}, [createVNode("span", {
|
|
256
|
+
"class": ns2.e("nav-content")
|
|
131
257
|
}, [createVNode("a", {
|
|
132
258
|
"role": "tab",
|
|
133
259
|
"data-toggle": item.id,
|
|
134
|
-
"aria-expanded": props.modelValue === (item.id || item.tabId)
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
260
|
+
"aria-expanded": props.modelValue === (item.id || item.tabId),
|
|
261
|
+
"class": aClasses.value,
|
|
262
|
+
"style": customStyle
|
|
263
|
+
}, [(tabs2 == null ? void 0 : tabs2.state.slots[i]) ? tabs2.state.slots[i]() : createVNode("span", null, [item.title])]), closeIconEl(item)])]);
|
|
264
|
+
}), newButton, createVNode("div", {
|
|
265
|
+
"class": ns2.e(`nav-${props.type}-animation`),
|
|
266
|
+
"style": sliderAnimationStyle.value
|
|
267
|
+
}, null)]);
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
const ns = useNamespace("tabs");
|
|
272
|
+
function useTabsEvent(ctx) {
|
|
273
|
+
const onUpdateModelValue = (value) => {
|
|
274
|
+
ctx.emit("update:modelValue", value);
|
|
275
|
+
};
|
|
276
|
+
const onActiveTabChange = (value) => {
|
|
277
|
+
ctx.emit("active-tab-change", value);
|
|
278
|
+
};
|
|
279
|
+
const onTabRemove = (item, ev) => {
|
|
280
|
+
ctx.emit("tab-remove", item, ev);
|
|
281
|
+
};
|
|
282
|
+
const onTabAdd = () => {
|
|
283
|
+
ctx.emit("tab-add");
|
|
284
|
+
};
|
|
285
|
+
const onTabChange = (id, type) => {
|
|
286
|
+
ctx.emit("tab-change", id, type);
|
|
287
|
+
};
|
|
288
|
+
return { onUpdateModelValue, onActiveTabChange, onTabRemove, onTabAdd, onTabChange };
|
|
289
|
+
}
|
|
290
|
+
function useTabsRender(props) {
|
|
291
|
+
const tabsClasses = computed(() => ({
|
|
292
|
+
[ns.b()]: true,
|
|
293
|
+
[ns.m(props.tabPosition)]: true
|
|
294
|
+
}));
|
|
295
|
+
return { tabsClasses };
|
|
296
|
+
}
|
|
297
|
+
var Tabs = defineComponent({
|
|
298
|
+
name: "DTabs",
|
|
299
|
+
props: tabsProps,
|
|
300
|
+
emits: ["update:modelValue", "active-tab-change", "tab-remove", "tab-add", "tab-change"],
|
|
301
|
+
setup(props, ctx) {
|
|
302
|
+
const state = reactive({
|
|
303
|
+
data: [],
|
|
304
|
+
active: props.modelValue,
|
|
305
|
+
showContent: props.showContent,
|
|
306
|
+
slots: []
|
|
307
|
+
});
|
|
308
|
+
provide("tabs", {
|
|
309
|
+
state
|
|
310
|
+
});
|
|
311
|
+
const {
|
|
312
|
+
onUpdateModelValue,
|
|
313
|
+
onActiveTabChange,
|
|
314
|
+
onTabRemove,
|
|
315
|
+
onTabAdd,
|
|
316
|
+
onTabChange
|
|
317
|
+
} = useTabsEvent(ctx);
|
|
318
|
+
const {
|
|
319
|
+
tabsClasses
|
|
320
|
+
} = useTabsRender(props);
|
|
321
|
+
watch(() => state.active, () => {
|
|
322
|
+
onUpdateModelValue(state.active);
|
|
323
|
+
});
|
|
324
|
+
return () => {
|
|
325
|
+
var _a, _b;
|
|
326
|
+
const tabNav2 = createVNode(TabNav, mergeProps(props, {
|
|
327
|
+
"onActiveTabChange": onActiveTabChange,
|
|
328
|
+
"onTabRemove": onTabRemove,
|
|
329
|
+
"onTabAdd": onTabAdd,
|
|
330
|
+
"onTabChange": onTabChange
|
|
331
|
+
}), null);
|
|
332
|
+
const content = (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a);
|
|
333
|
+
return createVNode("div", {
|
|
334
|
+
"class": tabsClasses.value
|
|
335
|
+
}, [props.tabPosition === "bottom" ? [content, tabNav2] : [tabNav2, content], createVNode("div", {
|
|
336
|
+
"style": "clear: both"
|
|
337
|
+
}, null)]);
|
|
143
338
|
};
|
|
144
339
|
}
|
|
145
340
|
});
|
|
341
|
+
const tabProps = {
|
|
342
|
+
title: {
|
|
343
|
+
type: [String, Number],
|
|
344
|
+
default: null
|
|
345
|
+
},
|
|
346
|
+
id: {
|
|
347
|
+
type: String,
|
|
348
|
+
default: null
|
|
349
|
+
},
|
|
350
|
+
disabled: {
|
|
351
|
+
type: Boolean,
|
|
352
|
+
default: false
|
|
353
|
+
},
|
|
354
|
+
closeable: {
|
|
355
|
+
type: Boolean,
|
|
356
|
+
default: false
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
var tab = "";
|
|
146
360
|
var Tab = defineComponent({
|
|
147
361
|
name: "DTab",
|
|
148
|
-
props:
|
|
149
|
-
title: {
|
|
150
|
-
default: null,
|
|
151
|
-
type: [String, Number]
|
|
152
|
-
},
|
|
153
|
-
id: {
|
|
154
|
-
default: null,
|
|
155
|
-
type: String
|
|
156
|
-
},
|
|
157
|
-
disabled: {
|
|
158
|
-
type: Boolean,
|
|
159
|
-
default: false
|
|
160
|
-
}
|
|
161
|
-
},
|
|
362
|
+
props: tabProps,
|
|
162
363
|
setup(props, {
|
|
163
364
|
slots
|
|
164
365
|
}) {
|
|
366
|
+
var _a;
|
|
165
367
|
const tabs2 = inject("tabs");
|
|
166
|
-
tabs2.state.slots.push(slots.title);
|
|
167
|
-
tabs2.state.data.push(props);
|
|
368
|
+
tabs2 == null ? void 0 : tabs2.state.slots.push(slots.title);
|
|
369
|
+
(_a = tabs2 == null ? void 0 : tabs2.state.data) == null ? void 0 : _a.push(props);
|
|
370
|
+
const ns2 = useNamespace("tab");
|
|
371
|
+
onUnmounted(() => {
|
|
372
|
+
tabs2.state.data = tabs2.state.data.filter((tab2) => tab2.id !== props.id);
|
|
373
|
+
});
|
|
168
374
|
return () => {
|
|
375
|
+
var _a2;
|
|
169
376
|
const {
|
|
170
377
|
id
|
|
171
378
|
} = props;
|
|
172
379
|
const content = tabs2.state.showContent && tabs2.state.active === id ? createVNode("div", {
|
|
173
|
-
"class": "
|
|
380
|
+
"class": ns2.e("content")
|
|
174
381
|
}, [createVNode("div", {
|
|
175
|
-
"role": "tabpanel"
|
|
176
|
-
|
|
177
|
-
}, [slots.default()])]) : null;
|
|
382
|
+
"role": "tabpanel"
|
|
383
|
+
}, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])]) : null;
|
|
178
384
|
return content;
|
|
179
385
|
};
|
|
180
386
|
}
|
|
181
387
|
});
|
|
182
|
-
Tabs.install = function(app) {
|
|
183
|
-
app.component(Tabs.name, Tabs);
|
|
184
|
-
app.component(Tab.name, Tab);
|
|
185
|
-
};
|
|
186
388
|
var index = {
|
|
187
389
|
title: "Tabs \u9009\u9879\u5361",
|
|
188
390
|
category: "\u5BFC\u822A",
|
|
189
391
|
status: "60%",
|
|
190
392
|
install(app) {
|
|
191
|
-
app.
|
|
393
|
+
app.component(Tabs.name, Tabs);
|
|
394
|
+
app.component(Tab.name, Tab);
|
|
192
395
|
}
|
|
193
396
|
};
|
|
194
|
-
export { Tabs, index as default };
|
|
397
|
+
export { Tab, Tabs, index as default, tabsProps };
|
package/tabs/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(r,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(r=typeof globalThis!="undefined"?globalThis:r||self,t(r.index={},r.Vue))})(this,function(r,t){"use strict";const N={modelValue:{type:[String,Number],default:null},type:{type:String,default:"tabs"},showContent:{type:Boolean,default:!0},reactivable:{type:Boolean,default:!0},customWidth:{type:String,default:""},cssClass:{type:String,default:""},beforeChange:{type:Function,default:null},closeable:{type:Boolean,default:!1},addable:{type:Boolean,default:!1},tabPosition:{type:String,default:"top"}};var L="";function T(e,a,n){let s=e;return a&&(s+=`__${a}`),n&&(s+=`--${n}`),s}function y(e,a=!1){const n=a?`.devui-${e}`:`devui-${e}`;return{b:()=>T(n),e:o=>o?T(n,o):"",m:o=>o?T(n,"",o):"",em:(o,b)=>o&&b?T(n,o,b):""}}const g=y("tabs");function S(e,a){const{cssClass:n,tabPosition:s,customWidth:i}=t.toRefs(e),l=t.computed(()=>({[g.e("nav")]:!0,[g.em("nav",e.type)]:!0,[n.value]:Boolean(n.value),[g.em("nav","top")]:s.value==="top",[g.em("nav","right")]:s.value==="right",[g.em("nav","bottom")]:s.value==="bottom",[g.em("nav","left")]:s.value==="left"})),c=t.computed(()=>({["custom-width"]:Boolean(i.value)})),o={width:e.customWidth?e.customWidth:""},b=t.computed(()=>["top","bottom"].includes(e.tabPosition)?{left:a.offsetLeft+"px",width:a.offsetWidth+"px"}:{top:a.offsetTop+"px",height:a.offsetHeight+"px",width:a.offsetWidth+"px"});return{ulClasses:l,aClasses:c,customStyle:o,sliderAnimationStyle:b}}function M(e,a,n,s,i){const l=()=>{e.type==="slider"&&setTimeout(()=>{const d=i.value.querySelector("#"+e.modelValue+".active");d&&(["top","bottom"].includes(e.tabPosition)?n.offsetLeft=d.getBoundingClientRect().left-i.value.getBoundingClientRect().left:(n.offsetTop=d.getBoundingClientRect().top-i.value.getBoundingClientRect().top,n.offsetHeight=d.getBoundingClientRect().height),n.offsetWidth=d.getBoundingClientRect().width)})},c=d=>{let f=Promise.resolve(!0);if(typeof e.beforeChange=="function"){const m=e.beforeChange(d);typeof m!="undefined"&&(m.then?f=m:f=Promise.resolve(m))}return f},o=(d,f)=>{!e.reactivable&&e.modelValue===d.id||c(d.id).then(m=>{if(!m)return;const C=a.state.data.find(P=>P.id===d.id);C&&!C.disabled&&(a.state.active=d.id,e.type==="slider"&&f&&i&&(["left","right"].includes(e.tabPosition)?n.offsetLeft=f.getBoundingClientRect().left-i.value.nativeElement.getBoundingClientRect().left:(n.offsetTop=f.getBoundingClientRect().top-i.value.nativeElement.getBoundingClientRect().top,n.offsetHeight=f.getBoundingClientRect().height),n.offsetWidth=f.getBoundingClientRect().width),s.emit("active-tab-change",C.id))})};return{update:l,activeClick:o,beforeMount:()=>{e.type!=="slider"&&e.modelValue===void 0&&a.state.data.length>0&&o(a.state.data[0])},mounted:()=>{e.type==="slider"&&e.modelValue===void 0&&a.state.data.length>0&&a.state.data[0]&&o(a.state.data[0].tabsEle.value.getElementById(a.state.data[0].tabId))},tabCanClose:d=>(e.closeable||d.closeable)&&!d.disabled}}function W(e){return{onTabRemove:(s,i)=>{i.stopPropagation(),e.emit("tab-remove",s,i),e.emit("tab-change",s.id,"delete")},onTabAdd:()=>{e.emit("tab-add"),e.emit("tab-change",void 0,"add")}}}var _="",I=t.defineComponent({name:"DTabNav",props:N,emits:["active-tab-change","tab-remove","tab-add","tab-change"],setup(e,a){const n=y("tabs"),s=t.shallowRef(),i=t.reactive({offsetLeft:0,offsetWidth:0,offsetTop:0,offsetHeight:0,id:null}),l=t.inject("tabs"),{ulClasses:c,aClasses:o,customStyle:b,sliderAnimationStyle:h}=S(e,i),{update:v,beforeMount:d,mounted:f,activeClick:m,tabCanClose:C}=M(e,l,i,a,s),{onTabRemove:P,onTabAdd:H}=W(a);return t.onUpdated(()=>v()),t.onBeforeMount(()=>d()),t.onMounted(()=>f()),t.watch(()=>e.modelValue,()=>{var p;const V=(p=l==null?void 0:l.state.data)==null?void 0:p.find(u=>u.id===e.modelValue);V&&m(V)}),()=>{const V=u=>C(u)?t.createVNode("span",{class:n.e("close-btn"),onClick:B=>P(u,B)},[t.createVNode(t.resolveComponent("d-icon"),{size:"12px",name:"error-o"},null)]):null,p=e.addable?t.createVNode("li",{class:n.e("new-tab"),onClick:H},[t.createVNode(t.resolveComponent("d-icon"),{name:"add"},null)]):null;return t.createVNode("ul",{ref:s,role:"tablist",class:c.value},[((l==null?void 0:l.state.data)||[]).map((u,B)=>t.createVNode("li",{role:"presentation",onClick:()=>{m(u)},class:(e.modelValue===(u.id||u.tabId)?"active":"")+(u.disabled?" disabled":""),id:u.id||u.tabId},[t.createVNode("span",{class:n.e("nav-content")},[t.createVNode("a",{role:"tab","data-toggle":u.id,"aria-expanded":e.modelValue===(u.id||u.tabId),class:o.value,style:b},[(l==null?void 0:l.state.slots[B])?l.state.slots[B]():t.createVNode("span",null,[u.title])]),V(u)])])),p,t.createVNode("div",{class:n.e(`nav-${e.type}-animation`),style:h.value},null)])}}});const A=y("tabs");function $(e){return{onUpdateModelValue:c=>{e.emit("update:modelValue",c)},onActiveTabChange:c=>{e.emit("active-tab-change",c)},onTabRemove:(c,o)=>{e.emit("tab-remove",c,o)},onTabAdd:()=>{e.emit("tab-add")},onTabChange:(c,o)=>{e.emit("tab-change",c,o)}}}function U(e){return{tabsClasses:t.computed(()=>({[A.b()]:!0,[A.m(e.tabPosition)]:!0}))}}var R=t.defineComponent({name:"DTabs",props:N,emits:["update:modelValue","active-tab-change","tab-remove","tab-add","tab-change"],setup(e,a){const n=t.reactive({data:[],active:e.modelValue,showContent:e.showContent,slots:[]});t.provide("tabs",{state:n});const{onUpdateModelValue:s,onActiveTabChange:i,onTabRemove:l,onTabAdd:c,onTabChange:o}=$(a),{tabsClasses:b}=U(e);return t.watch(()=>n.active,()=>{s(n.active)}),()=>{var d,f;const h=t.createVNode(I,t.mergeProps(e,{onActiveTabChange:i,onTabRemove:l,onTabAdd:c,onTabChange:o}),null),v=(f=(d=a.slots).default)==null?void 0:f.call(d);return t.createVNode("div",{class:b.value},[e.tabPosition==="bottom"?[v,h]:[h,v],t.createVNode("div",{style:"clear: both"},null)])}}});const j={title:{type:[String,Number],default:null},id:{type:String,default:null},disabled:{type:Boolean,default:!1},closeable:{type:Boolean,default:!1}};var D="",w=t.defineComponent({name:"DTab",props:j,setup(e,{slots:a}){var i;const n=t.inject("tabs");n==null||n.state.slots.push(a.title),(i=n==null?void 0:n.state.data)==null||i.push(e);const s=y("tab");return t.onUnmounted(()=>{n.state.data=n.state.data.filter(l=>l.id!==e.id)}),()=>{var o;const{id:l}=e;return n.state.showContent&&n.state.active===l?t.createVNode("div",{class:s.e("content")},[t.createVNode("div",{role:"tabpanel"},[(o=a.default)==null?void 0:o.call(a)])]):null}}}),k={title:"Tabs \u9009\u9879\u5361",category:"\u5BFC\u822A",status:"60%",install(e){e.component(R.name,R),e.component(w.name,w)}};r.Tab=w,r.Tabs=R,r.default=k,r.tabsProps=N,Object.defineProperty(r,"__esModule",{value:!0}),r[Symbol.toStringTag]="Module"});
|
package/tabs/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:block}.devui-nav-tabs,.devui-nav-pills{font-size:var(--devui-font-size, 12px);background:transparent;font-weight:700;list-style:none}.devui-nav-tabs li,.devui-nav-pills li{cursor:pointer;border:2px solid transparent}.devui-nav-tabs li a,.devui-nav-pills li a{cursor:pointer;border:none;line-height:30px;background-color:transparent;padding:0;text-decoration:none;color:var(--devui-text, #252b3a)}.devui-nav-tabs li a:hover,.devui-nav-tabs li a:focus,.devui-nav-tabs li a:active,.devui-nav-pills li a:hover,.devui-nav-pills li a:focus,.devui-nav-pills li a:active{outline:none}.devui-nav-tabs li.disabled a,.devui-nav-pills li.disabled a{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-nav-tabs li.active a,.devui-nav-tabs li:hover:not(.disabled) a,.devui-nav-pills li.active a,.devui-nav-pills li:hover:not(.disabled) a{color:var(--devui-brand, #5e7ce0)}.devui-nav-tabs li:after,.devui-nav-pills li:after{content:"";display:block;margin:auto;height:2px;width:0;background:transparent;transition:width .3s ease-out,background-color .3s ease-out}.devui-nav-tabs li.active:after,.devui-nav-pills li.active:after{width:100%;background:var(--devui-brand, #5e7ce0)}.devui-nav-options{font-size:var(--devui-font-size, 12px);background:transparent;border:none;border-radius:var(--devui-border-radius, 2px)}.devui-nav-options>li{cursor:pointer;border:1px solid var(--devui-line, #adb0b8);border-left-width:0;background-color:var(--devui-base-bg, #ffffff);float:left}.devui-nav-options>li:first-child{border-left-width:1px;border-radius:var(--devui-border-radius, 2px) 0 0 var(--devui-border-radius, 2px)}.devui-nav-options>li:last-child{border-radius:0 var(--devui-border-radius, 2px) var(--devui-border-radius, 2px) 0}.devui-nav-options>li>a{cursor:pointer;border:none;color:var(--devui-text, #252b3a);line-height:26px;padding:0 15px}.devui-nav-options>li>a:hover,.devui-nav-options>li>a:focus,.devui-nav-options>li>a:active{outline:none}.devui-nav-options>li.disabled{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-nav-options>li.disabled a{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-nav-options>li.active>a,.devui-nav-options>li:hover:not(.disabled)>a{color:var(--devui-light-text, #ffffff)}.devui-nav-options>li.active>a:hover,.devui-nav-options>li:hover:not(.disabled)>a:hover{color:var(--devui-light-text, #ffffff);background:transparent}.devui-nav-options>li.active{background-color:var(--devui-brand, #5e7ce0);border-color:var(--devui-brand, #5e7ce0)}.devui-nav-options>li.active:not(:first-child):before{background-color:var(--devui-brand, #5e7ce0)}.devui-nav-options>li.active+li:before{background-color:var(--devui-brand, #5e7ce0)}.devui-nav-options>li:hover:not(.active):not(.disabled){background-color:var(--devui-brand-active, #526ecc);border-color:var(--devui-brand-active, #526ecc)}.devui-nav-options>li:hover:not(.active):not(.disabled):not(:first-child):before{background-color:var(--devui-brand-active, #526ecc)}.devui-nav-slider{font-size:var(--devui-font-size, 12px);border:none;border-radius:var(--devui-border-radius, 2px);background:var(--devui-list-item-hover-bg, #f2f5fc);width:fit-content;display:flex!important;align-items:center;position:relative}.devui-nav-slider>li{cursor:pointer;margin:2px;float:left;position:relative;z-index:1}.devui-nav-slider>li:first-child{border-left-width:1px;border-radius:var(--devui-border-radius, 2px) 0 0 var(--devui-border-radius, 2px)}.devui-nav-slider>li:last-child{border-radius:0 var(--devui-border-radius, 2px) var(--devui-border-radius, 2px) 0}.devui-nav-slider>li a{cursor:pointer;border:none;color:var(--devui-text, #252b3a);line-height:28px;padding:0 15px}.devui-nav-slider>li a:hover,.devui-nav-slider>li a:focus,.devui-nav-slider>li a:active{outline:none}.devui-nav-slider>li.disabled{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-nav-slider>li.disabled a{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-nav-slider>li.active a,.devui-nav-slider>li:hover:not(.disabled) a{color:var(--devui-brand-active, #526ecc)}.devui-nav-slider>li.active a:hover,.devui-nav-slider>li:hover:not(.disabled) a:hover{color:var(--devui-brand-active, #526ecc);background:transparent}.devui-nav-slider>li.active:not(:first-child):before,.devui-nav-slider>li:hover:not(.disabled):not(:first-child):before{content:"";display:block;top:-1px;left:-1px;width:1px;height:"calc(100% + 2px)";position:absolute}.devui-nav-slider>li.active{text-shadow:0 0 .7px var(--devui-brand, #5e7ce0)}.devui-nav-slider>li.active:not(:first-child):before{background-color:var(--devui-brand, #5e7ce0)}.devui-nav-slider>li.active+li:before{background-color:var(--devui-brand, #5e7ce0)}.devui-nav-slider>li:hover:not(.active):not(.disabled){color:var(--devui-brand-active, #526ecc)}.devui-nav-slider>li:hover:not(.active):not(.disabled):not(:first-child):before{background-color:var(--devui-brand-active, #526ecc)}.devui-nav-wrapped{font-size:var(--devui-font-size, 12px);background:transparent;border-bottom:1px solid var(--devui-dividing-line, #dfe1e6);background-color:var(--devui-base-bg, #ffffff)}.devui-nav-wrapped>li{cursor:pointer;float:left;position:relative;padding:8px 16px}.devui-nav-wrapped>li a{cursor:pointer;border:none;color:var(--devui-text, #252b3a);border-radius:var(--devui-border-radius, 2px) var(--devui-border-radius, 2px) 0 0}.devui-nav-wrapped>li a:hover,.devui-nav-wrapped>li a:focus,.devui-nav-wrapped>li a:active{outline:none}.devui-nav-wrapped>li.disabled{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-nav-wrapped>li.disabled a{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-nav-wrapped>li.active{border:1px solid var(--devui-dividing-line, #dfe1e6);background:var(--devui-global-bg, #f3f6f8);border-radius:var(--devui-border-radius, 2px) var(--devui-border-radius, 2px) 0 0;font-weight:700;margin:-1px;border-bottom-color:transparent}.devui-nav-wrapped>li.active a{color:var(--devui-brand-active, #526ecc)}.devui-nav-wrapped>li:hover:not(.active):not(.disabled) a{color:var(--devui-brand, #5e7ce0)}.devui-nav{list-style:none;padding-left:0}.devui-nav li a{text-decoration:none}.devui-nav li a.custom-width{display:inline-block;padding:0;text-align:center}.devui-nav-tabs:not(.devui-nav-stacked){border-bottom:1px var(--devui-line, #adb0b8) solid}.devui-nav-tabs:not(.devui-nav-stacked) li{float:left;margin-left:32px;margin-bottom:-3px}.devui-nav-tabs:not(.devui-nav-stacked) li:first-child{margin-left:0}.devui-nav-pills:not(.devui-nav-stacked)>li{float:left;margin-left:32px}.devui-nav-pills:not(.devui-nav-stacked)>li:first-child{margin-left:0}.devui-nav:before,.devui-nav:after{content:" ";display:table}.devui-nav:after{clear:both}.devui-tab-content{margin-top:20px}.devui-nav-slider-animation{position:absolute;z-index:0;background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius, 2px);box-shadow:0 2px 4px 0 var(--devui-light-shadow, rgba(0, 0, 0, .1));top:1px;height:30px;transition:left .3s cubic-bezier(.645,.045,.355,1),width .3s cubic-bezier(.645,.045,.355,1)}
|
|
1
|
+
:host{display:block}.devui-tabs__nav--tabs,.devui-tabs__nav--pills{font-size:var(--devui-font-size, 14px);background:transparent;list-style:none}.devui-tabs__nav--tabs li,.devui-tabs__nav--pills li{cursor:pointer;border:2px solid transparent}.devui-tabs__nav--tabs li a,.devui-tabs__nav--pills li a{cursor:pointer;border:none;line-height:30px;background-color:transparent;padding:0;text-decoration:none;color:var(--devui-text, #252b3a)}.devui-tabs__nav--tabs li a:hover,.devui-tabs__nav--tabs li a:focus,.devui-tabs__nav--tabs li a:active,.devui-tabs__nav--pills li a:hover,.devui-tabs__nav--pills li a:focus,.devui-tabs__nav--pills li a:active{outline:none}.devui-tabs__nav--tabs li.disabled a,.devui-tabs__nav--pills li.disabled a{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-tabs__nav--tabs li.active a,.devui-tabs__nav--tabs li:hover:not(.disabled) a,.devui-tabs__nav--pills li.active a,.devui-tabs__nav--pills li:hover:not(.disabled) a{color:var(--devui-brand, #5e7ce0)}.devui-tabs__nav--tabs li:after,.devui-tabs__nav--pills li:after{content:"";display:block;margin:auto;height:2px;width:0;background:transparent;transition:width var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95)),background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95))}.devui-tabs__nav--tabs li.active:after,.devui-tabs__nav--pills li.active:after{width:100%;background:var(--devui-brand, #5e7ce0)}.devui-tabs__nav--tabs .devui-tabs__new-tab,.devui-tabs__nav--pills .devui-tabs__new-tab{padding:2px 0 0}.devui-tabs__nav--options{background:var(--devui-base-bg, #ffffff);border:1px solid var(--devui-dividing-line, #f2f2f3);border-radius:var(--devui-border-radius, 4px);padding:2px;width:fit-content}.devui-tabs__nav--options>li{cursor:pointer;background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius, 4px);transition:background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95)),text-shadow var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95))}.devui-tabs__nav--options>li span>a{border:none;color:var(--devui-text, #252b3a);line-height:26px;padding:0 16px}.devui-tabs__nav--options>li span>a:hover,.devui-tabs__nav--options>li span>a:focus,.devui-tabs__nav--options>li span>a:active{outline:none}.devui-tabs__nav--options>li.active{background-color:var(--devui-brand-foil, #f2f2f3)}.devui-tabs__nav--options>li.active span>a{color:var(--devui-brand, #5e7ce0);padding:0 16px}.devui-tabs__nav--options>li.disabled{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-tabs__nav--options>li.disabled a{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-tabs__nav--options>li.active span>a:hover,.devui-tabs__nav--options>li:hover:not(.disabled) span>a:hover{color:var(--devui-brand, #5e7ce0);background:transparent}.devui-tabs__nav--options .devui-tabs__close-btn{margin-right:12px}.devui-tabs__nav--options .devui-tabs__new-tab{padding:2px 16px 0}.devui-tabs__nav--slider{font-size:var(--devui-font-size, 14px);border:none;border-radius:var(--devui-border-radius, 4px);background:var(--devui-list-item-hover-bg, #f2f2f3);width:fit-content;display:flex;align-items:center;position:relative}.devui-tabs__nav--slider>li{cursor:pointer;margin:2px;position:relative;z-index:1}.devui-tabs__nav--slider>li:first-child{border-left-width:1px;border-radius:var(--devui-border-radius, 4px) 0 0 var(--devui-border-radius, 4px)}.devui-tabs__nav--slider>li:last-child{border-radius:0 var(--devui-border-radius, 4px) var(--devui-border-radius, 4px) 0}.devui-tabs__nav--slider>li a{cursor:pointer;border:none;color:var(--devui-text, #252b3a);line-height:28px;padding:0 16px}.devui-tabs__nav--slider>li a:hover,.devui-tabs__nav--slider>li a:focus,.devui-tabs__nav--slider>li a:active{outline:none}.devui-tabs__nav--slider>li.disabled{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-tabs__nav--slider>li.disabled a{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-tabs__nav--slider>li.active a,.devui-tabs__nav--slider>li:hover:not(.disabled) a{color:var(--devui-brand-active, #526ecc)}.devui-tabs__nav--slider>li.active a:hover,.devui-tabs__nav--slider>li:hover:not(.disabled) a:hover{color:var(--devui-brand-active, #526ecc);background:transparent}.devui-tabs__nav--slider>li.active{text-shadow:0 0 .7px var(--devui-brand, #5e7ce0)}.devui-tabs__nav--slider>li:hover:not(.active):not(.disabled){color:var(--devui-brand-active, #526ecc)}.devui-tabs__nav--slider .devui-tabs__close-btn{margin-right:12px}.devui-tabs__nav--slider .devui-tabs__new-tab{padding:2px 16px 0}.devui-tabs__nav--wrapped{font-size:var(--devui-font-size, 14px);background:transparent;border-bottom:1px solid var(--devui-dividing-line, #f2f2f3);background-color:var(--devui-base-bg, #ffffff)}.devui-tabs__nav--wrapped>li{cursor:pointer;position:relative;padding:8px 16px}.devui-tabs__nav--wrapped>li a{cursor:pointer;border:none;color:var(--devui-text, #252b3a);border-radius:var(--devui-border-radius, 4px) var(--devui-border-radius, 4px) 0 0}.devui-tabs__nav--wrapped>li a:hover,.devui-tabs__nav--wrapped>li a:focus,.devui-tabs__nav--wrapped>li a:active{outline:none}.devui-tabs__nav--wrapped>li.disabled{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-tabs__nav--wrapped>li.disabled a{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-tabs__nav--wrapped>li.active{border:1px solid var(--devui-dividing-line, #f2f2f3);background:var(--devui-global-bg, #f8f8fa);border-radius:var(--devui-border-radius, 4px) var(--devui-border-radius, 4px) 0 0;margin:-1px;border-bottom-color:transparent}.devui-tabs__nav--wrapped>li.active a{color:var(--devui-brand-active, #526ecc)}.devui-tabs__nav--wrapped>li:hover:not(.active):not(.disabled) a{color:var(--devui-brand, #5e7ce0)}.devui-tabs__nav--tabs{border-bottom:1px var(--devui-line, #d7d8da) solid}.devui-tabs__nav--tabs li{margin-left:32px;margin-bottom:-3px}.devui-tabs__nav--tabs li:first-child{margin-left:0}.devui-tabs__nav--pills>li{margin-left:32px}.devui-tabs__nav--pills>li:first-child{margin-left:0}.devui-tabs__nav{display:flex;align-items:center;list-style:none;padding-left:0}.devui-tabs__nav li a{text-decoration:none}.devui-tabs__nav li a.custom-width{display:inline-block;padding:0;text-align:center}.devui-tabs__nav--right,.devui-tabs__nav--left{margin:0}.devui-tabs__nav--right .devui-tabs__nav-slider-animation,.devui-tabs__nav--left .devui-tabs__nav-slider-animation{transition:top var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95)),height var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95))}.devui-tabs__nav--right .devui-tabs__new-tab,.devui-tabs__nav--left .devui-tabs__new-tab{text-align:center}.devui-tabs__nav--right{display:block;float:right;border-bottom:none;margin-left:10px}.devui-tabs__nav--right>li{margin-left:0;padding:0 16px;position:relative}.devui-tabs__nav--right>li:after{display:none}.devui-tabs__nav--right>li:before{content:" ";position:absolute;top:0;left:-5px;margin:auto;height:0;width:2px;background:transparent;transition:height var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95)),background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95))}.devui-tabs__nav--right>li.active:before{height:100%;background:var(--devui-brand, #5e7ce0)}.devui-tabs__nav--left{display:block;float:left;border-bottom:none;margin-right:10px}.devui-tabs__nav--left>li{margin-left:0;padding:0 16px;position:relative}.devui-tabs__nav--left>li:after{content:" ";position:absolute;top:0;right:-5px;margin:auto;height:0;width:2px;background:transparent;transition:height var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95)),background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95))}.devui-tabs__nav--left>li.active:after{height:100%;width:2px;background:var(--devui-brand, #5e7ce0)}.devui-tabs__nav-content{display:flex;align-items:center}.devui-tabs__nav--options{padding-left:2px}.devui-tabs__nav-slider-animation{position:absolute;z-index:0;background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius, 4px);box-shadow:0 2px 4px 0 var(--devui-light-shadow, rgba(37, 43, 58, .1));top:1px;height:30px;transition:left var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95)),width var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95))}.devui-tabs__new-tab .devui-icon__container:hover,.devui-tabs__close-btn .devui-icon__container:hover{color:var(--devui-text, #252b3a)}.devui-tabs__new-tab .devui-icon__container>i,.devui-tabs__close-btn .devui-icon__container>i{transition:none}.devui-tabs__new-tab .devui-icon__container{color:var(--devui-aide-text, #71757f)}.devui-tabs__close-btn{margin-left:12px}.devui-tabs__close-btn .devui-icon__container{color:var(--devui-form-control-line, #d7d8da)}.devui-tabs--right .devui-tabs__nav--options,.devui-tabs--right .devui-tabs__nav--wrapped,.devui-tabs--left .devui-tabs__nav--options,.devui-tabs--left .devui-tabs__nav--wrapped{border-bottom:1px solid var(--devui-dividing-line, #f2f2f3)}.devui-tabs--right .devui-tabs__nav--options>li:after,.devui-tabs--right .devui-tabs__nav--wrapped>li:after,.devui-tabs--left .devui-tabs__nav--options>li:after,.devui-tabs--left .devui-tabs__nav--wrapped>li:after{display:none}.devui-tabs--right .devui-tabs__nav--options>li:before,.devui-tabs--right .devui-tabs__nav--wrapped>li:before,.devui-tabs--left .devui-tabs__nav--options>li:before,.devui-tabs--left .devui-tabs__nav--wrapped>li:before{display:none}.devui-tabs--right .devui-tabs__nav--wrapped,.devui-tabs--left .devui-tabs__nav--wrapped{border-bottom:none}.devui-tabs--right .devui-tabs__nav--wrapped>li,.devui-tabs--left .devui-tabs__nav--wrapped>li{padding:8px 16px}.devui-tabs--right .devui-tabs__nav--slider>li:after,.devui-tabs--left .devui-tabs__nav--slider>li:after{display:none}.devui-tabs--right .devui-tabs__nav--slider>li:before,.devui-tabs--left .devui-tabs__nav--slider>li:before{display:none}.devui-tabs--right .devui-tabs__nav--slider .devui-tabs__nav-slider-animation,.devui-tabs--left .devui-tabs__nav--slider .devui-tabs__nav-slider-animation{left:1px}.devui-tabs--right .devui-tabs__nav--wrapped{border-left:1px solid var(--devui-dividing-line, #f2f2f3)}.devui-tabs--right .devui-tabs__nav--wrapped>li a{border-radius:0 var(--devui-border-radius, 4px) var(--devui-border-radius, 4px) 0}.devui-tabs--right .devui-tabs__nav--wrapped>li.active{border-radius:0 var(--devui-border-radius, 4px) var(--devui-border-radius, 4px) 0;border-bottom-color:var(--devui-dividing-line, #f2f2f3);border-left-color:transparent}.devui-tabs--right .devui-tabs__nav--tabs{border-left:1px solid var(--devui-line, #d7d8da)}.devui-tabs--left .devui-tabs__nav--wrapped{border-right:1px solid var(--devui-dividing-line, #f2f2f3)}.devui-tabs--left .devui-tabs__nav--wrapped>li a{border-radius:var(--devui-border-radius, 4px) 0 0 var(--devui-border-radius, 4px)}.devui-tabs--left .devui-tabs__nav--wrapped>li.active{border-radius:var(--devui-border-radius, 4px) 0 0 var(--devui-border-radius, 4px);border-bottom-color:var(--devui-dividing-line, #f2f2f3);border-right-color:transparent}.devui-tabs--left .devui-tabs__nav--tabs{border-right:1px solid var(--devui-line, #d7d8da)}.devui-tab__content{margin-top:20px;overflow:hidden}
|