fantasia-ui 0.2.49 → 0.2.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/dist/fantasia-ui.css +38 -76
- package/dist/fantasia-ui.es.js +146 -189
- package/dist/fantasia-ui.umd.js +143 -186
- package/dist/types/global.d.ts +3 -3
- package/dist/types/packages/components/index.d.ts +12 -9
- package/dist/types/packages/components/modules/FDialog.vue.d.ts +10 -17
- package/dist/types/packages/composables/FDialog.d.ts +18 -0
- package/dist/types/packages/composables/FMessage.d.ts +19 -0
- package/dist/types/packages/composables/FNotification.d.ts +19 -0
- package/dist/types/packages/index.d.ts +2 -1
- package/dist/types/packages/types/components/modules/f-dialog.d.ts +10 -27
- package/dist/types/volar.d.ts +3 -3
- package/package.json +1 -3
|
@@ -1,41 +1,34 @@
|
|
|
1
1
|
import type { FDialogProps } from '@/types/components';
|
|
2
|
+
import '@/styles/components/f-dialog.scss';
|
|
2
3
|
type __VLS_Props = FDialogProps;
|
|
3
4
|
type __VLS_PublicProps = __VLS_Props & {
|
|
4
5
|
modelValue: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare var
|
|
7
|
+
declare var __VLS_13: {}, __VLS_22: {}, __VLS_24: {};
|
|
7
8
|
type __VLS_Slots = {} & {
|
|
8
|
-
header?: (props: typeof
|
|
9
|
+
header?: (props: typeof __VLS_13) => any;
|
|
9
10
|
} & {
|
|
10
|
-
default?: (props: typeof
|
|
11
|
+
default?: (props: typeof __VLS_22) => any;
|
|
11
12
|
} & {
|
|
12
|
-
footer?: (props: typeof
|
|
13
|
+
footer?: (props: typeof __VLS_24) => any;
|
|
13
14
|
};
|
|
14
15
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
confirm: () => any;
|
|
15
17
|
"update:modelValue": (value: boolean) => any;
|
|
16
18
|
cancel: () => any;
|
|
17
|
-
close: () => any;
|
|
18
|
-
confirm: () => any;
|
|
19
|
-
open: () => any;
|
|
20
19
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
onConfirm?: () => any;
|
|
21
21
|
"onUpdate:modelValue"?: (value: boolean) => any;
|
|
22
22
|
onCancel?: () => any;
|
|
23
|
-
onClose?: () => any;
|
|
24
|
-
onConfirm?: () => any;
|
|
25
|
-
onOpen?: () => any;
|
|
26
23
|
}>, {
|
|
27
|
-
|
|
28
|
-
width: string;
|
|
29
|
-
type: import("@/types/components").Type;
|
|
24
|
+
type: import("@/types/components").FDialogType;
|
|
30
25
|
title: string;
|
|
26
|
+
content: string;
|
|
31
27
|
confirmText: string;
|
|
32
28
|
cancelText: string;
|
|
33
29
|
showCancel: boolean;
|
|
34
|
-
|
|
35
|
-
closeOnClickModal: boolean;
|
|
30
|
+
closeOnClickOutside: boolean;
|
|
36
31
|
closeOnEsc: boolean;
|
|
37
|
-
fullscreen: boolean;
|
|
38
|
-
destroyOnClose: boolean;
|
|
39
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
33
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
41
34
|
export default _default;
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
import type { FDialogFn } from '@/types';
|
|
2
|
+
/**
|
|
3
|
+
* FDialog 函数式 API
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // 基础用法
|
|
7
|
+
* import { dialog } from 'fantasia-ui'
|
|
8
|
+
* dialog.confirm('确认删除吗?')
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // 或使用 FDialogAPI
|
|
12
|
+
* import { FDialogAPI } from 'fantasia-ui'
|
|
13
|
+
* FDialogAPI.alert('操作成功', '提示')
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // 组件用法
|
|
17
|
+
* import { FDialog } from 'fantasia-ui'
|
|
18
|
+
* // 在模板中使用 <FDialog />
|
|
19
|
+
*/
|
|
2
20
|
declare const FDialog: FDialogFn;
|
|
3
21
|
export default FDialog;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
import type { FMessageFn } from '@/types';
|
|
2
|
+
/**
|
|
3
|
+
* FMessage 函数式 API
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // 推荐用法 - 使用小写名称
|
|
7
|
+
* import { message } from 'fantasia-ui'
|
|
8
|
+
* message.success('操作成功')
|
|
9
|
+
* message.error('操作失败')
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // 或使用 FMessageAPI (向后兼容)
|
|
13
|
+
* import { FMessageAPI } from 'fantasia-ui'
|
|
14
|
+
* FMessageAPI.info('这是一条消息')
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // 组件用法
|
|
18
|
+
* import { FMessage } from 'fantasia-ui'
|
|
19
|
+
* // 在模板中使用 <FMessage />
|
|
20
|
+
*/
|
|
2
21
|
declare const FMessage: FMessageFn;
|
|
3
22
|
export default FMessage;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
import type { FNotificationFn } from '@/types';
|
|
2
|
+
/**
|
|
3
|
+
* FNotification 函数式 API
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // 推荐用法 - 使用小写名称
|
|
7
|
+
* import { notification } from 'fantasia-ui'
|
|
8
|
+
* notification.success('操作成功')
|
|
9
|
+
* notification.error('操作失败')
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // 或使用 FNotificationAPI (向后兼容)
|
|
13
|
+
* import { FNotificationAPI } from 'fantasia-ui'
|
|
14
|
+
* FNotificationAPI.info('这是一条通知')
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // 组件用法
|
|
18
|
+
* import { FNotification } from 'fantasia-ui'
|
|
19
|
+
* // 在模板中使用 <FNotification />
|
|
20
|
+
*/
|
|
2
21
|
declare const FNotification: FNotificationFn;
|
|
3
22
|
export default FNotification;
|
|
@@ -3,4 +3,5 @@ import './styles/base.scss';
|
|
|
3
3
|
declare const install: Plugin;
|
|
4
4
|
export default install;
|
|
5
5
|
export * from './components';
|
|
6
|
-
export { FMessage, FNotification } from './components';
|
|
6
|
+
export { FDialog, FMessage, FNotification } from './components';
|
|
7
|
+
export { dialog, message, notification, FDialogAPI, FMessageAPI, FNotificationAPI } from './components';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* FDialog 对话框类型
|
|
3
|
+
*/
|
|
4
|
+
type FDialogType = 'info' | 'success' | 'warning' | 'error' | 'confirm';
|
|
2
5
|
/**
|
|
3
6
|
* FDialog 组件属性
|
|
4
7
|
*/
|
|
@@ -7,39 +10,23 @@ interface FDialogProps {
|
|
|
7
10
|
title?: string;
|
|
8
11
|
/** 内容文本 */
|
|
9
12
|
content?: string;
|
|
10
|
-
/** 对话框宽度 */
|
|
11
|
-
width?: string;
|
|
12
13
|
/** 对话框类型 */
|
|
13
|
-
type?:
|
|
14
|
+
type?: FDialogType;
|
|
14
15
|
/** 确认按钮文本 */
|
|
15
16
|
confirmText?: string;
|
|
16
17
|
/** 取消按钮文本 */
|
|
17
18
|
cancelText?: string;
|
|
18
19
|
/** 是否显示取消按钮 */
|
|
19
20
|
showCancel?: boolean;
|
|
20
|
-
/** 是否显示关闭按钮 */
|
|
21
|
-
showClose?: boolean;
|
|
22
21
|
/** 点击遮罩是否关闭 */
|
|
23
|
-
|
|
22
|
+
closeOnClickOutside?: boolean;
|
|
24
23
|
/** 按 ESC 是否关闭 */
|
|
25
24
|
closeOnEsc?: boolean;
|
|
26
|
-
/** 是否居中布局 */
|
|
27
|
-
center?: boolean;
|
|
28
|
-
/** 是否全屏显示 */
|
|
29
|
-
fullscreen?: boolean;
|
|
30
|
-
/** 关闭时销毁内容 */
|
|
31
|
-
destroyOnClose?: boolean;
|
|
32
|
-
/** 关闭前的回调 */
|
|
33
|
-
beforeClose?: (done: () => void) => void;
|
|
34
25
|
}
|
|
35
26
|
/**
|
|
36
27
|
* FDialog 组件事件
|
|
37
28
|
*/
|
|
38
29
|
interface FDialogEmits {
|
|
39
|
-
/** 打开事件 */
|
|
40
|
-
open: [];
|
|
41
|
-
/** 关闭事件 */
|
|
42
|
-
close: [];
|
|
43
30
|
/** 确认事件 */
|
|
44
31
|
confirm: [];
|
|
45
32
|
/** 取消事件 */
|
|
@@ -48,22 +35,18 @@ interface FDialogEmits {
|
|
|
48
35
|
interface FDialogOptions {
|
|
49
36
|
title?: string;
|
|
50
37
|
content?: string;
|
|
51
|
-
|
|
52
|
-
type?: Type;
|
|
38
|
+
type?: FDialogType;
|
|
53
39
|
confirmText?: string;
|
|
54
40
|
cancelText?: string;
|
|
55
41
|
showCancel?: boolean;
|
|
56
|
-
showClose?: boolean;
|
|
57
|
-
center?: boolean;
|
|
58
|
-
beforeClose?: (done: () => void) => void;
|
|
59
42
|
}
|
|
60
43
|
type FDialogFn = ((options: FDialogOptions) => Promise<boolean>) & {
|
|
61
44
|
showDialog: (options: FDialogOptions) => Promise<boolean>;
|
|
62
45
|
confirm: (content: string, title?: string) => Promise<boolean>;
|
|
63
|
-
alert: (content: string, title?: string, type?:
|
|
46
|
+
alert: (content: string, title?: string, type?: FDialogType) => Promise<boolean>;
|
|
64
47
|
success: (content: string, title?: string) => Promise<boolean>;
|
|
65
48
|
warning: (content: string, title?: string) => Promise<boolean>;
|
|
66
|
-
|
|
49
|
+
error: (content: string, title?: string) => Promise<boolean>;
|
|
67
50
|
info: (content: string, title?: string) => Promise<boolean>;
|
|
68
51
|
};
|
|
69
|
-
export type { FDialogProps, FDialogEmits, FDialogOptions, FDialogFn };
|
|
52
|
+
export type { FDialogProps, FDialogEmits, FDialogOptions, FDialogFn, FDialogType };
|
package/dist/types/volar.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ declare module '@vue/runtime-core' {
|
|
|
20
20
|
FTransfer: typeof components.FTransfer
|
|
21
21
|
FCol: typeof components.FCol
|
|
22
22
|
FContainer: typeof components.FContainer
|
|
23
|
-
FDialog: typeof components.
|
|
23
|
+
FDialog: typeof components.FDialog
|
|
24
24
|
FDivider: typeof components.FDivider
|
|
25
25
|
FDropdown: typeof components.FDropdown
|
|
26
26
|
FEditor: typeof components.FEditor
|
|
@@ -55,8 +55,8 @@ declare module '@vue/runtime-core' {
|
|
|
55
55
|
FMask: typeof components.FMask
|
|
56
56
|
FMarquee: typeof components.FMarquee
|
|
57
57
|
FSteps: typeof components.FSteps
|
|
58
|
-
FMessage: typeof components.
|
|
59
|
-
FNotification: typeof components.
|
|
58
|
+
FMessage: typeof components.FMessage
|
|
59
|
+
FNotification: typeof components.FNotification
|
|
60
60
|
FResult: typeof components.FResult
|
|
61
61
|
}
|
|
62
62
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fantasia-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.51",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/fantasia-ui.umd.js",
|
|
7
7
|
"module": "dist/fantasia-ui.es.js",
|
|
@@ -69,13 +69,11 @@
|
|
|
69
69
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
70
70
|
"@vue/tsconfig": "^0.7.0",
|
|
71
71
|
"@vueuse/core": "^14.3.0",
|
|
72
|
-
"jsdom": "^30.0.1",
|
|
73
72
|
"sass": "^1.89.0",
|
|
74
73
|
"typescript": "~5.8.3",
|
|
75
74
|
"unplugin-auto-import": "^19.3.0",
|
|
76
75
|
"vite": "^6.3.5",
|
|
77
76
|
"vite-plugin-dts": "^4.5.4",
|
|
78
|
-
"vitest": "^4.1.8",
|
|
79
77
|
"vue": "^3.5.13",
|
|
80
78
|
"vue-tsc": "^2.2.8",
|
|
81
79
|
"vue-docgen-api": "^4.79.2",
|