@ccn-ui-kit/tree 0.1.2
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/dist/index.cjs +1 -0
- package/dist/index.js +527 -0
- package/dist/packages/components/__tests__/loading.spec.d.ts +1 -0
- package/dist/packages/components/badge/index.d.ts +10 -0
- package/dist/packages/components/badge/src/badge.d.ts +25 -0
- package/dist/packages/components/breadcrumb/index.d.ts +12 -0
- package/dist/packages/components/breadcrumb/src/breadcrumb-item.d.ts +13 -0
- package/dist/packages/components/breadcrumb/src/breadcrumb.d.ts +10 -0
- package/dist/packages/components/button/index.d.ts +10 -0
- package/dist/packages/components/button/src/button.d.ts +25 -0
- package/dist/packages/components/date-picker/index.d.ts +10 -0
- package/dist/packages/components/date-picker/src/date-picker.d.ts +20 -0
- package/dist/packages/components/descriptions/index.d.ts +12 -0
- package/dist/packages/components/descriptions/src/descriptions-item.d.ts +13 -0
- package/dist/packages/components/descriptions/src/descriptions.d.ts +17 -0
- package/dist/packages/components/divider/index.d.ts +10 -0
- package/dist/packages/components/divider/src/divider.d.ts +20 -0
- package/dist/packages/components/dropdown/index.d.ts +12 -0
- package/dist/packages/components/dropdown/src/dropdown-item.d.ts +20 -0
- package/dist/packages/components/dropdown/src/dropdown.d.ts +46 -0
- package/dist/packages/components/form/index.d.ts +12 -0
- package/dist/packages/components/form/src/form-item.d.ts +45 -0
- package/dist/packages/components/form/src/form.d.ts +96 -0
- package/dist/packages/components/icon/index.d.ts +11 -0
- package/dist/packages/components/icon/src/icon.d.ts +18 -0
- package/dist/packages/components/icon/src/icons.d.ts +50 -0
- package/dist/packages/components/input/index.d.ts +10 -0
- package/dist/packages/components/input/src/input.d.ts +25 -0
- package/dist/packages/components/link/index.d.ts +10 -0
- package/dist/packages/components/link/src/link.d.ts +25 -0
- package/dist/packages/components/loading/index.d.ts +10 -0
- package/dist/packages/components/loading/src/loading.d.ts +15 -0
- package/dist/packages/components/menu/index.d.ts +14 -0
- package/dist/packages/components/menu/src/menu-item.d.ts +12 -0
- package/dist/packages/components/menu/src/menu.d.ts +40 -0
- package/dist/packages/components/menu/src/sub-menu.d.ts +12 -0
- package/dist/packages/components/message/index.d.ts +12 -0
- package/dist/packages/components/message/src/manager.d.ts +14 -0
- package/dist/packages/components/message/src/message.d.ts +28 -0
- package/dist/packages/components/modal/index.d.ts +10 -0
- package/dist/packages/components/modal/src/modal.d.ts +46 -0
- package/dist/packages/components/notification/index.d.ts +12 -0
- package/dist/packages/components/notification/src/manager.d.ts +14 -0
- package/dist/packages/components/notification/src/notification.d.ts +44 -0
- package/dist/packages/components/pagination/index.d.ts +10 -0
- package/dist/packages/components/pagination/src/pagination.d.ts +30 -0
- package/dist/packages/components/popconfirm/index.d.ts +10 -0
- package/dist/packages/components/popconfirm/src/popconfirm.d.ts +56 -0
- package/dist/packages/components/rich-editor/index.d.ts +10 -0
- package/dist/packages/components/rich-editor/src/rich-editor.d.ts +36 -0
- package/dist/packages/components/select/index.d.ts +10 -0
- package/dist/packages/components/select/src/select.d.ts +45 -0
- package/dist/packages/components/space/index.d.ts +10 -0
- package/dist/packages/components/space/src/space.d.ts +33 -0
- package/dist/packages/components/steps/index.d.ts +12 -0
- package/dist/packages/components/steps/src/step.d.ts +28 -0
- package/dist/packages/components/steps/src/steps.d.ts +46 -0
- package/dist/packages/components/table/index.d.ts +10 -0
- package/dist/packages/components/table/src/table.d.ts +56 -0
- package/dist/packages/components/tabs/index.d.ts +12 -0
- package/dist/packages/components/tabs/src/tab-pane.d.ts +22 -0
- package/dist/packages/components/tabs/src/tabs.d.ts +43 -0
- package/dist/packages/components/tree/index.d.ts +10 -0
- package/dist/packages/components/tree/src/tree-node.vue.d.ts +29 -0
- package/dist/packages/components/tree/src/tree.d.ts +134 -0
- package/dist/packages/components/tree/src/tree.vue.d.ts +167 -0
- package/dist/packages/components/upload/index.d.ts +10 -0
- package/dist/packages/components/upload/src/upload.d.ts +103 -0
- package/dist/packages/directives/index.d.ts +2 -0
- package/dist/packages/directives/loading/index.d.ts +11 -0
- package/dist/packages/directives/permission/index.d.ts +3 -0
- package/dist/packages/ui-kit/index.d.ts +34 -0
- package/dist/packages/utils/dom.d.ts +5 -0
- package/dist/packages/utils/index.d.ts +3 -0
- package/dist/packages/utils/types.d.ts +7 -0
- package/dist/packages/utils/vue-helper.d.ts +9 -0
- package/dist/play/main.d.ts +1 -0
- package/dist/play/vite.config.d.ts +2 -0
- package/package.json +27 -0
- package/style/index.scss +109 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
export declare const subMenuProps: {
|
|
4
|
+
/** 唯一索引,用于控制展开/收起 */
|
|
5
|
+
readonly index: {
|
|
6
|
+
readonly type: StringConstructor;
|
|
7
|
+
readonly required: true;
|
|
8
|
+
};
|
|
9
|
+
/** 是否禁用展开 */
|
|
10
|
+
readonly disabled: BooleanConstructor;
|
|
11
|
+
};
|
|
12
|
+
export type SubMenuProps = ExtractPropTypes<typeof subMenuProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as Message } from './src/message.vue';
|
|
3
|
+
import { message } from './src/manager';
|
|
4
|
+
|
|
5
|
+
export declare const MessagePlugin: {
|
|
6
|
+
name: string;
|
|
7
|
+
install(app: App): void;
|
|
8
|
+
};
|
|
9
|
+
export { Message, message };
|
|
10
|
+
export default message;
|
|
11
|
+
export * from './src/message';
|
|
12
|
+
export * from './src/manager';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { MessageHandler, MessageOptions } from './message';
|
|
3
|
+
|
|
4
|
+
type MessageShorthand = (message: string | VNode, options?: Omit<MessageOptions, 'message' | 'type'>) => MessageHandler;
|
|
5
|
+
/** message() 函数本身及其快捷方法(success/warning/info/error) */
|
|
6
|
+
export interface MessageFn {
|
|
7
|
+
(options: MessageOptions | string): MessageHandler;
|
|
8
|
+
success: MessageShorthand;
|
|
9
|
+
warning: MessageShorthand;
|
|
10
|
+
info: MessageShorthand;
|
|
11
|
+
error: MessageShorthand;
|
|
12
|
+
}
|
|
13
|
+
export declare const message: MessageFn;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType, VNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
export type MessageType = 'success' | 'warning' | 'info' | 'error';
|
|
4
|
+
export declare const messageProps: {
|
|
5
|
+
/** 提示类型,决定图标与配色 */
|
|
6
|
+
readonly type: {
|
|
7
|
+
readonly type: PropType<MessageType>;
|
|
8
|
+
readonly default: "info";
|
|
9
|
+
};
|
|
10
|
+
/** 是否显示关闭按钮 */
|
|
11
|
+
readonly showClose: BooleanConstructor;
|
|
12
|
+
};
|
|
13
|
+
export type MessageProps = ExtractPropTypes<typeof messageProps>;
|
|
14
|
+
/** message() 命令式调用时的选项 */
|
|
15
|
+
export interface MessageOptions {
|
|
16
|
+
/** 提示内容,支持字符串或 VNode */
|
|
17
|
+
message: string | VNode;
|
|
18
|
+
type?: MessageType;
|
|
19
|
+
/** 自动关闭时间(ms),0 表示不自动关闭,默认 3000 */
|
|
20
|
+
duration?: number;
|
|
21
|
+
showClose?: boolean;
|
|
22
|
+
/** 关闭(含自动关闭)后回调 */
|
|
23
|
+
onClose?: () => void;
|
|
24
|
+
}
|
|
25
|
+
/** message() 返回的句柄,可手动调用 close() 关闭 */
|
|
26
|
+
export interface MessageHandler {
|
|
27
|
+
close: () => void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
export declare const modalProps: {
|
|
4
|
+
/** 是否显示,支持 v-model */
|
|
5
|
+
readonly modelValue: BooleanConstructor;
|
|
6
|
+
/** 标题(可被 #header 插槽覆盖) */
|
|
7
|
+
readonly title: {
|
|
8
|
+
readonly type: StringConstructor;
|
|
9
|
+
readonly default: "";
|
|
10
|
+
};
|
|
11
|
+
/** 宽度:数字按 px,字符串作为 CSS 长度(如 '30%') */
|
|
12
|
+
readonly width: {
|
|
13
|
+
readonly type: [NumberConstructor, StringConstructor];
|
|
14
|
+
readonly default: 500;
|
|
15
|
+
};
|
|
16
|
+
/** 距顶部距离;center 生效时忽略 */
|
|
17
|
+
readonly top: {
|
|
18
|
+
readonly type: StringConstructor;
|
|
19
|
+
readonly default: "15vh";
|
|
20
|
+
};
|
|
21
|
+
/** 点击遮罩关闭 */
|
|
22
|
+
readonly closeOnClickMask: {
|
|
23
|
+
readonly type: BooleanConstructor;
|
|
24
|
+
readonly default: true;
|
|
25
|
+
};
|
|
26
|
+
/** 显示右上角关闭按钮 */
|
|
27
|
+
readonly showClose: {
|
|
28
|
+
readonly type: BooleanConstructor;
|
|
29
|
+
readonly default: true;
|
|
30
|
+
};
|
|
31
|
+
/** 垂直居中显示 */
|
|
32
|
+
readonly center: BooleanConstructor;
|
|
33
|
+
/** 自定义 z-index;缺省时自动递增,保证后打开的盖在之前之上 */
|
|
34
|
+
readonly zIndex: NumberConstructor;
|
|
35
|
+
};
|
|
36
|
+
export declare const modalEmits: {
|
|
37
|
+
/** v-model */
|
|
38
|
+
'update:modelValue': (value: boolean) => boolean;
|
|
39
|
+
/** 打开开始 */
|
|
40
|
+
open: () => boolean;
|
|
41
|
+
/** 关闭开始 */
|
|
42
|
+
close: () => boolean;
|
|
43
|
+
/** 关闭动画结束 */
|
|
44
|
+
closed: () => boolean;
|
|
45
|
+
};
|
|
46
|
+
export type ModalProps = ExtractPropTypes<typeof modalProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as Notification } from './src/notification.vue';
|
|
3
|
+
import { notification } from './src/manager';
|
|
4
|
+
|
|
5
|
+
export declare const NotificationPlugin: {
|
|
6
|
+
name: string;
|
|
7
|
+
install(app: App): void;
|
|
8
|
+
};
|
|
9
|
+
export { Notification, notification };
|
|
10
|
+
export default notification;
|
|
11
|
+
export * from './src/notification';
|
|
12
|
+
export * from './src/manager';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { NotificationHandler, NotificationOptions } from './notification';
|
|
3
|
+
|
|
4
|
+
type NotificationShorthand = (message: string | VNode, options?: Omit<NotificationOptions, 'message' | 'type'>) => NotificationHandler;
|
|
5
|
+
/** notification() 函数本身及其快捷方法(success/warning/info/error) */
|
|
6
|
+
export interface NotificationFn {
|
|
7
|
+
(options: NotificationOptions | string): NotificationHandler;
|
|
8
|
+
success: NotificationShorthand;
|
|
9
|
+
warning: NotificationShorthand;
|
|
10
|
+
info: NotificationShorthand;
|
|
11
|
+
error: NotificationShorthand;
|
|
12
|
+
}
|
|
13
|
+
export declare const notification: NotificationFn;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType, VNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
export type NotificationType = 'success' | 'warning' | 'info' | 'error';
|
|
4
|
+
export type NotificationPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
5
|
+
export declare const notificationProps: {
|
|
6
|
+
/** 通知类型,决定图标与配色 */
|
|
7
|
+
readonly type: {
|
|
8
|
+
readonly type: PropType<NotificationType>;
|
|
9
|
+
readonly default: "info";
|
|
10
|
+
};
|
|
11
|
+
/** 标题 */
|
|
12
|
+
readonly title: {
|
|
13
|
+
readonly type: StringConstructor;
|
|
14
|
+
readonly default: "";
|
|
15
|
+
};
|
|
16
|
+
/** 是否显示关闭按钮 */
|
|
17
|
+
readonly showClose: {
|
|
18
|
+
readonly type: BooleanConstructor;
|
|
19
|
+
readonly default: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type NotificationProps = ExtractPropTypes<typeof notificationProps>;
|
|
23
|
+
/** notification() 命令式调用时的选项 */
|
|
24
|
+
export interface NotificationOptions {
|
|
25
|
+
/** 正文内容,支持字符串或 VNode */
|
|
26
|
+
message: string | VNode;
|
|
27
|
+
/** 标题 */
|
|
28
|
+
title?: string;
|
|
29
|
+
type?: NotificationType;
|
|
30
|
+
/** 自动关闭时间(ms),0 表示不自动关闭,默认 4500 */
|
|
31
|
+
duration?: number;
|
|
32
|
+
/** 出现位置,默认右上角 */
|
|
33
|
+
position?: NotificationPosition;
|
|
34
|
+
/** 是否显示关闭按钮,默认 true */
|
|
35
|
+
showClose?: boolean;
|
|
36
|
+
/** 点击通知卡片回调 */
|
|
37
|
+
onClick?: () => void;
|
|
38
|
+
/** 关闭(含自动关闭)后回调 */
|
|
39
|
+
onClose?: () => void;
|
|
40
|
+
}
|
|
41
|
+
/** notification() 返回的句柄,可手动调用 close() 关闭 */
|
|
42
|
+
export interface NotificationHandler {
|
|
43
|
+
close: () => void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as Pagination } from './src/pagination.vue';
|
|
3
|
+
|
|
4
|
+
export declare const PaginationPlugin: {
|
|
5
|
+
name: string;
|
|
6
|
+
install(app: App): void;
|
|
7
|
+
};
|
|
8
|
+
export { Pagination };
|
|
9
|
+
export default Pagination;
|
|
10
|
+
export * from './src/pagination';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
export declare const paginationProps: {
|
|
4
|
+
readonly modelValue: {
|
|
5
|
+
readonly type: NumberConstructor;
|
|
6
|
+
readonly default: 1;
|
|
7
|
+
};
|
|
8
|
+
readonly total: {
|
|
9
|
+
readonly type: NumberConstructor;
|
|
10
|
+
readonly default: 0;
|
|
11
|
+
};
|
|
12
|
+
readonly pageSize: {
|
|
13
|
+
readonly type: NumberConstructor;
|
|
14
|
+
readonly default: 10;
|
|
15
|
+
};
|
|
16
|
+
readonly pagerCount: {
|
|
17
|
+
readonly type: NumberConstructor;
|
|
18
|
+
readonly default: 7;
|
|
19
|
+
};
|
|
20
|
+
readonly layout: {
|
|
21
|
+
readonly type: StringConstructor;
|
|
22
|
+
readonly default: "prev, pager, next";
|
|
23
|
+
};
|
|
24
|
+
readonly disabled: BooleanConstructor;
|
|
25
|
+
};
|
|
26
|
+
export declare const paginationEmits: {
|
|
27
|
+
'update:modelValue': (page: number) => boolean;
|
|
28
|
+
change: (page: number) => boolean;
|
|
29
|
+
};
|
|
30
|
+
export type PaginationProps = ExtractPropTypes<typeof paginationProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as Popconfirm } from './src/popconfirm.vue';
|
|
3
|
+
|
|
4
|
+
export declare const PopconfirmPlugin: {
|
|
5
|
+
name: string;
|
|
6
|
+
install(app: App): void;
|
|
7
|
+
};
|
|
8
|
+
export { Popconfirm };
|
|
9
|
+
export default Popconfirm;
|
|
10
|
+
export * from './src/popconfirm';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
export declare const popconfirmProps: {
|
|
4
|
+
/** 是否显示(v-model) */
|
|
5
|
+
readonly modelValue: {
|
|
6
|
+
readonly type: BooleanConstructor;
|
|
7
|
+
readonly default: false;
|
|
8
|
+
};
|
|
9
|
+
/** 提示文案,也可用 #title 插槽自定义 */
|
|
10
|
+
readonly title: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly default: "";
|
|
13
|
+
};
|
|
14
|
+
/** 确认按钮文案 */
|
|
15
|
+
readonly confirmText: {
|
|
16
|
+
readonly type: StringConstructor;
|
|
17
|
+
readonly default: "确定";
|
|
18
|
+
};
|
|
19
|
+
/** 取消按钮文案 */
|
|
20
|
+
readonly cancelText: {
|
|
21
|
+
readonly type: StringConstructor;
|
|
22
|
+
readonly default: "取消";
|
|
23
|
+
};
|
|
24
|
+
/** 确认按钮类型 */
|
|
25
|
+
readonly confirmButtonType: {
|
|
26
|
+
readonly type: StringConstructor;
|
|
27
|
+
readonly default: "primary";
|
|
28
|
+
};
|
|
29
|
+
/** 面板弹出位置 */
|
|
30
|
+
readonly placement: {
|
|
31
|
+
readonly type: StringConstructor;
|
|
32
|
+
readonly default: "top";
|
|
33
|
+
};
|
|
34
|
+
/** 面板基础宽度(min-width):内容更长时随按钮/文案自适应变宽 */
|
|
35
|
+
readonly width: {
|
|
36
|
+
readonly type: [NumberConstructor, StringConstructor];
|
|
37
|
+
readonly default: 180;
|
|
38
|
+
};
|
|
39
|
+
/** 触发方式:click | hover */
|
|
40
|
+
readonly trigger: {
|
|
41
|
+
readonly type: StringConstructor;
|
|
42
|
+
readonly default: "click";
|
|
43
|
+
};
|
|
44
|
+
/** 是否禁用 */
|
|
45
|
+
readonly disabled: BooleanConstructor;
|
|
46
|
+
};
|
|
47
|
+
export declare const popconfirmEmits: {
|
|
48
|
+
'update:modelValue': (visible: boolean) => boolean;
|
|
49
|
+
/** 点击确认 */
|
|
50
|
+
confirm: () => boolean;
|
|
51
|
+
/** 点击取消 */
|
|
52
|
+
cancel: () => boolean;
|
|
53
|
+
/** 面板显隐变化 */
|
|
54
|
+
'visible-change': (visible: boolean) => boolean;
|
|
55
|
+
};
|
|
56
|
+
export type PopconfirmProps = ExtractPropTypes<typeof popconfirmProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as RichEditor } from './src/rich-editor.vue';
|
|
3
|
+
|
|
4
|
+
export declare const RichEditorPlugin: {
|
|
5
|
+
name: string;
|
|
6
|
+
install(app: App): void;
|
|
7
|
+
};
|
|
8
|
+
export { RichEditor };
|
|
9
|
+
export default RichEditor;
|
|
10
|
+
export * from './src/rich-editor';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
export declare const richEditorProps: {
|
|
4
|
+
/** 富文本 HTML 内容(v-model) */
|
|
5
|
+
readonly modelValue: {
|
|
6
|
+
readonly type: StringConstructor;
|
|
7
|
+
readonly default: undefined;
|
|
8
|
+
};
|
|
9
|
+
/** 空内容时的占位文案 */
|
|
10
|
+
readonly placeholder: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly default: "请输入内容";
|
|
13
|
+
};
|
|
14
|
+
/** 是否禁用 */
|
|
15
|
+
readonly disabled: BooleanConstructor;
|
|
16
|
+
/** 编辑区最小高度:数字按 px,字符串作为 CSS 长度 */
|
|
17
|
+
readonly minHeight: {
|
|
18
|
+
readonly type: [NumberConstructor, StringConstructor];
|
|
19
|
+
readonly default: 120;
|
|
20
|
+
};
|
|
21
|
+
/** 工具栏按钮子集(key 见 Tool 配置);缺省展示全部 */
|
|
22
|
+
readonly toolbar: {
|
|
23
|
+
readonly type: PropType<string[]>;
|
|
24
|
+
readonly default: undefined;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const richEditorEmits: {
|
|
28
|
+
'update:modelValue': (val: string) => boolean;
|
|
29
|
+
/** 内容变化时触发 */
|
|
30
|
+
input: (val: string) => boolean;
|
|
31
|
+
/** 失焦时触发(提交值) */
|
|
32
|
+
change: (val: string) => boolean;
|
|
33
|
+
focus: () => boolean;
|
|
34
|
+
blur: () => boolean;
|
|
35
|
+
};
|
|
36
|
+
export type RichEditorProps = ExtractPropTypes<typeof richEditorProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
/** 下拉选项 */
|
|
4
|
+
export interface SelectOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type SelectValue = string | number;
|
|
10
|
+
export type SelectValues = SelectValue[];
|
|
11
|
+
export declare const selectProps: {
|
|
12
|
+
/** 选中值(v-model)。multiple 时为数组 */
|
|
13
|
+
readonly modelValue: {
|
|
14
|
+
readonly type: PropType<SelectValue | SelectValues | undefined>;
|
|
15
|
+
readonly default: undefined;
|
|
16
|
+
};
|
|
17
|
+
/** 选项列表 */
|
|
18
|
+
readonly options: {
|
|
19
|
+
readonly type: PropType<SelectOption[]>;
|
|
20
|
+
readonly default: () => SelectOption[];
|
|
21
|
+
};
|
|
22
|
+
/** 空状态占位文案 */
|
|
23
|
+
readonly placeholder: {
|
|
24
|
+
readonly type: StringConstructor;
|
|
25
|
+
readonly default: "请选择";
|
|
26
|
+
};
|
|
27
|
+
/** 是否禁用 */
|
|
28
|
+
readonly disabled: BooleanConstructor;
|
|
29
|
+
/** 是否显示清除按钮 */
|
|
30
|
+
readonly clearable: BooleanConstructor;
|
|
31
|
+
/** 是否多选 */
|
|
32
|
+
readonly multiple: BooleanConstructor;
|
|
33
|
+
/** 是否可输入过滤 */
|
|
34
|
+
readonly filterable: BooleanConstructor;
|
|
35
|
+
};
|
|
36
|
+
export declare const selectEmits: {
|
|
37
|
+
'update:modelValue': (_val: unknown) => boolean;
|
|
38
|
+
/** 选中值变化时触发(单选为值,多选为数组) */
|
|
39
|
+
change: (_val: unknown) => boolean;
|
|
40
|
+
/** 点击清除按钮触发 */
|
|
41
|
+
clear: () => boolean;
|
|
42
|
+
/** 下拉面板显隐变化 */
|
|
43
|
+
'visible-change': (visible: boolean) => boolean;
|
|
44
|
+
};
|
|
45
|
+
export type SelectProps = ExtractPropTypes<typeof selectProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType, VNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
export type SpaceDirection = 'horizontal' | 'vertical';
|
|
4
|
+
export type SpaceAlign = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
|
|
5
|
+
/** 数字为 px;字符串可为 'small' | 'default' | 'large' 或带单位值(如 '12px');数组为 [横向, 纵向] */
|
|
6
|
+
export type SpaceSize = number | string | [number | string, number | string];
|
|
7
|
+
export declare const spaceProps: {
|
|
8
|
+
/** 间距,见 SpaceSize */
|
|
9
|
+
readonly size: {
|
|
10
|
+
readonly type: PropType<SpaceSize>;
|
|
11
|
+
readonly default: 8;
|
|
12
|
+
};
|
|
13
|
+
/** 排列方向 */
|
|
14
|
+
readonly direction: {
|
|
15
|
+
readonly type: PropType<SpaceDirection>;
|
|
16
|
+
readonly default: "horizontal";
|
|
17
|
+
};
|
|
18
|
+
/** 交叉轴对齐方式 */
|
|
19
|
+
readonly align: {
|
|
20
|
+
readonly type: PropType<SpaceAlign>;
|
|
21
|
+
readonly default: "start";
|
|
22
|
+
};
|
|
23
|
+
/** 横向时是否允许换行 */
|
|
24
|
+
readonly wrap: BooleanConstructor;
|
|
25
|
+
/** 是否占满容器宽度并使子项均分 */
|
|
26
|
+
readonly fill: BooleanConstructor;
|
|
27
|
+
/** 子项之间的分隔元素,可为 '|' 等字符串或 VNode(如 <UiDivider direction="vertical" />) */
|
|
28
|
+
readonly spacer: {
|
|
29
|
+
readonly type: PropType<string | VNode>;
|
|
30
|
+
readonly default: undefined;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type SpaceProps = ExtractPropTypes<typeof spaceProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as Steps } from './src/steps.vue';
|
|
3
|
+
import { default as Step } from './src/step.vue';
|
|
4
|
+
|
|
5
|
+
export declare const StepsPlugin: {
|
|
6
|
+
name: string;
|
|
7
|
+
install(app: App): void;
|
|
8
|
+
};
|
|
9
|
+
export { Steps, Step };
|
|
10
|
+
export default Steps;
|
|
11
|
+
export * from './src/steps';
|
|
12
|
+
export * from './src/step';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import { StepStatus } from './steps';
|
|
3
|
+
|
|
4
|
+
export declare const stepProps: {
|
|
5
|
+
/** 步骤标题 */
|
|
6
|
+
readonly title: {
|
|
7
|
+
readonly type: StringConstructor;
|
|
8
|
+
readonly default: "";
|
|
9
|
+
};
|
|
10
|
+
/** 步骤描述 */
|
|
11
|
+
readonly description: {
|
|
12
|
+
readonly type: StringConstructor;
|
|
13
|
+
readonly default: "";
|
|
14
|
+
};
|
|
15
|
+
/** 自定义图标名(复用 Icon 组件) */
|
|
16
|
+
readonly icon: {
|
|
17
|
+
readonly type: StringConstructor;
|
|
18
|
+
readonly default: "";
|
|
19
|
+
};
|
|
20
|
+
/** 覆盖由父级 active 推断出的状态 */
|
|
21
|
+
readonly status: {
|
|
22
|
+
readonly type: PropType<StepStatus>;
|
|
23
|
+
readonly default: undefined;
|
|
24
|
+
};
|
|
25
|
+
/** 是否禁用 */
|
|
26
|
+
readonly disabled: BooleanConstructor;
|
|
27
|
+
};
|
|
28
|
+
export type StepProps = ExtractPropTypes<typeof stepProps>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ExtractPropTypes, InjectionKey, PropType, Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
export type StepStatus = 'wait' | 'process' | 'finish' | 'error' | 'success';
|
|
4
|
+
export type StepsDirection = 'horizontal' | 'vertical';
|
|
5
|
+
export declare const stepsProps: {
|
|
6
|
+
/** 当前激活步骤下标(0 起,-1 表示全部处于等待) */
|
|
7
|
+
readonly active: {
|
|
8
|
+
readonly type: NumberConstructor;
|
|
9
|
+
readonly default: 0;
|
|
10
|
+
};
|
|
11
|
+
/** 排列方向 */
|
|
12
|
+
readonly direction: {
|
|
13
|
+
readonly type: PropType<StepsDirection>;
|
|
14
|
+
readonly default: "horizontal";
|
|
15
|
+
};
|
|
16
|
+
/** 当前激活步骤的状态 */
|
|
17
|
+
readonly processStatus: {
|
|
18
|
+
readonly type: PropType<StepStatus>;
|
|
19
|
+
readonly default: "process";
|
|
20
|
+
};
|
|
21
|
+
/** 已走过步骤的状态 */
|
|
22
|
+
readonly finishStatus: {
|
|
23
|
+
readonly type: PropType<StepStatus>;
|
|
24
|
+
readonly default: "finish";
|
|
25
|
+
};
|
|
26
|
+
/** 垂直方向时标题与描述是否居中 */
|
|
27
|
+
readonly alignCenter: BooleanConstructor;
|
|
28
|
+
};
|
|
29
|
+
export type StepsProps = ExtractPropTypes<typeof stepsProps>;
|
|
30
|
+
/** Step 自注册到 Steps 的状态(父级据以计算下标与总数) */
|
|
31
|
+
export interface StepState {
|
|
32
|
+
status?: StepStatus;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** 提供给 Step 的上下文 */
|
|
36
|
+
export interface StepsContext {
|
|
37
|
+
steps: Ref<StepState[]>;
|
|
38
|
+
active: Ref<number>;
|
|
39
|
+
direction: Ref<StepsDirection>;
|
|
40
|
+
processStatus: Ref<StepStatus>;
|
|
41
|
+
finishStatus: Ref<StepStatus>;
|
|
42
|
+
alignCenter: Ref<boolean>;
|
|
43
|
+
registerStep: (step: StepState) => void;
|
|
44
|
+
unregisterStep: (step: StepState) => void;
|
|
45
|
+
}
|
|
46
|
+
export declare const stepsContextKey: InjectionKey<StepsContext>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
/** 表格列配置 */
|
|
4
|
+
export interface UiTableColumn {
|
|
5
|
+
/** 列标题 */
|
|
6
|
+
label: string;
|
|
7
|
+
/** 对应数据字段 key(通过 data 行的该字段取值) */
|
|
8
|
+
prop?: string;
|
|
9
|
+
/** 列宽:数字按 px,字符串作为 CSS 长度(如 '20%') */
|
|
10
|
+
width?: string | number;
|
|
11
|
+
/** 单元格对齐方式 */
|
|
12
|
+
align?: 'left' | 'center' | 'right';
|
|
13
|
+
/** 自定义单元格内容插槽名(优先级最高,覆盖 formatter 与默认取值) */
|
|
14
|
+
slot?: string;
|
|
15
|
+
/** 自定义表头插槽名 */
|
|
16
|
+
headerSlot?: string;
|
|
17
|
+
/** 单元格格式化函数,返回 HTML 字符串 */
|
|
18
|
+
formatter?: (row: Record<string, unknown>, column: UiTableColumn, cellValue: unknown, index: number) => string;
|
|
19
|
+
/** 是否可排序:点击表头升序 → 降序 → 取消 */
|
|
20
|
+
sortable?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const tableProps: {
|
|
23
|
+
/** 表格数据 */
|
|
24
|
+
readonly data: {
|
|
25
|
+
readonly type: PropType<Record<string, unknown>[]>;
|
|
26
|
+
readonly default: () => never[];
|
|
27
|
+
};
|
|
28
|
+
/** 列配置 */
|
|
29
|
+
readonly columns: {
|
|
30
|
+
readonly type: PropType<UiTableColumn[]>;
|
|
31
|
+
readonly default: () => never[];
|
|
32
|
+
};
|
|
33
|
+
/** 斑马纹行 */
|
|
34
|
+
readonly stripe: BooleanConstructor;
|
|
35
|
+
/** 纵向边框线 */
|
|
36
|
+
readonly border: BooleanConstructor;
|
|
37
|
+
/** 尺寸:large / medium / small */
|
|
38
|
+
readonly size: {
|
|
39
|
+
readonly type: StringConstructor;
|
|
40
|
+
readonly default: "medium";
|
|
41
|
+
};
|
|
42
|
+
/** 空数据文案 */
|
|
43
|
+
readonly emptyText: {
|
|
44
|
+
readonly type: StringConstructor;
|
|
45
|
+
readonly default: "暂无数据";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const tableEmits: {
|
|
49
|
+
/** 排序状态变化:order 为 ascending / descending / null(取消排序) */
|
|
50
|
+
readonly 'sort-change': (payload: {
|
|
51
|
+
column: UiTableColumn;
|
|
52
|
+
prop: string;
|
|
53
|
+
order: "ascending" | "descending" | null;
|
|
54
|
+
}) => boolean;
|
|
55
|
+
};
|
|
56
|
+
export type TableProps = ExtractPropTypes<typeof tableProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as Tabs } from './src/tabs.vue';
|
|
3
|
+
import { default as TabPane } from './src/tab-pane.vue';
|
|
4
|
+
|
|
5
|
+
export declare const TabsPlugin: {
|
|
6
|
+
name: string;
|
|
7
|
+
install(app: App): void;
|
|
8
|
+
};
|
|
9
|
+
export { Tabs, TabPane };
|
|
10
|
+
export default Tabs;
|
|
11
|
+
export * from './src/tabs';
|
|
12
|
+
export * from './src/tab-pane';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
export declare const tabPaneProps: {
|
|
4
|
+
/** 唯一标识,与 Tabs 的 v-model 对应 */
|
|
5
|
+
readonly name: {
|
|
6
|
+
readonly type: [StringConstructor, NumberConstructor];
|
|
7
|
+
readonly required: true;
|
|
8
|
+
};
|
|
9
|
+
/** 页签标题(可用 #label 插槽完全自定义) */
|
|
10
|
+
readonly label: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly default: "";
|
|
13
|
+
};
|
|
14
|
+
/** 是否禁用 */
|
|
15
|
+
readonly disabled: BooleanConstructor;
|
|
16
|
+
/** 是否显示关闭按钮:缺省继承 Tabs 的 closable */
|
|
17
|
+
readonly closable: {
|
|
18
|
+
readonly type: BooleanConstructor;
|
|
19
|
+
readonly default: undefined;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type TabPaneProps = ExtractPropTypes<typeof tabPaneProps>;
|