x-next 0.0.0-alpha.5 → 0.0.0-alpha.51
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 +26 -1
- package/dist/_container/client-only.d.ts +4 -0
- package/dist/_container/parent-scroll-observer.d.ts +6 -0
- package/dist/_container/render-function.d.ts +14 -0
- package/dist/_container/resize-observer-2.d.ts +12 -0
- package/dist/_container/resize-observer.d.ts +6 -0
- package/dist/_container/utils.d.ts +12 -0
- package/dist/_hooks/_types.d.ts +4 -0
- package/dist/_hooks/use-children-components.d.ts +5 -0
- package/dist/_hooks/use-first-element.d.ts +5 -0
- package/dist/_hooks/use-index.d.ts +9 -0
- package/dist/_hooks/use-merge-state.d.ts +4 -0
- package/dist/_hooks/use-pick-slots.d.ts +2 -0
- package/dist/_hooks/use-popup-container.d.ts +6 -0
- package/dist/_hooks/use-popup-overflow-hidden.d.ts +6 -0
- package/dist/_hooks/use-resize-observer.d.ts +8 -0
- package/dist/_hooks/use-size.d.ts +7 -0
- package/dist/_hooks/use-state.d.ts +2 -0
- package/dist/_hooks/use-teleport-container.d.ts +10 -0
- package/dist/_props/constant.d.ts +4 -0
- package/dist/_props/types.d.ts +1 -0
- package/dist/_utils/click.d.ts +13 -0
- package/dist/_utils/config.d.ts +1 -1
- package/dist/_utils/constant.d.ts +17 -0
- package/dist/_utils/dom.d.ts +6 -0
- package/dist/_utils/is.d.ts +3 -0
- package/dist/_utils/omit.d.ts +2 -0
- package/dist/_utils/raf.d.ts +3 -0
- package/dist/_utils/throttle-by-raf.d.ts +4 -0
- package/dist/_utils/types.d.ts +1 -0
- package/dist/_utils/vue-eco.d.ts +14 -1
- package/dist/components/_components/icon-hover.vue.d.ts +38 -0
- package/dist/components/button/Button.d.ts +97 -0
- package/dist/components/button/index.d.ts +181 -0
- package/dist/{componets → components}/button/props.d.ts +4 -4
- package/dist/{componets/dialog/index.vue.d.ts → components/dialog/Dialog.d.ts} +13 -46
- package/dist/components/dialog/index.d.ts +334 -0
- package/dist/{componets → components}/dialog/props.d.ts +5 -5
- package/dist/components/drawer/index.d.ts +1474 -0
- package/dist/components/drawer/src/Drawer.vue.d.ts +744 -0
- package/dist/components/drawer/src/props.d.ts +75 -0
- package/dist/components/drawer/src/types.d.ts +1 -0
- package/dist/components/form/constants.d.ts +4 -0
- package/dist/components/form/form-item.d.ts +31 -0
- package/dist/components/form/form.d.ts +39 -0
- package/dist/components/form/hooks.d.ts +4 -0
- package/dist/components/form/types.d.ts +31 -0
- package/dist/components/image/ImagePreviewAction.d.ts +1354 -0
- package/dist/components/image/context.d.ts +6 -0
- package/dist/components/image/hooks/use-image-drag.d.ts +11 -0
- package/dist/components/image/hooks/use-image-load-status.d.ts +10 -0
- package/dist/components/image/image-footer.vue.d.ts +23 -0
- package/dist/components/image/interface.d.ts +45 -0
- package/dist/components/image/preview-arrow.vue.d.ts +122 -0
- package/dist/components/image/preview-toolbar.vue.d.ts +1388 -0
- package/dist/components/image/utils/get-fix-translate.d.ts +1 -0
- package/dist/components/image/utils/get-scale.d.ts +6 -0
- package/dist/components/image/utils/index.d.ts +1 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/input/Input.d.ts +220 -0
- package/dist/components/input/index.d.ts +394 -0
- package/dist/components/input/props.d.ts +95 -0
- package/dist/components/input/utils.d.ts +6 -0
- package/dist/components/message/Message.d.ts +108 -0
- package/dist/{componets/message/index.vue.d.ts → components/message/MessageVue.vue.d.ts} +23 -48
- package/dist/components/message/index.d.ts +193 -0
- package/dist/components/message-box/index.d.ts +4 -0
- package/dist/components/message-box/warp.d.ts +2 -0
- package/dist/components/notification/Notification.d.ts +89 -0
- package/dist/components/notification/index.d.ts +166 -0
- package/dist/components/popconfirm/index.d.ts +193 -0
- package/dist/components/popconfirm/src/Popconfirm.d.ts +104 -0
- package/dist/components/popconfirm/src/popup.vue.d.ts +407 -0
- package/dist/components/popconfirm/src/props.d.ts +45 -0
- package/dist/components/popconfirm/src/types.d.ts +3 -0
- package/dist/components/popup/Popup.d.ts +188 -0
- package/dist/components/popup/index.d.ts +334 -0
- package/dist/components/popup/props.d.ts +83 -0
- package/dist/components/popup/use-props.d.ts +33 -0
- package/dist/components/popup/use.d.ts +3 -0
- package/dist/components/popup/warp.d.ts +2 -0
- package/dist/components/scrollbar/index.d.ts +291 -0
- package/dist/components/scrollbar/src/Scrollbar.vue.d.ts +134 -0
- package/dist/components/scrollbar/src/constant.d.ts +1 -0
- package/dist/components/scrollbar/src/scrollbar.d.ts +24 -0
- package/dist/components/scrollbar/src/thumb.d.ts +20 -0
- package/dist/components/scrollbar/src/thumb.vue.d.ts +47 -0
- package/dist/components/scrollbar/src/types.d.ts +18 -0
- package/dist/{componets/space/index.d.ts → components/space/Space.d.ts} +1 -1
- package/dist/components/space/index.d.ts +82 -0
- package/dist/components/tabs/TabPane.vue.d.ts +78 -0
- package/dist/components/tabs/Tabs.d.ts +349 -0
- package/dist/components/tabs/context.d.ts +11 -0
- package/dist/components/tabs/index.d.ts +400 -0
- package/dist/components/tabs/interface.d.ts +12 -0
- package/dist/components/tabs/tabs-button.d.ts +43 -0
- package/dist/components/tabs/tabs-nav-ink.vue.d.ts +36 -0
- package/dist/components/tabs/tabs-nav.d.ts +110 -0
- package/dist/components/tabs/tabs-tab.vue.d.ts +129 -0
- package/dist/components/tabs/utils.d.ts +13 -0
- package/dist/components/tag/Tag.vue.d.ts +375 -0
- package/dist/components/tag/index.d.ts +519 -0
- package/dist/components/tag/interface.d.ts +49 -0
- package/dist/components/timeline/index.d.ts +58 -0
- package/dist/components/timeline/src/Timeline.d.ts +24 -0
- package/dist/components/timeline/src/TimelineItem.d.ts +12 -0
- package/dist/components/timeline/src/context.d.ts +12 -0
- package/dist/components/timeline/src/props.d.ts +31 -0
- package/dist/components/timeline/src/types.d.ts +9 -0
- package/dist/components/timeline-item/index.d.ts +34 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +760 -0
- package/dist/components/tooltip/index.d.ts +1317 -0
- package/dist/components/trend-chart/components/TrendChart.d.ts +277 -0
- package/dist/components/trend-chart/components/trend-chart-curve.d.ts +111 -0
- package/dist/components/trend-chart/components/trend-chart-grid.d.ts +55 -0
- package/dist/components/trend-chart/components/trend-chart-labels.d.ts +22 -0
- package/dist/components/trend-chart/helpers/genPath.d.ts +8 -0
- package/dist/components/trend-chart/helpers/genPoints.d.ts +3 -0
- package/dist/components/trend-chart/helpers/getPadding.d.ts +7 -0
- package/dist/components/trend-chart/helpers/validatePadding.d.ts +2 -0
- package/dist/components/trend-chart/index.d.ts +535 -0
- package/dist/components/trend-chart/props.d.ts +203 -0
- package/dist/components/trend-chart/themes.d.ts +128 -0
- package/dist/{componets/trend-chart → components/trend-chart.bak}/components/trend-chart-curve.d.ts +2 -5
- package/dist/{componets/trend-chart → components/trend-chart.bak}/components/trend-chart.d.ts +19 -15
- package/dist/components/trend-chart.bak/index.d.ts +530 -0
- package/dist/{componets/trend-chart → components/trend-chart.bak}/props.d.ts +10 -5
- package/dist/components/trend-chart.bak/themes.d.ts +152 -0
- package/dist/components/trigger/index.d.ts +487 -0
- package/dist/components/trigger/src/_trigger.d.ts +217 -0
- package/dist/components/trigger/src/constant.d.ts +8 -0
- package/dist/components/trigger/src/trigger.d.ts +288 -0
- package/dist/components/trigger/src/utils.d.ts +50 -0
- package/dist/components/trigger-v2/context.d.ts +8 -0
- package/dist/components/trigger-v2/index.d.ts +562 -0
- package/dist/components/trigger-v2/interface.d.ts +40 -0
- package/dist/components/trigger-v2/trigger.d.ts +627 -0
- package/dist/components/trigger-v2/utils.d.ts +51 -0
- package/dist/directives/clipboard/cache.d.ts +8 -0
- package/dist/directives/clipboard/clipboard.d.ts +18 -0
- package/dist/directives/clipboard/convert.d.ts +3 -0
- package/dist/directives/clipboard/index.d.ts +3 -0
- package/dist/directives/clipboard/plugin.d.ts +2 -0
- package/dist/directives/clipboard/textarea.d.ts +3 -0
- package/dist/icons/{default/exclamation-circle-fill.vue.d.ts → _self/down.d.ts} +4 -9
- package/dist/icons/{default/close-circle-fill.vue.d.ts → _self/full-screen.d.ts} +4 -9
- package/dist/icons/{animation/animation-loading.vue.d.ts → _self/left.d.ts} +4 -9
- package/dist/icons/{default/check-circle-fill.vue.d.ts → _self/next.d.ts} +4 -9
- package/dist/icons/_self/original-size.d.ts +50 -0
- package/dist/icons/_self/plus.d.ts +50 -0
- package/dist/icons/_self/prev.d.ts +50 -0
- package/dist/icons/_self/right.d.ts +50 -0
- package/dist/icons/_self/rotate-left.d.ts +50 -0
- package/dist/icons/_self/rotate-right.d.ts +50 -0
- package/dist/icons/_self/up.d.ts +50 -0
- package/dist/icons/_self/zoom-in.d.ts +50 -0
- package/dist/icons/_self/zoom-out.d.ts +50 -0
- package/dist/icons/animation/animation-loading.d.ts +50 -0
- package/dist/icons/default/check-circle-fill.d.ts +50 -0
- package/dist/icons/default/close-circle-fill.d.ts +50 -0
- package/dist/icons/default/close.d.ts +50 -0
- package/dist/icons/default/exclamation-circle-fill.d.ts +50 -0
- package/dist/icons/default/info-circle-fill.d.ts +50 -0
- package/dist/icons/default/left.d.ts +50 -0
- package/dist/icons/default/logo-simple.d.ts +50 -0
- package/dist/icons/default/minus-circle-fill.d.ts +50 -0
- package/dist/icons/default/right.d.ts +50 -0
- package/dist/icons/icon.d.ts +51 -0
- package/dist/icons/index.d.ts +11 -7
- package/dist/index.d.ts +13 -0
- package/dist/index.es.js +7265 -1062
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +26 -0
- package/package.json +25 -11
- package/volar.d.ts +27 -0
- package/dist/_utils/icon.d.ts +0 -59
- package/dist/componets/button/index.vue.d.ts +0 -162
- package/dist/componets/message-box/warp.d.ts +0 -2
- package/dist/componets/notification/index.vue.d.ts +0 -160
- package/dist/componets/trend-chart/index.d.ts +0 -2
- package/dist/icons/default/info-circle-fill.vue.d.ts +0 -55
- package/dist/icons/default/minus-circle-fill.vue.d.ts +0 -55
- package/dist/ui.d.ts +0 -5
- /package/dist/{componets → components}/dialog/use-props.d.ts +0 -0
- /package/dist/{componets → components}/dialog/use.d.ts +0 -0
- /package/dist/{componets → components}/dialog/warp.d.ts +0 -0
- /package/dist/{componets → components}/message/props.d.ts +0 -0
- /package/dist/{componets → components}/message/warp.d.ts +0 -0
- /package/dist/{componets/message-box/index.d.ts → components/message-box/MessageBox.d.ts} +0 -0
- /package/dist/{componets → components}/message-box/props.d.ts +0 -0
- /package/dist/{componets → components}/notification/props.d.ts +0 -0
- /package/dist/{componets → components}/notification/warp.d.ts +0 -0
- /package/dist/{componets → components}/tag-cloud/index.d.ts +0 -0
- /package/dist/{componets/trend-chart → components/trend-chart.bak}/components/trend-chart-grid.d.ts +0 -0
- /package/dist/{componets/trend-chart → components/trend-chart.bak}/components/trend-chart-labels.d.ts +0 -0
- /package/dist/{componets/trend-chart → components/trend-chart.bak}/helpers/genPath.d.ts +0 -0
- /package/dist/{componets/trend-chart → components/trend-chart.bak}/helpers/genPoints.d.ts +0 -0
- /package/dist/{componets/trend-chart → components/trend-chart.bak}/helpers/getPadding.d.ts +0 -0
- /package/dist/{componets/trend-chart → components/trend-chart.bak}/helpers/validatePadding.d.ts +0 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
2
|
+
/**
|
3
|
+
* @zh 选项卡的标题
|
4
|
+
* @en Title of the tab
|
5
|
+
*/
|
6
|
+
title: StringConstructor;
|
7
|
+
/**
|
8
|
+
* @zh 是否禁用
|
9
|
+
* @en Whether to disable
|
10
|
+
*/
|
11
|
+
disabled: {
|
12
|
+
type: BooleanConstructor;
|
13
|
+
default: boolean;
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* @zh 是否允许关闭此选项卡(仅在可编辑模式生效)
|
17
|
+
* @en Whether to allow this tab to be closed (only effective in editable mode)
|
18
|
+
*/
|
19
|
+
closable: {
|
20
|
+
type: BooleanConstructor;
|
21
|
+
default: boolean;
|
22
|
+
};
|
23
|
+
/**
|
24
|
+
* @zh 是否在不显示标签时销毁内容
|
25
|
+
* @en Whether to destroy the content when the label is not displayed
|
26
|
+
* @version 2.27.0
|
27
|
+
*/
|
28
|
+
destroyOnHide: {
|
29
|
+
type: BooleanConstructor;
|
30
|
+
default: boolean;
|
31
|
+
};
|
32
|
+
}>, {
|
33
|
+
className: {
|
34
|
+
block: string;
|
35
|
+
element: (className: string) => string;
|
36
|
+
modifier: (className: string) => string;
|
37
|
+
is: (className: string) => string;
|
38
|
+
};
|
39
|
+
active: import('vue').ComputedRef<boolean>;
|
40
|
+
itemRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
41
|
+
mounted: import('vue').Ref<boolean, boolean>;
|
42
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
43
|
+
/**
|
44
|
+
* @zh 选项卡的标题
|
45
|
+
* @en Title of the tab
|
46
|
+
*/
|
47
|
+
title: StringConstructor;
|
48
|
+
/**
|
49
|
+
* @zh 是否禁用
|
50
|
+
* @en Whether to disable
|
51
|
+
*/
|
52
|
+
disabled: {
|
53
|
+
type: BooleanConstructor;
|
54
|
+
default: boolean;
|
55
|
+
};
|
56
|
+
/**
|
57
|
+
* @zh 是否允许关闭此选项卡(仅在可编辑模式生效)
|
58
|
+
* @en Whether to allow this tab to be closed (only effective in editable mode)
|
59
|
+
*/
|
60
|
+
closable: {
|
61
|
+
type: BooleanConstructor;
|
62
|
+
default: boolean;
|
63
|
+
};
|
64
|
+
/**
|
65
|
+
* @zh 是否在不显示标签时销毁内容
|
66
|
+
* @en Whether to destroy the content when the label is not displayed
|
67
|
+
* @version 2.27.0
|
68
|
+
*/
|
69
|
+
destroyOnHide: {
|
70
|
+
type: BooleanConstructor;
|
71
|
+
default: boolean;
|
72
|
+
};
|
73
|
+
}>> & Readonly<{}>, {
|
74
|
+
disabled: boolean;
|
75
|
+
closable: boolean;
|
76
|
+
destroyOnHide: boolean;
|
77
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
78
|
+
export default _default;
|
@@ -0,0 +1,349 @@
|
|
1
|
+
import { PropType } from 'vue';
|
2
|
+
import { Direction, Size } from '../../_utils/constant';
|
3
|
+
import { TabsPosition, TabsType, TabTriggerEvent, ScrollPosition } from './interface';
|
4
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
5
|
+
/**
|
6
|
+
* @zh 当前选中的标签的 `key`
|
7
|
+
* @en The `key` of the currently selected label
|
8
|
+
* @vModel
|
9
|
+
*/
|
10
|
+
activeKey: {
|
11
|
+
type: (NumberConstructor | StringConstructor)[];
|
12
|
+
default: undefined;
|
13
|
+
};
|
14
|
+
/**
|
15
|
+
* @zh 默认选中的标签的`key`(非受控状态,为空时选中第一个标签页)
|
16
|
+
* @en The `key` of the tab selected by default (uncontrolled state, select the first tab page when it is empty)
|
17
|
+
*/
|
18
|
+
defaultActiveKey: {
|
19
|
+
type: (NumberConstructor | StringConstructor)[];
|
20
|
+
default: undefined;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* @zh 选项卡的位置
|
24
|
+
* @en Position of the tab
|
25
|
+
* @values 'left', 'right', 'top', 'bottom'
|
26
|
+
*/
|
27
|
+
position: {
|
28
|
+
type: PropType<TabsPosition>;
|
29
|
+
default: string;
|
30
|
+
};
|
31
|
+
/**
|
32
|
+
* @zh 选项卡的大小
|
33
|
+
* @en The size of the tab
|
34
|
+
* @values 'mini', 'small', 'medium', 'large'
|
35
|
+
*/
|
36
|
+
size: {
|
37
|
+
type: PropType<Size>;
|
38
|
+
};
|
39
|
+
/**
|
40
|
+
* @zh 选项卡的类型
|
41
|
+
* @en The type of tab
|
42
|
+
* @values 'line', 'card', 'card-gutter', 'text', 'rounded', 'capsule'
|
43
|
+
*/
|
44
|
+
type: {
|
45
|
+
type: PropType<TabsType>;
|
46
|
+
default: string;
|
47
|
+
};
|
48
|
+
/**
|
49
|
+
* @zh 选项卡的方向
|
50
|
+
* @en The direction of tab
|
51
|
+
* @values 'horizontal', 'vertical'
|
52
|
+
*/
|
53
|
+
direction: {
|
54
|
+
type: PropType<Direction>;
|
55
|
+
default: string;
|
56
|
+
};
|
57
|
+
/**
|
58
|
+
* @zh 是否开启可编辑模式
|
59
|
+
* @en Whether to enable editable mode
|
60
|
+
*/
|
61
|
+
editable: {
|
62
|
+
type: BooleanConstructor;
|
63
|
+
default: boolean;
|
64
|
+
};
|
65
|
+
/**
|
66
|
+
* @zh 是否显示增加按钮(仅在可编辑模式可用)
|
67
|
+
* @en Whether to display the add button (only available in editable mode)
|
68
|
+
*/
|
69
|
+
showAddButton: {
|
70
|
+
type: BooleanConstructor;
|
71
|
+
default: boolean;
|
72
|
+
};
|
73
|
+
/**
|
74
|
+
* @zh 是否在不显示标签时销毁内容
|
75
|
+
* @en Whether to destroy the content when the label is not displayed
|
76
|
+
* @version 2.27.0
|
77
|
+
*/
|
78
|
+
destroyOnHide: {
|
79
|
+
type: BooleanConstructor;
|
80
|
+
default: boolean;
|
81
|
+
};
|
82
|
+
/**
|
83
|
+
* @zh 是否在首次展示标签时挂载内容
|
84
|
+
* @en Whether to mount the content when the label is first displayed
|
85
|
+
*/
|
86
|
+
lazyLoad: {
|
87
|
+
type: BooleanConstructor;
|
88
|
+
default: boolean;
|
89
|
+
};
|
90
|
+
/**
|
91
|
+
* @zh 高度撑满容器,只在水平模式下生效。
|
92
|
+
* @en The height of the container is fully supported, and it only takes effect in horizontal mode.
|
93
|
+
*/
|
94
|
+
justify: {
|
95
|
+
type: BooleanConstructor;
|
96
|
+
default: boolean;
|
97
|
+
};
|
98
|
+
/**
|
99
|
+
* @zh 是否开启选项内容过渡动画
|
100
|
+
* @en Whether to enable option content transition animation
|
101
|
+
*/
|
102
|
+
animation: {
|
103
|
+
type: BooleanConstructor;
|
104
|
+
default: boolean;
|
105
|
+
};
|
106
|
+
/**
|
107
|
+
* @zh 选项卡头部是否存在水平边距。仅对 `type` 等于 `line`、`text` 类型的选项卡生效
|
108
|
+
* @en Whether there is a horizontal margin on the header of the tab. Only valid for tabs with `type` equal to `line` and `text` type
|
109
|
+
* @version 2.10.0
|
110
|
+
*/
|
111
|
+
headerPadding: {
|
112
|
+
type: BooleanConstructor;
|
113
|
+
default: boolean;
|
114
|
+
};
|
115
|
+
/**
|
116
|
+
* @zh 创建标签后是否切换到新标签(最后一个)
|
117
|
+
* @en Whether to switch to a new tab after creating a tab (the last one)
|
118
|
+
* @version 2.18.0
|
119
|
+
*/
|
120
|
+
autoSwitch: {
|
121
|
+
type: BooleanConstructor;
|
122
|
+
default: boolean;
|
123
|
+
};
|
124
|
+
/**
|
125
|
+
* @zh 是否隐藏内容
|
126
|
+
* @en Whether to hide content
|
127
|
+
* @version 2.25.0
|
128
|
+
*/
|
129
|
+
hideContent: {
|
130
|
+
type: BooleanConstructor;
|
131
|
+
default: boolean;
|
132
|
+
};
|
133
|
+
/**
|
134
|
+
* @zh 触发方式
|
135
|
+
* @en Trigger method
|
136
|
+
* @values 'hover','click'
|
137
|
+
* @version 2.34.0
|
138
|
+
*/
|
139
|
+
trigger: {
|
140
|
+
type: PropType<TabTriggerEvent>;
|
141
|
+
default: string;
|
142
|
+
};
|
143
|
+
/**
|
144
|
+
* @zh 被选中 tab 的滚动位置,默认 auto 即会将 activeTab 滚动到可见区域,但不会特意做位置调整
|
145
|
+
* @en The scroll position of the selected tab, the default auto will scroll the activeTab to the visible area, but will not adjust the position intentionally
|
146
|
+
* @values 'start', 'end', 'center', 'auto', number
|
147
|
+
*/
|
148
|
+
scrollPosition: {
|
149
|
+
type: PropType<ScrollPosition>;
|
150
|
+
default: string;
|
151
|
+
};
|
152
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
153
|
+
'update:activeKey': (key: string | number) => true;
|
154
|
+
/**
|
155
|
+
* @zh 当前标签值改变时触发
|
156
|
+
* @en Triggered when the current tag value changes
|
157
|
+
* @property { string | number } key
|
158
|
+
*/
|
159
|
+
change: (key: string | number) => true;
|
160
|
+
/**
|
161
|
+
* @zh 用户点击标签时触发
|
162
|
+
* @en Triggered when the user clicks on the tab
|
163
|
+
* @property { string | number } key
|
164
|
+
*/
|
165
|
+
tabClick: (key: string | number, ev: Event) => true;
|
166
|
+
/**
|
167
|
+
* @zh 用户点击增加按钮时触发
|
168
|
+
* @en Triggered when the user clicks the add button
|
169
|
+
*/
|
170
|
+
add: (ev: Event) => true;
|
171
|
+
/**
|
172
|
+
* @zh 用户点击删除按钮时触发
|
173
|
+
* @en Triggered when the user clicks the delete button
|
174
|
+
* @property { string | number } key
|
175
|
+
*/
|
176
|
+
delete: (key: string | number, ev: Event) => true;
|
177
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
178
|
+
/**
|
179
|
+
* @zh 当前选中的标签的 `key`
|
180
|
+
* @en The `key` of the currently selected label
|
181
|
+
* @vModel
|
182
|
+
*/
|
183
|
+
activeKey: {
|
184
|
+
type: (NumberConstructor | StringConstructor)[];
|
185
|
+
default: undefined;
|
186
|
+
};
|
187
|
+
/**
|
188
|
+
* @zh 默认选中的标签的`key`(非受控状态,为空时选中第一个标签页)
|
189
|
+
* @en The `key` of the tab selected by default (uncontrolled state, select the first tab page when it is empty)
|
190
|
+
*/
|
191
|
+
defaultActiveKey: {
|
192
|
+
type: (NumberConstructor | StringConstructor)[];
|
193
|
+
default: undefined;
|
194
|
+
};
|
195
|
+
/**
|
196
|
+
* @zh 选项卡的位置
|
197
|
+
* @en Position of the tab
|
198
|
+
* @values 'left', 'right', 'top', 'bottom'
|
199
|
+
*/
|
200
|
+
position: {
|
201
|
+
type: PropType<TabsPosition>;
|
202
|
+
default: string;
|
203
|
+
};
|
204
|
+
/**
|
205
|
+
* @zh 选项卡的大小
|
206
|
+
* @en The size of the tab
|
207
|
+
* @values 'mini', 'small', 'medium', 'large'
|
208
|
+
*/
|
209
|
+
size: {
|
210
|
+
type: PropType<Size>;
|
211
|
+
};
|
212
|
+
/**
|
213
|
+
* @zh 选项卡的类型
|
214
|
+
* @en The type of tab
|
215
|
+
* @values 'line', 'card', 'card-gutter', 'text', 'rounded', 'capsule'
|
216
|
+
*/
|
217
|
+
type: {
|
218
|
+
type: PropType<TabsType>;
|
219
|
+
default: string;
|
220
|
+
};
|
221
|
+
/**
|
222
|
+
* @zh 选项卡的方向
|
223
|
+
* @en The direction of tab
|
224
|
+
* @values 'horizontal', 'vertical'
|
225
|
+
*/
|
226
|
+
direction: {
|
227
|
+
type: PropType<Direction>;
|
228
|
+
default: string;
|
229
|
+
};
|
230
|
+
/**
|
231
|
+
* @zh 是否开启可编辑模式
|
232
|
+
* @en Whether to enable editable mode
|
233
|
+
*/
|
234
|
+
editable: {
|
235
|
+
type: BooleanConstructor;
|
236
|
+
default: boolean;
|
237
|
+
};
|
238
|
+
/**
|
239
|
+
* @zh 是否显示增加按钮(仅在可编辑模式可用)
|
240
|
+
* @en Whether to display the add button (only available in editable mode)
|
241
|
+
*/
|
242
|
+
showAddButton: {
|
243
|
+
type: BooleanConstructor;
|
244
|
+
default: boolean;
|
245
|
+
};
|
246
|
+
/**
|
247
|
+
* @zh 是否在不显示标签时销毁内容
|
248
|
+
* @en Whether to destroy the content when the label is not displayed
|
249
|
+
* @version 2.27.0
|
250
|
+
*/
|
251
|
+
destroyOnHide: {
|
252
|
+
type: BooleanConstructor;
|
253
|
+
default: boolean;
|
254
|
+
};
|
255
|
+
/**
|
256
|
+
* @zh 是否在首次展示标签时挂载内容
|
257
|
+
* @en Whether to mount the content when the label is first displayed
|
258
|
+
*/
|
259
|
+
lazyLoad: {
|
260
|
+
type: BooleanConstructor;
|
261
|
+
default: boolean;
|
262
|
+
};
|
263
|
+
/**
|
264
|
+
* @zh 高度撑满容器,只在水平模式下生效。
|
265
|
+
* @en The height of the container is fully supported, and it only takes effect in horizontal mode.
|
266
|
+
*/
|
267
|
+
justify: {
|
268
|
+
type: BooleanConstructor;
|
269
|
+
default: boolean;
|
270
|
+
};
|
271
|
+
/**
|
272
|
+
* @zh 是否开启选项内容过渡动画
|
273
|
+
* @en Whether to enable option content transition animation
|
274
|
+
*/
|
275
|
+
animation: {
|
276
|
+
type: BooleanConstructor;
|
277
|
+
default: boolean;
|
278
|
+
};
|
279
|
+
/**
|
280
|
+
* @zh 选项卡头部是否存在水平边距。仅对 `type` 等于 `line`、`text` 类型的选项卡生效
|
281
|
+
* @en Whether there is a horizontal margin on the header of the tab. Only valid for tabs with `type` equal to `line` and `text` type
|
282
|
+
* @version 2.10.0
|
283
|
+
*/
|
284
|
+
headerPadding: {
|
285
|
+
type: BooleanConstructor;
|
286
|
+
default: boolean;
|
287
|
+
};
|
288
|
+
/**
|
289
|
+
* @zh 创建标签后是否切换到新标签(最后一个)
|
290
|
+
* @en Whether to switch to a new tab after creating a tab (the last one)
|
291
|
+
* @version 2.18.0
|
292
|
+
*/
|
293
|
+
autoSwitch: {
|
294
|
+
type: BooleanConstructor;
|
295
|
+
default: boolean;
|
296
|
+
};
|
297
|
+
/**
|
298
|
+
* @zh 是否隐藏内容
|
299
|
+
* @en Whether to hide content
|
300
|
+
* @version 2.25.0
|
301
|
+
*/
|
302
|
+
hideContent: {
|
303
|
+
type: BooleanConstructor;
|
304
|
+
default: boolean;
|
305
|
+
};
|
306
|
+
/**
|
307
|
+
* @zh 触发方式
|
308
|
+
* @en Trigger method
|
309
|
+
* @values 'hover','click'
|
310
|
+
* @version 2.34.0
|
311
|
+
*/
|
312
|
+
trigger: {
|
313
|
+
type: PropType<TabTriggerEvent>;
|
314
|
+
default: string;
|
315
|
+
};
|
316
|
+
/**
|
317
|
+
* @zh 被选中 tab 的滚动位置,默认 auto 即会将 activeTab 滚动到可见区域,但不会特意做位置调整
|
318
|
+
* @en The scroll position of the selected tab, the default auto will scroll the activeTab to the visible area, but will not adjust the position intentionally
|
319
|
+
* @values 'start', 'end', 'center', 'auto', number
|
320
|
+
*/
|
321
|
+
scrollPosition: {
|
322
|
+
type: PropType<ScrollPosition>;
|
323
|
+
default: string;
|
324
|
+
};
|
325
|
+
}>> & Readonly<{
|
326
|
+
onDelete?: ((key: string | number, ev: Event) => any) | undefined;
|
327
|
+
onAdd?: ((ev: Event) => any) | undefined;
|
328
|
+
onChange?: ((key: string | number) => any) | undefined;
|
329
|
+
"onUpdate:activeKey"?: ((key: string | number) => any) | undefined;
|
330
|
+
onTabClick?: ((key: string | number, ev: Event) => any) | undefined;
|
331
|
+
}>, {
|
332
|
+
type: TabsType;
|
333
|
+
direction: "horizontal" | "vertical";
|
334
|
+
position: TabsPosition;
|
335
|
+
animation: boolean;
|
336
|
+
justify: boolean;
|
337
|
+
trigger: TabTriggerEvent;
|
338
|
+
editable: boolean;
|
339
|
+
lazyLoad: boolean;
|
340
|
+
destroyOnHide: boolean;
|
341
|
+
activeKey: string | number;
|
342
|
+
showAddButton: boolean;
|
343
|
+
headerPadding: boolean;
|
344
|
+
scrollPosition: ScrollPosition;
|
345
|
+
defaultActiveKey: string | number;
|
346
|
+
autoSwitch: boolean;
|
347
|
+
hideContent: boolean;
|
348
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
349
|
+
export default _default;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { InjectionKey } from 'vue';
|
2
|
+
import { TabData, TabTriggerEvent } from './interface';
|
3
|
+
export interface TabsContext {
|
4
|
+
lazyLoad: boolean;
|
5
|
+
destroyOnHide: boolean;
|
6
|
+
activeKey: string | number;
|
7
|
+
addItem: (id: number, data: TabData) => void;
|
8
|
+
removeItem: (id: number) => void;
|
9
|
+
trigger: TabTriggerEvent;
|
10
|
+
}
|
11
|
+
export declare const tabsInjectionKey: InjectionKey<TabsContext>;
|