@aquiferre/ui-kit 0.1.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/index.ts +16 -0
- package/package.json +19 -0
- package/types.ts +37 -0
package/index.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @aquiferre/ui-kit
|
|
2
|
+
export { default as Breadcrumb } from './components/Breadcrumb.vue'
|
|
3
|
+
export { default as DataTable } from './components/DataTable.vue'
|
|
4
|
+
export { default as Pagination } from './components/Pagination.vue'
|
|
5
|
+
export { default as SearchInput } from './components/SearchInput.vue'
|
|
6
|
+
export { default as FilterDropdown } from './components/FilterDropdown.vue'
|
|
7
|
+
export { default as FormDialog } from './components/FormDialog.vue'
|
|
8
|
+
export { default as ConfirmDialog } from './components/ConfirmDialog.vue'
|
|
9
|
+
export { default as Toast } from './components/Toast.vue'
|
|
10
|
+
export { default as StatusTag } from './components/StatusTag.vue'
|
|
11
|
+
export { default as FileUploader } from './components/FileUploader.vue'
|
|
12
|
+
export { default as UserPicker } from './components/UserPicker.vue'
|
|
13
|
+
export { default as SideMenu } from './components/SideMenu.vue'
|
|
14
|
+
export { default as TopNavbar } from './components/TopNavbar.vue'
|
|
15
|
+
export { useToast } from './composables/useToast'
|
|
16
|
+
export type { Column, MenuItem, MenuGroup, NavModule, DropdownItem, ToastType } from './types'
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aquiferre/ui-kit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.ts"
|
|
9
|
+
},
|
|
10
|
+
"files": ["*.ts", "*.vue"],
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"vue": ">=3.0.0",
|
|
13
|
+
"pinia": ">=2.0.0",
|
|
14
|
+
"@aquiferre/theme-kit": ">=0.1.0"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
}
|
|
19
|
+
}
|
package/types.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface Column {
|
|
2
|
+
key: string
|
|
3
|
+
title: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface MenuItem {
|
|
7
|
+
label: string
|
|
8
|
+
path: string
|
|
9
|
+
icon: string
|
|
10
|
+
permission?: string | string[] // 支持单个或多个权限码(OR逻辑)
|
|
11
|
+
superAdminOnly?: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface MenuGroup {
|
|
15
|
+
key: string
|
|
16
|
+
label: string
|
|
17
|
+
items: MenuItem[]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface NavModule {
|
|
21
|
+
key: string
|
|
22
|
+
label: string
|
|
23
|
+
href: string
|
|
24
|
+
paths: string[]
|
|
25
|
+
permissions: string[]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface DropdownItem {
|
|
29
|
+
label?: string // divider 类型不需要
|
|
30
|
+
icon?: string
|
|
31
|
+
type?: 'action' | 'divider' | 'user-info'
|
|
32
|
+
subtitle?: string // 用于 user-info 类型显示账号
|
|
33
|
+
onClick?: () => void
|
|
34
|
+
danger?: boolean
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type ToastType = 'success' | 'error' | 'warning' | 'info'
|