@mtn-ui/components 1.0.6 → 1.0.8
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/antd-wrapped/action-group/action-group.vue.js +2 -2
- package/dist/antd-wrapped/action-group/action-group.vue2.js +209 -159
- package/dist/antd-wrapped/table/table.js +6 -21
- package/dist/components.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +22 -17
- package/dist/index.mjs +383 -374
- package/package.json +51 -51
- package/dist/antd-wrapped/table/index.js +0 -7
- package/dist/antd-wrapped/table/props.js +0 -35
- package/dist/types/index.d.ts +0 -18
- package/dist/types/packages/components/src/_utils/__tests__/filterMenuByPermission.test.d.ts +0 -1
- package/dist/types/packages/components/src/_utils/__tests__/usePermission.test.d.ts +0 -1
- package/dist/types/packages/components/src/_utils/constants.d.ts +0 -7
- package/dist/types/packages/components/src/_utils/filterMenuByPermission.d.ts +0 -14
- package/dist/types/packages/components/src/_utils/index.d.ts +0 -7
- package/dist/types/packages/components/src/_utils/types.d.ts +0 -7
- package/dist/types/packages/components/src/_utils/usePermission.d.ts +0 -29
- package/dist/types/packages/components/src/antd-wrapped/action-group/__tests__/action-group.test.d.ts +0 -1
- package/dist/types/packages/components/src/antd-wrapped/action-group/index.d.ts +0 -4
- package/dist/types/packages/components/src/antd-wrapped/action-group/props.d.ts +0 -91
- package/dist/types/packages/components/src/antd-wrapped/action-group/types.d.ts +0 -110
- package/dist/types/packages/components/src/antd-wrapped/action-group/utils.d.ts +0 -17
- package/dist/types/packages/components/src/antd-wrapped/button/__tests__/button.test.d.ts +0 -1
- package/dist/types/packages/components/src/antd-wrapped/button/button.d.ts +0 -112
- package/dist/types/packages/components/src/antd-wrapped/button/index.d.ts +0 -5
- package/dist/types/packages/components/src/antd-wrapped/button/props.d.ts +0 -55
- package/dist/types/packages/components/src/antd-wrapped/button/types.d.ts +0 -38
- package/dist/types/packages/components/src/antd-wrapped/button-group/button-group.d.ts +0 -50
- package/dist/types/packages/components/src/antd-wrapped/button-group/index.d.ts +0 -5
- package/dist/types/packages/components/src/antd-wrapped/button-group/props.d.ts +0 -28
- package/dist/types/packages/components/src/antd-wrapped/delete-button/__tests__/delete-button.test.d.ts +0 -1
- package/dist/types/packages/components/src/antd-wrapped/delete-button/index.d.ts +0 -2
- package/dist/types/packages/components/src/antd-wrapped/delete-button/props.d.ts +0 -122
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/__tests__/dropdown-button.test.d.ts +0 -1
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/dropdown-button.d.ts +0 -106
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/index.d.ts +0 -5
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/props.d.ts +0 -49
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/types.d.ts +0 -36
- package/dist/types/packages/components/src/antd-wrapped/index.d.ts +0 -10
- package/dist/types/packages/components/src/antd-wrapped/table/index.d.ts +0 -68
- package/dist/types/packages/components/src/antd-wrapped/table/props.d.ts +0 -37
- package/dist/types/packages/components/src/antd-wrapped/table/table.d.ts +0 -67
- package/dist/types/packages/components/src/data-display/index.d.ts +0 -5
- package/dist/types/packages/components/src/data-display/tag/__tests__/tag.test.d.ts +0 -1
- package/dist/types/packages/components/src/data-display/tag/index.d.ts +0 -21
- package/dist/types/packages/components/src/data-display/tag/props.d.ts +0 -11
- package/dist/types/packages/components/src/data-display/tag/tag.d.ts +0 -20
- package/dist/types/packages/components/src/index.d.ts +0 -18
package/package.json
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
"./style": "./dist/components.css"
|
|
2
|
+
"name": "@mtn-ui/components",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Core components for mtn-ui",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.cjs",
|
|
14
|
+
"default": "./dist/index.mjs"
|
|
17
15
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
16
|
+
"./style": "./dist/components.css"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@ant-design/icons-vue": "^7.0.1",
|
|
26
|
+
"@mtn-ui/shared": "^1.0.0",
|
|
27
|
+
"@mtn-ui/theme": "^1.0.0",
|
|
28
|
+
"@vueuse/core": "^14.1.0",
|
|
29
|
+
"ant-design-vue": "^4.2.6",
|
|
30
|
+
"class-variance-authority": "latest",
|
|
31
|
+
"radix-vue": "latest"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
35
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
36
|
+
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
37
|
+
"@vue/test-utils": "^2.4.6",
|
|
38
|
+
"jsdom": "^24.1.0",
|
|
39
|
+
"vite": "^6.0.0",
|
|
40
|
+
"vite-plugin-dts": "^4.0.0",
|
|
41
|
+
"vitest": "^3.0.0",
|
|
42
|
+
"vue": "^3.5.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"vue": "^3.5.0"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "vite build && node scripts/fix-types.js",
|
|
49
|
+
"dev": "vite build --watch",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"test:watch": "vitest"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const e = {
|
|
2
|
-
// 继承 antd 的所有 props
|
|
3
|
-
columns: {
|
|
4
|
-
type: Array,
|
|
5
|
-
required: !0
|
|
6
|
-
},
|
|
7
|
-
dataSource: {
|
|
8
|
-
type: Array,
|
|
9
|
-
default: () => []
|
|
10
|
-
},
|
|
11
|
-
rowKey: {
|
|
12
|
-
type: [String, Function],
|
|
13
|
-
default: "id"
|
|
14
|
-
},
|
|
15
|
-
pagination: {
|
|
16
|
-
type: [Object, Boolean],
|
|
17
|
-
default: void 0
|
|
18
|
-
},
|
|
19
|
-
loading: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: !1
|
|
22
|
-
},
|
|
23
|
-
bordered: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: !1
|
|
26
|
-
},
|
|
27
|
-
size: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: "middle"
|
|
30
|
-
}
|
|
31
|
-
// 可以添加更多自定义 props
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
e as tableProps
|
|
35
|
-
};
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* Mtn UI - Vue 3 Component Library
|
|
4
|
-
*
|
|
5
|
-
* 分类导出:
|
|
6
|
-
* - data-display: 数据展示组件(自实现)
|
|
7
|
-
* - antd-wrapped: 复杂组件(基于 Ant Design Vue 封装)
|
|
8
|
-
* - layout: 布局组件(待添加)
|
|
9
|
-
* - navigation: 导航组件(待添加)
|
|
10
|
-
* - data-entry: 数据录入组件(待添加)
|
|
11
|
-
* - feedback: 反馈组件(待添加)
|
|
12
|
-
*/
|
|
13
|
-
export * from './packages/components/src/data-display';
|
|
14
|
-
export * from './packages/components/src/antd-wrapped';
|
|
15
|
-
declare const _default: {
|
|
16
|
-
install(app: App): void;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
package/dist/types/packages/components/src/_utils/__tests__/filterMenuByPermission.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { MenuItemWithPermission } from '../antd-wrapped/dropdown-button/types';
|
|
2
|
-
import { PermissionChecker } from '../../../shared/index.ts';
|
|
3
|
-
/**
|
|
4
|
-
* 根据权限过滤菜单项
|
|
5
|
-
* @param menu 菜单配置
|
|
6
|
-
* @param permissionChecker 权限检查函数
|
|
7
|
-
* @returns 过滤后的菜单
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* const filteredMenu = filterMenuByPermission(menu, permissionChecker.value)
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export declare function filterMenuByPermission(menu: MenuItemWithPermission[], permissionChecker: PermissionChecker): MenuItemWithPermission[];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ComputedRef } from 'vue';
|
|
2
|
-
export interface UsePermissionOptions {
|
|
3
|
-
/** 权限码 */
|
|
4
|
-
permission?: string | string[];
|
|
5
|
-
/** 无权限时的行为 */
|
|
6
|
-
permissionAction?: "hide" | "disable";
|
|
7
|
-
}
|
|
8
|
-
export interface UsePermissionReturn {
|
|
9
|
-
/** 是否有权限 */
|
|
10
|
-
hasPermission: ComputedRef<boolean>;
|
|
11
|
-
/** 是否应该隐藏 */
|
|
12
|
-
shouldHide: ComputedRef<boolean>;
|
|
13
|
-
/** 是否应该禁用 */
|
|
14
|
-
shouldDisable: ComputedRef<boolean>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* 使用权限控制
|
|
18
|
-
* @param options 权限配置选项
|
|
19
|
-
* @returns 权限状态
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```typescript
|
|
23
|
-
* const { hasPermission, shouldHide, shouldDisable } = usePermission({
|
|
24
|
-
* permission: props.permission,
|
|
25
|
-
* permissionAction: props.permissionAction,
|
|
26
|
-
* })
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare function usePermission(options: UsePermissionOptions): UsePermissionReturn;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { ActionItem, ActionGroupMode } from './types';
|
|
3
|
-
import { ButtonSize } from '../button/types';
|
|
4
|
-
import { DropdownButtonProps } from '../dropdown-button/props';
|
|
5
|
-
export declare const actionGroupProps: {
|
|
6
|
-
/**
|
|
7
|
-
* 操作项配置列表
|
|
8
|
-
*/
|
|
9
|
-
actions: {
|
|
10
|
-
type: PropType<ActionItem[]>;
|
|
11
|
-
default: undefined;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* 组件模式
|
|
15
|
-
*/
|
|
16
|
-
mode: {
|
|
17
|
-
type: PropType<ActionGroupMode>;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* 最多显示的按钮数量
|
|
22
|
-
*/
|
|
23
|
-
maxItems: {
|
|
24
|
-
type: NumberConstructor;
|
|
25
|
-
default: number;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* 按钮之间的间距(px)
|
|
29
|
-
*/
|
|
30
|
-
gap: {
|
|
31
|
-
type: NumberConstructor;
|
|
32
|
-
default: number;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* "更多"按钮的文本
|
|
36
|
-
*/
|
|
37
|
-
moreText: {
|
|
38
|
-
type: StringConstructor;
|
|
39
|
-
default: string;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* "更多"按钮的图标
|
|
43
|
-
*/
|
|
44
|
-
moreIcon: {
|
|
45
|
-
type: ObjectConstructor;
|
|
46
|
-
default: undefined;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* "更多"按钮的属性
|
|
50
|
-
*/
|
|
51
|
-
moreProps: {
|
|
52
|
-
type: PropType<Partial<DropdownButtonProps>>;
|
|
53
|
-
default: () => {};
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* 按钮尺寸
|
|
57
|
-
*/
|
|
58
|
-
size: {
|
|
59
|
-
type: PropType<ButtonSize>;
|
|
60
|
-
default: string;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* 是否紧凑模式
|
|
64
|
-
*/
|
|
65
|
-
compact: {
|
|
66
|
-
type: BooleanConstructor;
|
|
67
|
-
default: boolean;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* 是否垂直布局
|
|
71
|
-
*/
|
|
72
|
-
vertical: {
|
|
73
|
-
type: BooleanConstructor;
|
|
74
|
-
default: boolean;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* 是否块级元素
|
|
78
|
-
*/
|
|
79
|
-
block: {
|
|
80
|
-
type: BooleanConstructor;
|
|
81
|
-
default: boolean;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* 是否禁用响应式收纳
|
|
85
|
-
*/
|
|
86
|
-
disableCollapse: {
|
|
87
|
-
type: BooleanConstructor;
|
|
88
|
-
default: boolean;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
export type ActionGroupPropsType = typeof actionGroupProps;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
import { ButtonSize } from '../button/types';
|
|
3
|
-
import { DropdownButtonProps } from '../dropdown-button/props';
|
|
4
|
-
/**
|
|
5
|
-
* 组件模式
|
|
6
|
-
*/
|
|
7
|
-
export type ActionGroupMode = "default" | "table";
|
|
8
|
-
/**
|
|
9
|
-
* 操作项配置(配置化 API)
|
|
10
|
-
*/
|
|
11
|
-
export interface ActionItem {
|
|
12
|
-
/** 显示文本 */
|
|
13
|
-
label?: string;
|
|
14
|
-
/** 唯一标识 */
|
|
15
|
-
key?: string;
|
|
16
|
-
/** 是否禁用 */
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
/** 图标组件 */
|
|
19
|
-
icon?: Component;
|
|
20
|
-
/** 按钮类型 */
|
|
21
|
-
type?: ButtonType;
|
|
22
|
-
/** 权限标识 */
|
|
23
|
-
permission?: string | string[];
|
|
24
|
-
/** 权限不足时的行为 */
|
|
25
|
-
permissionAction?: "hide" | "disable";
|
|
26
|
-
/** 自定义组件(如 DeleteButton) */
|
|
27
|
-
component?: Component;
|
|
28
|
-
/** 自定义组件属性 */
|
|
29
|
-
componentProps?: Record<string, any>;
|
|
30
|
-
/** 点击事件 */
|
|
31
|
-
onClick?: (action: ActionItem) => void | Promise<void>;
|
|
32
|
-
/** 自定义插槽名称 */
|
|
33
|
-
slot?: string;
|
|
34
|
-
/** 其他属性(传递给 Button) */
|
|
35
|
-
[key: string]: any;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* ActionGroup 组件属性
|
|
39
|
-
*/
|
|
40
|
-
export interface ActionGroupProps {
|
|
41
|
-
/**
|
|
42
|
-
* 操作项配置列表
|
|
43
|
-
* 如果提供了 actions,将忽略默认插槽
|
|
44
|
-
*/
|
|
45
|
-
actions?: ActionItem[];
|
|
46
|
-
/**
|
|
47
|
-
* 组件模式
|
|
48
|
-
* - default: 默认模式
|
|
49
|
-
* - table: 表格模式(自动 size='small', type='link', moreText='')
|
|
50
|
-
* @default "default"
|
|
51
|
-
*/
|
|
52
|
-
mode?: ActionGroupMode;
|
|
53
|
-
/**
|
|
54
|
-
* 最多显示的按钮数量
|
|
55
|
-
* 当 accurateMeasure=true 时,此值作为最大限制
|
|
56
|
-
* @default 3
|
|
57
|
-
*/
|
|
58
|
-
maxItems?: number;
|
|
59
|
-
/**
|
|
60
|
-
* 是否精确测量容器宽度自动计算显示数量
|
|
61
|
-
* 开启后会根据实际容器宽度动态计算,性能略有损耗
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
accurateMeasure?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* 按钮之间的间距(px)
|
|
67
|
-
* @default 8
|
|
68
|
-
*/
|
|
69
|
-
gap?: number;
|
|
70
|
-
/**
|
|
71
|
-
* "更多"按钮的文本
|
|
72
|
-
* 为空字符串时只显示图标(适合表格场景)
|
|
73
|
-
* @default "更多"
|
|
74
|
-
*/
|
|
75
|
-
moreText?: string;
|
|
76
|
-
/**
|
|
77
|
-
* "更多"按钮的图标
|
|
78
|
-
* @default MoreOutlined
|
|
79
|
-
*/
|
|
80
|
-
moreIcon?: Component;
|
|
81
|
-
/**
|
|
82
|
-
* "更多"按钮的其他属性
|
|
83
|
-
*/
|
|
84
|
-
moreProps?: Partial<DropdownButtonProps>;
|
|
85
|
-
/**
|
|
86
|
-
* 按钮尺寸
|
|
87
|
-
* @default "middle"
|
|
88
|
-
*/
|
|
89
|
-
size?: ButtonSize;
|
|
90
|
-
/**
|
|
91
|
-
* 是否紧凑模式
|
|
92
|
-
* @default false
|
|
93
|
-
*/
|
|
94
|
-
compact?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* 是否垂直布局
|
|
97
|
-
* @default false
|
|
98
|
-
*/
|
|
99
|
-
vertical?: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* 是否块级元素
|
|
102
|
-
* @default false
|
|
103
|
-
*/
|
|
104
|
-
block?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* 是否禁用响应式收纳
|
|
107
|
-
* @default false
|
|
108
|
-
*/
|
|
109
|
-
disableCollapse?: boolean;
|
|
110
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { VNode } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* 从 VNode 中提取文本内容
|
|
4
|
-
*/
|
|
5
|
-
export declare function extractText(node: any): string;
|
|
6
|
-
/**
|
|
7
|
-
* 从 VNode 中提取图标组件
|
|
8
|
-
*/
|
|
9
|
-
export declare function extractIcon(node: any): any;
|
|
10
|
-
/**
|
|
11
|
-
* 过滤有效的子节点(移除注释、文本节点等)
|
|
12
|
-
*/
|
|
13
|
-
export declare function filterValidChildren(slotContent: VNode[] | undefined): VNode[];
|
|
14
|
-
/**
|
|
15
|
-
* 获取按钮的 key
|
|
16
|
-
*/
|
|
17
|
-
export declare function getButtonKey(btn: VNode, index: number): string | number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
type: {
|
|
3
|
-
type: import('vue').PropType<"primary" | "default" | "dashed" | "text" | "link">;
|
|
4
|
-
default: string;
|
|
5
|
-
};
|
|
6
|
-
size: {
|
|
7
|
-
type: import('vue').PropType<"small" | "middle" | "large">;
|
|
8
|
-
default: string;
|
|
9
|
-
};
|
|
10
|
-
loading: {
|
|
11
|
-
type: BooleanConstructor;
|
|
12
|
-
default: boolean;
|
|
13
|
-
};
|
|
14
|
-
disabled: {
|
|
15
|
-
type: BooleanConstructor;
|
|
16
|
-
default: boolean;
|
|
17
|
-
};
|
|
18
|
-
danger: {
|
|
19
|
-
type: BooleanConstructor;
|
|
20
|
-
default: boolean;
|
|
21
|
-
};
|
|
22
|
-
block: {
|
|
23
|
-
type: BooleanConstructor;
|
|
24
|
-
default: boolean;
|
|
25
|
-
};
|
|
26
|
-
ghost: {
|
|
27
|
-
type: BooleanConstructor;
|
|
28
|
-
default: boolean;
|
|
29
|
-
};
|
|
30
|
-
shape: {
|
|
31
|
-
type: import('vue').PropType<"default" | "circle" | "round">;
|
|
32
|
-
default: string;
|
|
33
|
-
};
|
|
34
|
-
htmlType: {
|
|
35
|
-
type: import('vue').PropType<"button" | "submit" | "reset">;
|
|
36
|
-
default: string;
|
|
37
|
-
};
|
|
38
|
-
icon: {
|
|
39
|
-
type: import('vue').PropType<any>;
|
|
40
|
-
};
|
|
41
|
-
permission: {
|
|
42
|
-
type: import('vue').PropType<string | string[]>;
|
|
43
|
-
default: undefined;
|
|
44
|
-
};
|
|
45
|
-
permissionAction: {
|
|
46
|
-
type: import('vue').PropType<"hide" | "disable">;
|
|
47
|
-
default: string;
|
|
48
|
-
};
|
|
49
|
-
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "click"[], "click", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
50
|
-
type: {
|
|
51
|
-
type: import('vue').PropType<"primary" | "default" | "dashed" | "text" | "link">;
|
|
52
|
-
default: string;
|
|
53
|
-
};
|
|
54
|
-
size: {
|
|
55
|
-
type: import('vue').PropType<"small" | "middle" | "large">;
|
|
56
|
-
default: string;
|
|
57
|
-
};
|
|
58
|
-
loading: {
|
|
59
|
-
type: BooleanConstructor;
|
|
60
|
-
default: boolean;
|
|
61
|
-
};
|
|
62
|
-
disabled: {
|
|
63
|
-
type: BooleanConstructor;
|
|
64
|
-
default: boolean;
|
|
65
|
-
};
|
|
66
|
-
danger: {
|
|
67
|
-
type: BooleanConstructor;
|
|
68
|
-
default: boolean;
|
|
69
|
-
};
|
|
70
|
-
block: {
|
|
71
|
-
type: BooleanConstructor;
|
|
72
|
-
default: boolean;
|
|
73
|
-
};
|
|
74
|
-
ghost: {
|
|
75
|
-
type: BooleanConstructor;
|
|
76
|
-
default: boolean;
|
|
77
|
-
};
|
|
78
|
-
shape: {
|
|
79
|
-
type: import('vue').PropType<"default" | "circle" | "round">;
|
|
80
|
-
default: string;
|
|
81
|
-
};
|
|
82
|
-
htmlType: {
|
|
83
|
-
type: import('vue').PropType<"button" | "submit" | "reset">;
|
|
84
|
-
default: string;
|
|
85
|
-
};
|
|
86
|
-
icon: {
|
|
87
|
-
type: import('vue').PropType<any>;
|
|
88
|
-
};
|
|
89
|
-
permission: {
|
|
90
|
-
type: import('vue').PropType<string | string[]>;
|
|
91
|
-
default: undefined;
|
|
92
|
-
};
|
|
93
|
-
permissionAction: {
|
|
94
|
-
type: import('vue').PropType<"hide" | "disable">;
|
|
95
|
-
default: string;
|
|
96
|
-
};
|
|
97
|
-
}>> & Readonly<{
|
|
98
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
99
|
-
}>, {
|
|
100
|
-
type: "default" | "link" | "text" | "primary" | "dashed";
|
|
101
|
-
size: "small" | "middle" | "large";
|
|
102
|
-
loading: boolean;
|
|
103
|
-
disabled: boolean;
|
|
104
|
-
danger: boolean;
|
|
105
|
-
block: boolean;
|
|
106
|
-
ghost: boolean;
|
|
107
|
-
shape: "default" | "circle" | "round";
|
|
108
|
-
htmlType: "button" | "submit" | "reset";
|
|
109
|
-
permission: string | string[];
|
|
110
|
-
permissionAction: "hide" | "disable";
|
|
111
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
112
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { default as Button } from './button';
|
|
2
|
-
import { ButtonProps } from './props';
|
|
3
|
-
import { ButtonType, ButtonSize, ButtonShape, ButtonHtmlType, PermissionAction } from './types';
|
|
4
|
-
export { Button, type ButtonProps, type ButtonType, type ButtonSize, type ButtonShape, type ButtonHtmlType, type PermissionAction, };
|
|
5
|
-
export default Button;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* Button Props - 基于 Ant Design Vue 的 Button
|
|
4
|
-
* 简化并统一 API,保持与之前自定义 Button 的兼容性
|
|
5
|
-
*/
|
|
6
|
-
export declare const buttonProps: {
|
|
7
|
-
type: {
|
|
8
|
-
type: PropType<"primary" | "default" | "dashed" | "text" | "link">;
|
|
9
|
-
default: string;
|
|
10
|
-
};
|
|
11
|
-
size: {
|
|
12
|
-
type: PropType<"small" | "middle" | "large">;
|
|
13
|
-
default: string;
|
|
14
|
-
};
|
|
15
|
-
loading: {
|
|
16
|
-
type: BooleanConstructor;
|
|
17
|
-
default: boolean;
|
|
18
|
-
};
|
|
19
|
-
disabled: {
|
|
20
|
-
type: BooleanConstructor;
|
|
21
|
-
default: boolean;
|
|
22
|
-
};
|
|
23
|
-
danger: {
|
|
24
|
-
type: BooleanConstructor;
|
|
25
|
-
default: boolean;
|
|
26
|
-
};
|
|
27
|
-
block: {
|
|
28
|
-
type: BooleanConstructor;
|
|
29
|
-
default: boolean;
|
|
30
|
-
};
|
|
31
|
-
ghost: {
|
|
32
|
-
type: BooleanConstructor;
|
|
33
|
-
default: boolean;
|
|
34
|
-
};
|
|
35
|
-
shape: {
|
|
36
|
-
type: PropType<"default" | "circle" | "round">;
|
|
37
|
-
default: string;
|
|
38
|
-
};
|
|
39
|
-
htmlType: {
|
|
40
|
-
type: PropType<"button" | "submit" | "reset">;
|
|
41
|
-
default: string;
|
|
42
|
-
};
|
|
43
|
-
icon: {
|
|
44
|
-
type: PropType<any>;
|
|
45
|
-
};
|
|
46
|
-
permission: {
|
|
47
|
-
type: PropType<string | string[]>;
|
|
48
|
-
default: undefined;
|
|
49
|
-
};
|
|
50
|
-
permissionAction: {
|
|
51
|
-
type: PropType<"hide" | "disable">;
|
|
52
|
-
default: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export type ButtonProps = ExtractPropTypes<typeof buttonProps>;
|