kb-ui-vue 0.3.0 → 0.4.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/LICENSE +21 -0
- package/dist/components/Affix/Affix.vue.d.ts +36 -0
- package/dist/components/Affix/index.d.ts +4 -0
- package/dist/components/Anchor/Anchor.vue.d.ts +25 -0
- package/dist/components/Anchor/index.d.ts +4 -0
- package/dist/components/AutoComplete/AutoComplete.vue.d.ts +52 -0
- package/dist/components/AutoComplete/index.d.ts +4 -0
- package/dist/components/BackTop/BackTop.vue.d.ts +35 -0
- package/dist/components/BackTop/index.d.ts +4 -0
- package/dist/components/Cascader/Cascader.vue.d.ts +1 -0
- package/dist/components/ConfigProvider/ConfigProvider.vue.d.ts +30 -0
- package/dist/components/ConfigProvider/index.d.ts +4 -0
- package/dist/components/ContextMenu/ContextMenu.vue.d.ts +42 -0
- package/dist/components/ContextMenu/index.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.vue.d.ts +1 -0
- package/dist/components/Empty/Empty.vue.d.ts +1 -1
- package/dist/components/FloatButton/FloatButton.vue.d.ts +48 -0
- package/dist/components/FloatButton/FloatButtonGroup.vue.d.ts +38 -0
- package/dist/components/FloatButton/index.d.ts +5 -0
- package/dist/components/Image/Image.vue.d.ts +37 -0
- package/dist/components/Image/index.d.ts +4 -0
- package/dist/components/ImagePreview/ImagePreview.vue.d.ts +28 -0
- package/dist/components/ImagePreview/index.d.ts +4 -0
- package/dist/components/Layout/Content.vue.d.ts +13 -0
- package/dist/components/Layout/Footer.vue.d.ts +13 -0
- package/dist/components/Layout/Header.vue.d.ts +13 -0
- package/dist/components/Layout/Layout.vue.d.ts +19 -0
- package/dist/components/Layout/Sider.vue.d.ts +37 -0
- package/dist/components/Layout/constants.d.ts +7 -0
- package/dist/components/Layout/index.d.ts +8 -0
- package/dist/components/List/List.vue.d.ts +1 -0
- package/dist/components/Mentions/Mentions.vue.d.ts +37 -0
- package/dist/components/Mentions/index.d.ts +5 -0
- package/dist/components/Mentions/types.d.ts +10 -0
- package/dist/components/Popconfirm/Popconfirm.vue.d.ts +2 -1
- package/dist/components/QRCode/QRCode.vue.d.ts +36 -0
- package/dist/components/QRCode/index.d.ts +4 -0
- package/dist/components/QRCode/qrcode.d.ts +34 -0
- package/dist/components/Search/Search.vue.d.ts +4 -0
- package/dist/components/Splitter/Splitter.vue.d.ts +34 -0
- package/dist/components/Splitter/index.d.ts +4 -0
- package/dist/components/Table/Table.vue.d.ts +1 -0
- package/dist/components/TimePicker/TimePicker.vue.d.ts +28 -0
- package/dist/components/TimePicker/index.d.ts +4 -0
- package/dist/components/Tour/Tour.vue.d.ts +37 -0
- package/dist/components/Tour/index.d.ts +4 -0
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts +32 -0
- package/dist/components/TreeSelect/index.d.ts +4 -0
- package/dist/components/VirtualList/VirtualList.vue.d.ts +29 -0
- package/dist/components/VirtualList/index.d.ts +4 -0
- package/dist/components/VirtualList/types.d.ts +12 -0
- package/dist/composables/useGlobalConfig.d.ts +45 -0
- package/dist/global.d.ts +90 -0
- package/dist/index.cjs +3 -1
- package/dist/index.d.ts +40 -0
- package/dist/index.js +3857 -1107
- package/dist/locale/en-US.d.ts +2 -0
- package/dist/locale/index.d.ts +23 -0
- package/dist/locale/types.d.ts +227 -0
- package/dist/locale/zh-CN.d.ts +2 -0
- package/dist/resolver-map.d.ts +14 -0
- package/dist/resolver.cjs +1 -0
- package/dist/resolver.d.ts +36 -0
- package/dist/resolver.js +32 -0
- package/dist/styles/Affix.css +8 -0
- package/dist/styles/Alert.css +68 -68
- package/dist/styles/Anchor.css +56 -0
- package/dist/styles/AutoComplete.css +102 -0
- package/dist/styles/Avatar.css +31 -31
- package/dist/styles/BackTop.css +39 -0
- package/dist/styles/Badge.css +49 -49
- package/dist/styles/Breadcrumb.css +28 -28
- package/dist/styles/Button.css +108 -108
- package/dist/styles/Calendar.css +89 -89
- package/dist/styles/Card.css +40 -40
- package/dist/styles/Carousel.css +87 -87
- package/dist/styles/Cascader.css +121 -121
- package/dist/styles/Checkbox.css +77 -77
- package/dist/styles/Collapse.css +49 -49
- package/dist/styles/ColorPicker.css +36 -36
- package/dist/styles/ContextMenu.css +58 -0
- package/dist/styles/CountUp.css +4 -4
- package/dist/styles/DatePicker.css +63 -63
- package/dist/styles/Descriptions.css +44 -44
- package/dist/styles/Dialog.css +42 -42
- package/dist/styles/Divider.css +37 -37
- package/dist/styles/Drawer.css +81 -81
- package/dist/styles/Dropdown.css +40 -40
- package/dist/styles/Empty.css +24 -24
- package/dist/styles/FloatButton.css +214 -0
- package/dist/styles/Form.css +33 -33
- package/dist/styles/Grid.css +194 -194
- package/dist/styles/Icon.css +5 -5
- package/dist/styles/Image.css +48 -0
- package/dist/styles/ImagePreview.css +99 -0
- package/dist/styles/Input.css +79 -79
- package/dist/styles/InputNumber.css +40 -40
- package/dist/styles/InputPassword.css +42 -42
- package/dist/styles/Layout.css +83 -0
- package/dist/styles/List.css +29 -29
- package/dist/styles/Loading.css +27 -27
- package/dist/styles/Mentions.css +74 -0
- package/dist/styles/Message.css +32 -32
- package/dist/styles/Notification.css +50 -50
- package/dist/styles/Pagination.css +57 -57
- package/dist/styles/Popconfirm.css +53 -53
- package/dist/styles/Popover.css +54 -54
- package/dist/styles/Progress.css +38 -38
- package/dist/styles/QRCode.css +37 -0
- package/dist/styles/Radio.css +60 -60
- package/dist/styles/Rate.css +21 -21
- package/dist/styles/Result.css +41 -41
- package/dist/styles/Search.css +46 -46
- package/dist/styles/Segmented.css +32 -32
- package/dist/styles/Select.css +108 -108
- package/dist/styles/Skeleton.css +40 -40
- package/dist/styles/Slider.css +46 -46
- package/dist/styles/Space.css +27 -27
- package/dist/styles/Splitter.css +59 -0
- package/dist/styles/Statistic.css +31 -31
- package/dist/styles/Steps.css +83 -83
- package/dist/styles/Switch.css +39 -39
- package/dist/styles/Table.css +132 -132
- package/dist/styles/Tabs.css +41 -41
- package/dist/styles/Tag.css +71 -71
- package/dist/styles/Textarea.css +43 -43
- package/dist/styles/TimePicker.css +98 -0
- package/dist/styles/Timeline.css +70 -70
- package/dist/styles/Tooltip.css +42 -42
- package/dist/styles/Tour.css +102 -0
- package/dist/styles/Transfer.css +142 -142
- package/dist/styles/Tree.css +89 -89
- package/dist/styles/TreeSelect.css +121 -0
- package/dist/styles/Upload.css +66 -66
- package/dist/styles/VirtualList.css +42 -0
- package/dist/styles/Watermark.css +17 -17
- package/dist/styles/all.css +110 -103
- package/dist/styles/dark.css +10 -10
- package/dist/styles/index.css +4520 -3260
- package/dist/styles/themes/amber.css +14 -14
- package/dist/styles/themes/aurora.css +15 -15
- package/dist/styles/themes/autumn.css +18 -18
- package/dist/styles/themes/business.css +20 -20
- package/dist/styles/themes/candy.css +21 -21
- package/dist/styles/themes/cartoon.css +31 -31
- package/dist/styles/themes/coffee.css +18 -18
- package/dist/styles/themes/cyber.css +37 -37
- package/dist/styles/themes/cyberpunk.css +32 -32
- package/dist/styles/themes/danqing.css +27 -27
- package/dist/styles/themes/flat.css +18 -18
- package/dist/styles/themes/forest.css +20 -20
- package/dist/styles/themes/gameboy.css +33 -33
- package/dist/styles/themes/glass.css +39 -39
- package/dist/styles/themes/gold.css +26 -26
- package/dist/styles/themes/gothic.css +20 -20
- package/dist/styles/themes/gradient.css +18 -18
- package/dist/styles/themes/ink.css +16 -16
- package/dist/styles/themes/lava.css +15 -15
- package/dist/styles/themes/macaron.css +27 -27
- package/dist/styles/themes/matcha.css +18 -18
- package/dist/styles/themes/memphis.css +25 -25
- package/dist/styles/themes/midnight.css +27 -27
- package/dist/styles/themes/minimal.css +36 -36
- package/dist/styles/themes/mint.css +20 -20
- package/dist/styles/themes/mono.css +36 -36
- package/dist/styles/themes/morandi.css +18 -18
- package/dist/styles/themes/neon.css +16 -16
- package/dist/styles/themes/neonlight.css +20 -20
- package/dist/styles/themes/ocean.css +20 -20
- package/dist/styles/themes/pastel.css +21 -21
- package/dist/styles/themes/pop.css +33 -33
- package/dist/styles/themes/retro.css +35 -35
- package/dist/styles/themes/rose.css +14 -14
- package/dist/styles/themes/rounded.css +18 -18
- package/dist/styles/themes/sakura.css +20 -20
- package/dist/styles/themes/sky.css +20 -20
- package/dist/styles/themes/spring.css +18 -18
- package/dist/styles/themes/starry.css +15 -15
- package/dist/styles/themes/sunset.css +18 -18
- package/dist/styles/themes/teal.css +14 -14
- package/dist/styles/themes/terminal.css +44 -44
- package/dist/styles/themes/vaporwave.css +27 -27
- package/dist/styles/themes/violet.css +14 -14
- package/dist/styles/themes/wabi.css +27 -27
- package/dist/styles/themes/winter.css +20 -20
- package/dist/styles/tokens.css +59 -55
- package/package.json +78 -46
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 anyuer678
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface AffixProps {
|
|
2
|
+
/** 距视口顶部的固定偏移(px),与 offsetBottom 二选一,都传时以 offsetTop 为准 */
|
|
3
|
+
offsetTop?: number;
|
|
4
|
+
/** 距视口底部的固定偏移(px) */
|
|
5
|
+
offsetBottom?: number;
|
|
6
|
+
/**
|
|
7
|
+
* 滚动容器 / 固定范围的边界(CSS 选择器)。
|
|
8
|
+
* 传入后:以「容器顶部 + offsetTop」为固定线,并监听该容器的 scroll;
|
|
9
|
+
* 不传则以视口顶部为固定线。固定不会超出该容器。
|
|
10
|
+
*/
|
|
11
|
+
target?: string;
|
|
12
|
+
/** 固定时是否保留占位元素,避免原位置塌陷导致布局跳动,默认 true */
|
|
13
|
+
placeholder?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_1: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
default?: (props: typeof __VLS_1) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import('vue').DefineComponent<AffixProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
change: (fixed: boolean) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<AffixProps> & Readonly<{
|
|
22
|
+
onChange?: ((fixed: boolean) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
placeholder: boolean;
|
|
25
|
+
target: string;
|
|
26
|
+
offsetTop: number;
|
|
27
|
+
offsetBottom: number;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface AnchorItem {
|
|
2
|
+
/** 锚点文案 */
|
|
3
|
+
title: string;
|
|
4
|
+
/** 目标锚点,形如 '#section-1' */
|
|
5
|
+
href: string;
|
|
6
|
+
children?: AnchorItem[];
|
|
7
|
+
}
|
|
8
|
+
export interface AnchorProps {
|
|
9
|
+
items?: AnchorItem[];
|
|
10
|
+
/** 高亮判定偏移(px):目标顶部进入该偏移以内即视为激活 */
|
|
11
|
+
offsetTop?: number;
|
|
12
|
+
/** 点击后是否平滑滚动,默认 true */
|
|
13
|
+
smooth?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const __VLS_export: import('vue').DefineComponent<AnchorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
change: (href: string) => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<AnchorProps> & Readonly<{
|
|
18
|
+
onChange?: ((href: string) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
items: AnchorItem[];
|
|
21
|
+
offsetTop: number;
|
|
22
|
+
smooth: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface AutoCompleteOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export type AutoCompleteSource = string[] | AutoCompleteOption[];
|
|
7
|
+
export interface AutoCompleteProps {
|
|
8
|
+
modelValue?: string;
|
|
9
|
+
/** 候选数据源,支持字符串数组或 { value, label } 数组 */
|
|
10
|
+
options?: AutoCompleteSource;
|
|
11
|
+
/** 输入框占位文案,不传时取语言包中的 `common.placeholder` */
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
clearable?: boolean;
|
|
15
|
+
/** 是否按输入内容本地过滤,默认 true */
|
|
16
|
+
filter?: boolean;
|
|
17
|
+
/** 远程取数:返回候选数组,返回空数组表示无结果 */
|
|
18
|
+
fetchSuggestions?: (query: string) => AutoCompleteOption[] | Promise<AutoCompleteOption[]>;
|
|
19
|
+
size?: 'small' | 'medium' | 'large';
|
|
20
|
+
}
|
|
21
|
+
declare var __VLS_6: {
|
|
22
|
+
option: AutoCompleteOption;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_Slots = {} & {
|
|
25
|
+
option?: (props: typeof __VLS_6) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_base: import('vue').DefineComponent<AutoCompleteProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
+
select: (option: AutoCompleteOption) => any;
|
|
29
|
+
"update:modelValue": (value: string) => any;
|
|
30
|
+
change: (value: string) => any;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<AutoCompleteProps> & Readonly<{
|
|
32
|
+
onSelect?: ((option: AutoCompleteOption) => any) | undefined;
|
|
33
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
34
|
+
onChange?: ((value: string) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
filter: boolean;
|
|
37
|
+
size: "small" | "medium" | "large";
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
modelValue: string;
|
|
40
|
+
placeholder: string;
|
|
41
|
+
clearable: boolean;
|
|
42
|
+
options: AutoCompleteSource;
|
|
43
|
+
fetchSuggestions: (query: string) => AutoCompleteOption[] | Promise<AutoCompleteOption[]>;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
|
+
declare const _default: typeof __VLS_export;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface BackTopProps {
|
|
2
|
+
/** 滚动距离超过该值时显示按钮 */
|
|
3
|
+
visibilityHeight?: number;
|
|
4
|
+
/** 滚动监听目标:CSS 选择器或元素,默认监听 window */
|
|
5
|
+
target?: string | HTMLElement;
|
|
6
|
+
/** 距视口右侧的距离(px) */
|
|
7
|
+
right?: number;
|
|
8
|
+
/** 距视口底部的距离(px) */
|
|
9
|
+
bottom?: number;
|
|
10
|
+
/** 回到顶部的动画时长(ms),0 表示直接跳转 */
|
|
11
|
+
duration?: number;
|
|
12
|
+
}
|
|
13
|
+
declare var __VLS_7: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_7) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import('vue').DefineComponent<BackTopProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
click: (event: MouseEvent) => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<BackTopProps> & Readonly<{
|
|
20
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
right: number;
|
|
23
|
+
bottom: number;
|
|
24
|
+
duration: number;
|
|
25
|
+
visibilityHeight: number;
|
|
26
|
+
target: string | HTMLElement;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -10,6 +10,7 @@ export type CascaderValue = (string | number)[];
|
|
|
10
10
|
export interface CascaderProps {
|
|
11
11
|
options?: CascaderOption[];
|
|
12
12
|
modelValue?: CascaderValue;
|
|
13
|
+
/** 占位文案,不传时取语言包中的 `cascader.placeholder` */
|
|
13
14
|
placeholder?: string;
|
|
14
15
|
/** 已选路径的展示分隔符 */
|
|
15
16
|
separator?: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentSize, ThemeMode } from '../../composables/useGlobalConfig';
|
|
2
|
+
import { ProjectLocale, LocaleName } from '../../locale';
|
|
3
|
+
export interface ConfigProviderProps {
|
|
4
|
+
/** 语言包对象或语言名(`'zh-CN'` / `'en-US'`),默认 zh-CN */
|
|
5
|
+
locale?: ProjectLocale | LocaleName;
|
|
6
|
+
/** 组件统一尺寸,组件自身的 size 会覆盖此值,默认 medium */
|
|
7
|
+
size?: ComponentSize;
|
|
8
|
+
/** 弹层基础层级,默认 2000 */
|
|
9
|
+
zIndex?: number;
|
|
10
|
+
/** 主题模式,dark 时给 `<html>` 加 data-theme="dark",默认 light */
|
|
11
|
+
theme?: ThemeMode;
|
|
12
|
+
}
|
|
13
|
+
declare var __VLS_1: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_1) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import('vue').DefineComponent<ConfigProviderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ConfigProviderProps> & Readonly<{}>, {
|
|
18
|
+
size: ComponentSize;
|
|
19
|
+
locale: ProjectLocale | LocaleName;
|
|
20
|
+
zIndex: number;
|
|
21
|
+
theme: ThemeMode;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface ContextMenuItem {
|
|
2
|
+
/** 唯一标识,透传给 select 事件 */
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** 图标名,取自 Icon 组件内置图标 */
|
|
6
|
+
icon?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** 是否在本项上方显示分隔线 */
|
|
9
|
+
divided?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ContextMenuProps {
|
|
12
|
+
items?: ContextMenuItem[];
|
|
13
|
+
/** 是否禁用右键菜单 */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare function close(): void;
|
|
17
|
+
declare var __VLS_1: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
default?: (props: typeof __VLS_1) => any;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_base: import('vue').DefineComponent<ContextMenuProps, {
|
|
22
|
+
close: typeof close;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
select: (key: string) => any;
|
|
25
|
+
close: () => any;
|
|
26
|
+
open: () => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<ContextMenuProps> & Readonly<{
|
|
28
|
+
onSelect?: ((key: string) => any) | undefined;
|
|
29
|
+
onClose?: (() => any) | undefined;
|
|
30
|
+
onOpen?: (() => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
items: ContextMenuItem[];
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface FloatButtonProps {
|
|
2
|
+
/** 类型(语义色) */
|
|
3
|
+
type?: 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
4
|
+
/** 形状 */
|
|
5
|
+
shape?: 'circle' | 'square';
|
|
6
|
+
/** 尺寸 */
|
|
7
|
+
size?: 'small' | 'default' | 'large';
|
|
8
|
+
/** 图标名(见 Icon 组件);与默认插槽二选一 */
|
|
9
|
+
icon?: string;
|
|
10
|
+
/** 文字描述,显示在图标下方 */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** 悬浮提示 */
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
/** 传入后渲染为链接 <a> */
|
|
15
|
+
href?: string;
|
|
16
|
+
/** 链接打开方式,配合 href 使用 */
|
|
17
|
+
target?: '_self' | '_blank';
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare var __VLS_20: {};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
default?: (props: typeof __VLS_20) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import('vue').DefineComponent<FloatButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
click: (event: MouseEvent) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<FloatButtonProps> & Readonly<{
|
|
28
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
type: "default" | "primary" | "success" | "warning" | "danger";
|
|
31
|
+
size: "small" | "default" | "large";
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
loading: boolean;
|
|
34
|
+
tooltip: string;
|
|
35
|
+
description: string;
|
|
36
|
+
href: string;
|
|
37
|
+
target: "_self" | "_blank";
|
|
38
|
+
icon: string;
|
|
39
|
+
shape: "circle" | "square";
|
|
40
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
42
|
+
declare const _default: typeof __VLS_export;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface FloatButtonGroupProps {
|
|
2
|
+
/** 展开方向 */
|
|
3
|
+
direction?: 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
/** 触发方式:点击或悬浮展开 */
|
|
5
|
+
trigger?: 'click' | 'hover';
|
|
6
|
+
/** 是否展开(可用 v-model 双向绑定) */
|
|
7
|
+
open?: boolean;
|
|
8
|
+
/** 触发器图标 */
|
|
9
|
+
icon?: string;
|
|
10
|
+
/** 触发器形状 */
|
|
11
|
+
shape?: 'circle' | 'square';
|
|
12
|
+
/** 触发器的悬浮提示 */
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_1: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
default?: (props: typeof __VLS_1) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import('vue').DefineComponent<FloatButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
"update:open": (open: boolean) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<FloatButtonGroupProps> & Readonly<{
|
|
22
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
direction: "top" | "bottom" | "left" | "right";
|
|
25
|
+
open: boolean;
|
|
26
|
+
trigger: "click" | "hover";
|
|
27
|
+
tooltip: string;
|
|
28
|
+
icon: string;
|
|
29
|
+
shape: "circle" | "square";
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as FloatButton } from './FloatButton.vue';
|
|
2
|
+
import { default as FloatButtonGroup } from './FloatButtonGroup.vue';
|
|
3
|
+
export { FloatButton, FloatButtonGroup };
|
|
4
|
+
export type { FloatButtonProps } from './FloatButton.vue';
|
|
5
|
+
export type { FloatButtonGroupProps } from './FloatButtonGroup.vue';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface ImageProps {
|
|
2
|
+
src: string;
|
|
3
|
+
alt?: string;
|
|
4
|
+
width?: string | number;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
/** 是否允许点击打开预览,默认 true */
|
|
7
|
+
preview?: boolean;
|
|
8
|
+
/** 预览时的图片列表(多图可切换),默认只预览当前图 */
|
|
9
|
+
previewList?: string[];
|
|
10
|
+
/** 图片填充方式 */
|
|
11
|
+
fit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
12
|
+
/** 加载失败时展示的替代图地址 */
|
|
13
|
+
fallback?: string;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
error?: (props: typeof __VLS_1) => any;
|
|
18
|
+
} & {
|
|
19
|
+
mask?: (props: typeof __VLS_3) => any;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_base: import('vue').DefineComponent<ImageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ImageProps> & Readonly<{}>, {
|
|
22
|
+
width: string | number;
|
|
23
|
+
height: string | number;
|
|
24
|
+
alt: string;
|
|
25
|
+
fallback: string;
|
|
26
|
+
preview: boolean;
|
|
27
|
+
previewList: string[];
|
|
28
|
+
fit: "fill" | "contain" | "cover" | "none" | "scale-down";
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ImagePreviewProps {
|
|
2
|
+
/** 是否显示预览 */
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
/** 图片地址列表 */
|
|
5
|
+
images?: string[];
|
|
6
|
+
/** 当前显示第几张(从 0 开始) */
|
|
7
|
+
index?: number;
|
|
8
|
+
/** 挂载位置,默认 body */
|
|
9
|
+
teleportTo?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const __VLS_export: import('vue').DefineComponent<ImagePreviewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
close: () => any;
|
|
13
|
+
change: (index: number) => any;
|
|
14
|
+
"update:visible": (value: boolean) => any;
|
|
15
|
+
"update:index": (value: number) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<ImagePreviewProps> & Readonly<{
|
|
17
|
+
onClose?: (() => any) | undefined;
|
|
18
|
+
onChange?: ((index: number) => any) | undefined;
|
|
19
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
20
|
+
"onUpdate:index"?: ((value: number) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
visible: boolean;
|
|
23
|
+
index: number;
|
|
24
|
+
images: string[];
|
|
25
|
+
teleportTo: string;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface LayoutProps {
|
|
2
|
+
/** 布局方向;不传时按是否含 Sider 自动判断 */
|
|
3
|
+
direction?: 'horizontal' | 'vertical';
|
|
4
|
+
}
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import('vue').DefineComponent<LayoutProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LayoutProps> & Readonly<{}>, {
|
|
10
|
+
direction: "horizontal" | "vertical";
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface SiderProps {
|
|
2
|
+
/** 展开时的宽度 */
|
|
3
|
+
width?: number | string;
|
|
4
|
+
/** 收起时的宽度 */
|
|
5
|
+
collapsedWidth?: number | string;
|
|
6
|
+
/** 是否收起(可用 v-model 双向绑定) */
|
|
7
|
+
collapsed?: boolean;
|
|
8
|
+
/** 是否显示折叠触发器 */
|
|
9
|
+
collapsible?: boolean;
|
|
10
|
+
/** 翻转触发器箭头方向(用于右侧侧边栏) */
|
|
11
|
+
reverseArrow?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare var __VLS_1: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_1) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import('vue').DefineComponent<SiderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
collapse: (collapsed: boolean, type: "clickTrigger" | "responsive") => any;
|
|
19
|
+
"update:collapsed": (collapsed: boolean) => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<SiderProps> & Readonly<{
|
|
21
|
+
onCollapse?: ((collapsed: boolean, type: "clickTrigger" | "responsive") => any) | undefined;
|
|
22
|
+
"onUpdate:collapsed"?: ((collapsed: boolean) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
width: number | string;
|
|
25
|
+
collapsedWidth: number | string;
|
|
26
|
+
collapsed: boolean;
|
|
27
|
+
collapsible: boolean;
|
|
28
|
+
reverseArrow: boolean;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
/** Layout 与 Sider 之间的上下文:Sider 挂载/卸载时登记,供 Layout 自动判断水平布局 */
|
|
3
|
+
export interface LayoutContext {
|
|
4
|
+
/** 登记一个 Sider,返回注销函数 */
|
|
5
|
+
registerSider: () => () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const LAYOUT_CONTEXT_KEY: InjectionKey<LayoutContext>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as Layout } from './Layout.vue';
|
|
2
|
+
import { default as Header } from './Header.vue';
|
|
3
|
+
import { default as Sider } from './Sider.vue';
|
|
4
|
+
import { default as Content } from './Content.vue';
|
|
5
|
+
import { default as Footer } from './Footer.vue';
|
|
6
|
+
export { Layout, Header, Sider, Content, Footer };
|
|
7
|
+
export type { LayoutProps } from './Layout.vue';
|
|
8
|
+
export type { SiderProps } from './Sider.vue';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { MentionFilter, MentionOption } from './types';
|
|
2
|
+
export interface MentionsProps {
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
/** 候选项 */
|
|
5
|
+
options?: MentionOption[];
|
|
6
|
+
/** 触发前缀,可传多个 */
|
|
7
|
+
prefix?: string | string[];
|
|
8
|
+
rows?: number;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
/** 自定义过滤;传 false 关闭过滤 */
|
|
13
|
+
filterOption?: MentionFilter | false;
|
|
14
|
+
/** 无匹配时的文案 */
|
|
15
|
+
notFoundContent?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const __VLS_export: import('vue').DefineComponent<MentionsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
search: (text: string, prefix: string) => any;
|
|
19
|
+
select: (option: MentionOption, prefix: string) => any;
|
|
20
|
+
"update:modelValue": (value: string) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<MentionsProps> & Readonly<{
|
|
22
|
+
onSearch?: ((text: string, prefix: string) => any) | undefined;
|
|
23
|
+
onSelect?: ((option: MentionOption, prefix: string) => any) | undefined;
|
|
24
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
modelValue: string;
|
|
28
|
+
placeholder: string;
|
|
29
|
+
readonly: boolean;
|
|
30
|
+
options: MentionOption[];
|
|
31
|
+
rows: number;
|
|
32
|
+
prefix: string | string[];
|
|
33
|
+
filterOption: MentionFilter | false;
|
|
34
|
+
notFoundContent: string;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|