@liujitcn/kratos-admin-core 0.0.28 → 0.0.31
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/README.md +7 -6
- package/build/auto-imports.json +73 -0
- package/build/plugins.ts +2 -58
- package/dist/package/declarations/src/api/base/mfa.d.ts +26 -0
- package/dist/package/declarations/src/components/Dialog/FormDialog.vue.d.ts +3 -3
- package/dist/package/declarations/src/components/Dialog/PasswordVerifyDialog.vue.d.ts +65 -0
- package/dist/package/declarations/src/components/Dialog/ProDialog.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Grid/components/GridItem.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Mfa/MfaRecoveryCodesDialog.vue.d.ts +19 -0
- package/dist/package/declarations/src/components/Mfa/MfaSetupPanel.vue.d.ts +8 -0
- package/dist/package/declarations/src/components/ProForm/components/ProFormItem.vue.d.ts +4 -4
- package/dist/package/declarations/src/components/ProForm/index.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/ProForm/interface/index.d.ts +4 -1
- package/dist/package/declarations/src/components/RichTextPreview/index.vue.d.ts +8 -0
- package/dist/package/declarations/src/components/Upload/Img.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Upload/Imgs.vue.d.ts +1 -1
- package/dist/package/declarations/src/layouts/components/LockScreen.vue.d.ts +3 -0
- package/dist/package/declarations/src/locales/generated.d.ts +168 -0
- package/dist/package/declarations/src/locales/index.d.ts +2 -0
- package/dist/package/declarations/src/rpc/base/v1/login.d.ts +33 -3
- package/dist/package/declarations/src/rpc/base/v1/mfa.d.ts +152 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +25 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth_client.d.ts +23 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +4 -4
- package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n.d.ts +27 -23
- package/dist/package/declarations/src/security.d.ts +2 -0
- package/dist/package/declarations/src/stores/interface/index.d.ts +14 -1
- package/dist/package/declarations/src/stores/modules/lockScreen.d.ts +20 -0
- package/dist/package/declarations/src/stores/modules/user.d.ts +5 -2
- package/dist/package/declarations/src/stores/runtime.d.ts +1 -0
- package/dist/package/declarations/src/utils/clipboard.d.ts +2 -0
- package/dist/package/declarations/src/utils/webauthn.d.ts +4 -0
- package/dist/package/declarations/vite.config.d.ts +2 -0
- package/dist/package/src/api/base/mfa.ts +114 -0
- package/dist/package/src/components/Dialog/PasswordVerifyDialog.vue +176 -0
- package/dist/package/src/components/Loading/fullScreen.ts +2 -1
- package/dist/package/src/components/MarkdownPreview/index.vue +21 -1
- package/dist/package/src/components/Mfa/MfaRecoveryCodesDialog.vue +91 -0
- package/dist/package/src/components/Mfa/MfaSetupPanel.vue +81 -0
- package/dist/package/src/components/ProForm/components/ProFormItem.vue +16 -1
- package/dist/package/src/components/ProForm/interface/index.ts +4 -0
- package/dist/package/src/components/ProTable/components/ColSetting.vue +1 -1
- package/dist/package/src/components/ProTable/index.vue +6 -2
- package/dist/package/src/components/RichTextPreview/index.vue +45 -0
- package/dist/package/src/config/index.ts +1 -1
- package/dist/package/src/layouts/LayoutClassic/index.vue +3 -1
- package/dist/package/src/layouts/LayoutColumns/index.vue +3 -1
- package/dist/package/src/layouts/LayoutTransverse/index.vue +3 -1
- package/dist/package/src/layouts/LayoutVertical/index.vue +9 -1
- package/dist/package/src/layouts/components/Header/components/Avatar.vue +23 -4
- package/dist/package/src/layouts/components/Header/components/InfoDialog.vue +1 -1
- package/dist/package/src/layouts/components/Header/components/PasswordDialog.vue +1 -1
- package/dist/package/src/layouts/components/LockScreen.vue +450 -0
- package/dist/package/src/layouts/index.vue +2 -0
- package/dist/package/src/layouts/indexAsync.vue +2 -0
- package/dist/package/src/locales/README.md +2 -1
- package/dist/package/src/locales/en-US.json +43 -1
- package/dist/package/src/locales/index.ts +16 -12
- package/dist/package/src/locales/ja-JP.json +43 -1
- package/dist/package/src/locales/zh-CN.json +43 -1
- package/dist/package/src/locales/zh-TW.json +43 -1
- package/dist/package/src/rpc/base/v1/login.ts +33 -2
- package/dist/package/src/rpc/base/v1/mfa.ts +180 -0
- package/dist/package/src/rpc/base/v1/oauth.ts +25 -0
- package/dist/package/src/rpc/base/v1/oauth_client.ts +33 -0
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +4 -4
- package/dist/package/src/rpc/system/admin/v1/base_i18n.ts +27 -23
- package/dist/package/src/security.ts +2 -0
- package/dist/package/src/stores/interface/index.ts +15 -1
- package/dist/package/src/stores/modules/config.ts +4 -4
- package/dist/package/src/stores/modules/lockScreen.ts +78 -0
- package/dist/package/src/stores/modules/user.ts +16 -3
- package/dist/package/src/stores/runtime.ts +1 -0
- package/dist/package/src/utils/clipboard.ts +22 -0
- package/dist/package/src/utils/request.ts +26 -10
- package/dist/package/src/utils/webauthn.ts +90 -0
- package/dist/package/src/views/login/components/LoginForm.vue +237 -16
- package/dist/package/src/views/login/index.vue +3 -1
- package/dist/package/types/generated/auto-imports.d.ts +132 -129
- package/dist/package/types/generated/components.d.ts +4 -72
- package/package.json +22 -1
- package/types/generated/auto-imports.d.ts +132 -129
- package/types/generated/components.d.ts +4 -72
- package/vite.config.ts +3 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @liujitcn/kratos-admin-core
|
|
2
2
|
|
|
3
|
-
kratos-admin
|
|
3
|
+
kratos-admin 前端底座包。它不包含具体业务模块,提供登录、MFA 校验、菜单、用户信息、应用启动、动态路由、布局、运行状态、公共组件和静态状态页;MFA 绑定面板与恢复码弹窗由登录页和 System 模块共用。宿主可以只安装 core;个人中心、AI 助手和系统管理能力必须由 System 模块提供。
|
|
4
4
|
|
|
5
5
|
## 目录结构
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ packages/core
|
|
|
9
9
|
├── build/ # Vite 配置辅助函数和插件组合
|
|
10
10
|
├── src
|
|
11
11
|
│ ├── api/ # 按 Proto 领域组织的底座请求
|
|
12
|
-
│ │ ├── base/ # 登录、OAuth、配置和文件请求
|
|
12
|
+
│ │ ├── base/ # 登录、MFA、OAuth、配置和文件请求
|
|
13
13
|
│ │ └── system/ # 用户、菜单、字典和租户运行请求
|
|
14
14
|
│ ├── assets/ # 字体、图标和图片资源
|
|
15
15
|
│ ├── components/ # 公共 Vue 组件
|
|
@@ -61,21 +61,21 @@ packages/core
|
|
|
61
61
|
| `src/format.ts` | 业务模块使用的格式化入口。 |
|
|
62
62
|
| `src/navigation.ts` | 业务模块使用的路由与跳转入口。 |
|
|
63
63
|
| `src/request.ts` | 业务模块使用的请求客户端入口。 |
|
|
64
|
-
| `src/security.ts` | OAuth
|
|
64
|
+
| `src/security.ts` | OAuth、密码加密、密码强度和 WebAuthn 入口。 |
|
|
65
65
|
| `src/table.ts` | ProTable 请求和选择值处理入口。 |
|
|
66
66
|
| `src/tenant.ts` | 租户选项入口。 |
|
|
67
67
|
| `src/components/ProTable.ts` | ProTable 对外 Adapter,稳定组件入口为 `components/ProTable`。 |
|
|
68
68
|
| `src/bootstrap.ts` | 创建 Vue 应用,注册 core 与宿主选择的业务模块后挂载。 |
|
|
69
69
|
| `src/App.vue` | 根组件和路由出口。 |
|
|
70
70
|
| `src/vite-env.d.ts` | Vite、构建变量和 `import.meta.glob` 类型引用。 |
|
|
71
|
-
| `src/api/base/*.ts` | Proto `base` 领域的登录、OAuth、配置和文件请求。
|
|
71
|
+
| `src/api/base/*.ts` | Proto `base` 领域的登录、MFA、OAuth、配置和文件请求。 |
|
|
72
72
|
| `src/api/system/*.ts` | Proto `system` 领域的认证、字典和租户运行请求。 |
|
|
73
73
|
| `src/assets/fonts/` | 应用字体及字体样式。 |
|
|
74
74
|
| `src/assets/iconfont/` | 内置图标字体。 |
|
|
75
75
|
| `src/assets/images/` | Logo、登录、错误页、头像和 OAuth 图标。 |
|
|
76
76
|
| `src/components/Card/` | 数据概览卡片。 |
|
|
77
77
|
| `src/components/CronExpression/` | Cron 表达式编辑器。 |
|
|
78
|
-
| `src/components/Dialog/` |
|
|
78
|
+
| `src/components/Dialog/` | 通用弹窗、表单弹窗和密码验证弹窗。 |
|
|
79
79
|
| `src/components/Dict/` | 字典选择与字典值展示。 |
|
|
80
80
|
| `src/components/ECharts/` | ECharts 容器和图表配置。 |
|
|
81
81
|
| `src/components/ErrorMessage/` | 403、404、500 页面复用的错误状态展示组件。 |
|
|
@@ -85,6 +85,7 @@ packages/core
|
|
|
85
85
|
| `src/components/PasswordStrength/` | 密码强度提示。 |
|
|
86
86
|
| `src/components/ProForm/` | 配置驱动表单、动态列表、键值列表和类型。 |
|
|
87
87
|
| `src/components/ProTable/` | 配置驱动表格、分页、列设置和类型。 |
|
|
88
|
+
| `src/components/RichTextPreview/` | 经过清洗的富文本预览。 |
|
|
88
89
|
| `src/components/SearchForm/` | 搜索表单和搜索字段渲染。 |
|
|
89
90
|
| `src/components/SelectFilter/` | 筛选条件选择器。 |
|
|
90
91
|
| `src/components/SelectIcon/` | 图标选择器。 |
|
|
@@ -125,7 +126,7 @@ packages/core
|
|
|
125
126
|
| `src/styles/*.scss` | Element Plus 覆盖、暗色主题、重置、公共样式和变量。 |
|
|
126
127
|
| `src/styles/theme/*.ts` | 侧栏、头部和菜单的运行时主题变量。 |
|
|
127
128
|
| `src/typings/*.d.ts` | 全局、Window、工具和第三方库的手写声明。 |
|
|
128
|
-
| `src/utils/*.ts` | 颜色、字典、校验、错误、事件、OAuth
|
|
129
|
+
| `src/utils/*.ts` | 颜色、字典、校验、错误、事件、OAuth、密码、MFA/WebAuthn、表格、请求、路由、SVG、租户等工具。 |
|
|
129
130
|
| `src/utils/is/index.ts` | 常用类型与值判断。 |
|
|
130
131
|
| `src/views/login/` | 登录页和登录表单。 |
|
|
131
132
|
| `src/views/error/` | 403、404、500 和动态菜单 Pending 的默认路由页面。 |
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"element-plus": [
|
|
3
|
+
"ElConfigProvider",
|
|
4
|
+
"ElImage",
|
|
5
|
+
"ElLoading",
|
|
6
|
+
"ElMessage",
|
|
7
|
+
"ElMessageBox",
|
|
8
|
+
"ElNotification",
|
|
9
|
+
"ElTable",
|
|
10
|
+
"ElTag",
|
|
11
|
+
"ElTooltip",
|
|
12
|
+
"ElTree",
|
|
13
|
+
"formContextKey",
|
|
14
|
+
"formItemContextKey"
|
|
15
|
+
],
|
|
16
|
+
"@element-plus/icons-vue": [
|
|
17
|
+
"ArrowDown",
|
|
18
|
+
"ArrowLeft",
|
|
19
|
+
"ArrowRight",
|
|
20
|
+
"ArrowUp",
|
|
21
|
+
"Bell",
|
|
22
|
+
"Calendar",
|
|
23
|
+
"Camera",
|
|
24
|
+
"ChatDotRound",
|
|
25
|
+
"CircleCheck",
|
|
26
|
+
"CircleCheckFilled",
|
|
27
|
+
"CircleClose",
|
|
28
|
+
"CirclePlus",
|
|
29
|
+
"Close",
|
|
30
|
+
"CollectionTag",
|
|
31
|
+
"CopyDocument",
|
|
32
|
+
"DataAnalysis",
|
|
33
|
+
"Delete",
|
|
34
|
+
"Document",
|
|
35
|
+
"Download",
|
|
36
|
+
"Edit",
|
|
37
|
+
"EditPen",
|
|
38
|
+
"Expand",
|
|
39
|
+
"Female",
|
|
40
|
+
"Finished",
|
|
41
|
+
"Fold",
|
|
42
|
+
"Folder",
|
|
43
|
+
"Goods",
|
|
44
|
+
"InfoFilled",
|
|
45
|
+
"List",
|
|
46
|
+
"Lock",
|
|
47
|
+
"Male",
|
|
48
|
+
"Message",
|
|
49
|
+
"Moon",
|
|
50
|
+
"Operation",
|
|
51
|
+
"Phone",
|
|
52
|
+
"Plus",
|
|
53
|
+
"Position",
|
|
54
|
+
"Promotion",
|
|
55
|
+
"QuestionFilled",
|
|
56
|
+
"Refresh",
|
|
57
|
+
"RefreshLeft",
|
|
58
|
+
"RefreshRight",
|
|
59
|
+
"Search",
|
|
60
|
+
"Setting",
|
|
61
|
+
"Sunny",
|
|
62
|
+
"Switch",
|
|
63
|
+
"SwitchButton",
|
|
64
|
+
"Tickets",
|
|
65
|
+
"Timer",
|
|
66
|
+
"User",
|
|
67
|
+
"UserFilled",
|
|
68
|
+
"Van",
|
|
69
|
+
"View",
|
|
70
|
+
"Wallet",
|
|
71
|
+
"WarningFilled"
|
|
72
|
+
]
|
|
73
|
+
}
|
package/build/plugins.ts
CHANGED
|
@@ -13,6 +13,7 @@ import viteCompression from "vite-plugin-compression";
|
|
|
13
13
|
import vueSetupExtend from "unplugin-vue-setup-extend-plus/vite";
|
|
14
14
|
import NextDevTools from "vite-plugin-vue-devtools";
|
|
15
15
|
import { codeInspectorPlugin } from "code-inspector-plugin";
|
|
16
|
+
import autoImports from "./auto-imports.json";
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Vite 插件扩展配置。
|
|
@@ -45,64 +46,7 @@ export const createVitePlugins = (viteEnv: ViteEnv, options: VitePluginOptions =
|
|
|
45
46
|
include: sourcePatterns,
|
|
46
47
|
exclude: sourcePatterns ? [/[/\\]\.git[/\\]/] : undefined,
|
|
47
48
|
resolvers: [ElementPlusResolver()],
|
|
48
|
-
imports: [
|
|
49
|
-
"vue",
|
|
50
|
-
"vue-router",
|
|
51
|
-
{
|
|
52
|
-
"element-plus": [
|
|
53
|
-
"ElConfigProvider",
|
|
54
|
-
"ElLoading",
|
|
55
|
-
"ElMessage",
|
|
56
|
-
"ElMessageBox",
|
|
57
|
-
"ElNotification",
|
|
58
|
-
"ElTable",
|
|
59
|
-
"ElTree",
|
|
60
|
-
"formContextKey",
|
|
61
|
-
"formItemContextKey"
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"@element-plus/icons-vue": [
|
|
66
|
-
"ArrowDown",
|
|
67
|
-
"ArrowRight",
|
|
68
|
-
"ArrowUp",
|
|
69
|
-
"Camera",
|
|
70
|
-
"CircleCheck",
|
|
71
|
-
"CircleClose",
|
|
72
|
-
"CirclePlus",
|
|
73
|
-
"Delete",
|
|
74
|
-
"Document",
|
|
75
|
-
"Download",
|
|
76
|
-
"Edit",
|
|
77
|
-
"EditPen",
|
|
78
|
-
"Expand",
|
|
79
|
-
"Female",
|
|
80
|
-
"Fold",
|
|
81
|
-
"Goods",
|
|
82
|
-
"InfoFilled",
|
|
83
|
-
"List",
|
|
84
|
-
"Male",
|
|
85
|
-
"Moon",
|
|
86
|
-
"Operation",
|
|
87
|
-
"Phone",
|
|
88
|
-
"Plus",
|
|
89
|
-
"Position",
|
|
90
|
-
"QuestionFilled",
|
|
91
|
-
"Refresh",
|
|
92
|
-
"RefreshLeft",
|
|
93
|
-
"Search",
|
|
94
|
-
"Sunny",
|
|
95
|
-
"Switch",
|
|
96
|
-
"Tickets",
|
|
97
|
-
"Timer",
|
|
98
|
-
"User",
|
|
99
|
-
"UserFilled",
|
|
100
|
-
"Van",
|
|
101
|
-
"View",
|
|
102
|
-
"Wallet"
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
]
|
|
49
|
+
imports: ["vue", "vue-router", autoImports]
|
|
106
50
|
}),
|
|
107
51
|
// 按需解析 Element Plus 组件,避免主入口全量安装 ElementPlus。
|
|
108
52
|
Components({
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { LoginResponse } from "../../rpc/base/v1/login";
|
|
2
|
+
import type { BeginMfaDisableRequest, BeginMfaDisableResponse, BeginMfaEnrollmentRequest, BeginMfaEnrollmentResponse, BeginMfaSetupRequest, BeginMfaSetupResponse, ConfirmMfaEnrollmentRequest, ConfirmMfaEnrollmentResponse, ConfirmMfaSetupRequest, ConfirmMfaSetupResponse, DisableMfaRequest, GetMfaStatusRequest, MfaService, MfaStatusResponse, RecoveryCodesResponse, RegenerateMfaRecoveryCodesRequest, VerifyMfaRequest } from "../../rpc/base/v1/mfa";
|
|
3
|
+
import type { Empty } from "../../rpc/google/protobuf/empty";
|
|
4
|
+
/** 多因素认证公共服务。 */
|
|
5
|
+
export declare class MfaServiceImpl implements MfaService {
|
|
6
|
+
/** 校验登录阶段多因素认证。 */
|
|
7
|
+
VerifyMfa(request: VerifyMfaRequest): Promise<LoginResponse>;
|
|
8
|
+
/** 开始登录阶段的强制多因素认证绑定。 */
|
|
9
|
+
BeginMfaEnrollment(request: BeginMfaEnrollmentRequest): Promise<BeginMfaEnrollmentResponse>;
|
|
10
|
+
/** 确认登录阶段的强制多因素认证绑定。 */
|
|
11
|
+
ConfirmMfaEnrollment(request: ConfirmMfaEnrollmentRequest): Promise<ConfirmMfaEnrollmentResponse>;
|
|
12
|
+
/** 查询当前用户多因素认证状态。 */
|
|
13
|
+
GetMfaStatus(request: GetMfaStatusRequest): Promise<MfaStatusResponse>;
|
|
14
|
+
/** 开始绑定当前用户的多因素认证方式。 */
|
|
15
|
+
BeginMfaSetup(request: BeginMfaSetupRequest): Promise<BeginMfaSetupResponse>;
|
|
16
|
+
/** 确认绑定当前用户的多因素认证方式。 */
|
|
17
|
+
ConfirmMfaSetup(request: ConfirmMfaSetupRequest): Promise<ConfirmMfaSetupResponse>;
|
|
18
|
+
/** 开始禁用 WebAuthn 多因素认证的 Passkey 验证。 */
|
|
19
|
+
BeginMfaDisable(request: BeginMfaDisableRequest): Promise<BeginMfaDisableResponse>;
|
|
20
|
+
/** 禁用当前用户的多因素认证。 */
|
|
21
|
+
DisableMfa(request: DisableMfaRequest): Promise<Empty>;
|
|
22
|
+
/** 重新生成当前用户的多因素认证恢复码。 */
|
|
23
|
+
RegenerateMfaRecoveryCodes(request: RegenerateMfaRecoveryCodesRequest): Promise<RecoveryCodesResponse>;
|
|
24
|
+
}
|
|
25
|
+
/** defMfaService 多因素认证公共服务实例。 */
|
|
26
|
+
export declare const defMfaService: MfaServiceImpl;
|
|
@@ -55,13 +55,13 @@ declare const __VLS_base: import("vue").DefineComponent<FormDialogProps, {
|
|
|
55
55
|
closeOnClickModal: boolean;
|
|
56
56
|
closeOnPressEscape: boolean;
|
|
57
57
|
top: string;
|
|
58
|
-
rules: FormRules;
|
|
59
|
-
labelWidth: string;
|
|
60
|
-
colSpan: number;
|
|
61
58
|
confirmText: string;
|
|
62
59
|
cancelText: string;
|
|
63
60
|
confirmLoading: boolean;
|
|
61
|
+
rules: FormRules;
|
|
62
|
+
labelWidth: string;
|
|
64
63
|
gutter: number;
|
|
64
|
+
colSpan: number;
|
|
65
65
|
formProps: Record<string, any>;
|
|
66
66
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
67
67
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { PasswordCryptoScene } from "../../utils/passwordCrypto";
|
|
2
|
+
import type { PasswordCrypto } from "../../rpc/common/v1/types";
|
|
3
|
+
/** 通用密码验证弹窗属性。 */
|
|
4
|
+
interface PasswordVerifyDialogProps {
|
|
5
|
+
/** 弹窗显示状态。 */
|
|
6
|
+
modelValue: boolean;
|
|
7
|
+
/** 弹窗标题。 */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** 密码输入前的可选补充说明。 */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** 弹窗宽度。 */
|
|
12
|
+
width?: string | number;
|
|
13
|
+
/** 弹窗顶部距离。 */
|
|
14
|
+
top?: string;
|
|
15
|
+
/** 密码字段标题。 */
|
|
16
|
+
passwordLabel?: string;
|
|
17
|
+
/** 密码输入提示。 */
|
|
18
|
+
passwordPlaceholder?: string;
|
|
19
|
+
/** 确认按钮文案。 */
|
|
20
|
+
confirmText?: string;
|
|
21
|
+
/** 取消按钮文案。 */
|
|
22
|
+
cancelText?: string;
|
|
23
|
+
/** 外部业务提交状态。 */
|
|
24
|
+
confirmLoading?: boolean;
|
|
25
|
+
/** 密码加密场景。 */
|
|
26
|
+
scene?: PasswordCryptoScene;
|
|
27
|
+
/** 是否关闭时销毁内容。 */
|
|
28
|
+
destroyOnClose?: boolean;
|
|
29
|
+
/** 是否允许点击遮罩关闭。 */
|
|
30
|
+
closeOnClickModal?: boolean;
|
|
31
|
+
/** 是否允许按 Esc 关闭。 */
|
|
32
|
+
closeOnPressEscape?: boolean;
|
|
33
|
+
/** 表单标签宽度。 */
|
|
34
|
+
labelWidth?: string;
|
|
35
|
+
}
|
|
36
|
+
declare const __VLS_export: import("vue").DefineComponent<PasswordVerifyDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
confirm: (password: PasswordCrypto) => any;
|
|
38
|
+
close: () => any;
|
|
39
|
+
"update:modelValue": (value: boolean) => any;
|
|
40
|
+
closed: () => any;
|
|
41
|
+
cancel: () => any;
|
|
42
|
+
}, string, import("vue").PublicProps, Readonly<PasswordVerifyDialogProps> & Readonly<{
|
|
43
|
+
onConfirm?: ((password: PasswordCrypto) => any) | undefined;
|
|
44
|
+
onClose?: (() => any) | undefined;
|
|
45
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
46
|
+
onClosed?: (() => any) | undefined;
|
|
47
|
+
onCancel?: (() => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
description: string;
|
|
50
|
+
title: string;
|
|
51
|
+
width: string | number;
|
|
52
|
+
destroyOnClose: boolean;
|
|
53
|
+
closeOnClickModal: boolean;
|
|
54
|
+
closeOnPressEscape: boolean;
|
|
55
|
+
top: string;
|
|
56
|
+
confirmText: string;
|
|
57
|
+
cancelText: string;
|
|
58
|
+
confirmLoading: boolean;
|
|
59
|
+
labelWidth: string;
|
|
60
|
+
passwordLabel: string;
|
|
61
|
+
passwordPlaceholder: string;
|
|
62
|
+
scene: PasswordCryptoScene;
|
|
63
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
64
|
+
declare const _default: typeof __VLS_export;
|
|
65
|
+
export default _default;
|
|
@@ -44,10 +44,10 @@ declare const __VLS_base: import("vue").DefineComponent<ProDialogProps, {}, {},
|
|
|
44
44
|
closeOnClickModal: boolean;
|
|
45
45
|
closeOnPressEscape: boolean;
|
|
46
46
|
top: string;
|
|
47
|
-
showFooter: boolean;
|
|
48
47
|
confirmText: string;
|
|
49
48
|
cancelText: string;
|
|
50
49
|
confirmLoading: boolean;
|
|
50
|
+
showFooter: boolean;
|
|
51
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
52
52
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
53
|
declare const _default: typeof __VLS_export;
|
|
@@ -17,12 +17,12 @@ type __VLS_Slots = {} & {
|
|
|
17
17
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
18
|
offset: number;
|
|
19
19
|
span: number;
|
|
20
|
+
suffix: boolean;
|
|
20
21
|
xs: Responsive;
|
|
21
22
|
sm: Responsive;
|
|
22
23
|
md: Responsive;
|
|
23
24
|
lg: Responsive;
|
|
24
25
|
xl: Responsive;
|
|
25
|
-
suffix: boolean;
|
|
26
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** MFA 恢复码弹窗属性。 */
|
|
2
|
+
interface MfaRecoveryCodesDialogProps {
|
|
3
|
+
/** 弹窗显示状态。 */
|
|
4
|
+
modelValue: boolean;
|
|
5
|
+
/** 本次生成的一次性恢复码。 */
|
|
6
|
+
codes: string[];
|
|
7
|
+
}
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<MfaRecoveryCodesDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
confirm: () => any;
|
|
10
|
+
"update:modelValue": (value: boolean) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<MfaRecoveryCodesDialogProps> & Readonly<{
|
|
12
|
+
onConfirm?: (() => any) | undefined;
|
|
13
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
modelValue: boolean;
|
|
16
|
+
codes: string[];
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** MFA TOTP 绑定面板属性。 */
|
|
2
|
+
interface MfaSetupPanelProps {
|
|
3
|
+
/** TOTP 绑定地址。 */
|
|
4
|
+
uri: string;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<MfaSetupPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MfaSetupPanelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -4,18 +4,18 @@ interface ProFormItemProps {
|
|
|
4
4
|
field: ProFormField;
|
|
5
5
|
model: Record<string, any>;
|
|
6
6
|
}
|
|
7
|
-
declare var
|
|
7
|
+
declare var __VLS_127: string, __VLS_128: {
|
|
8
8
|
option: import("element-plus").TransferDataItem;
|
|
9
9
|
field: ProFormField;
|
|
10
10
|
model: Record<string, any>;
|
|
11
|
-
},
|
|
11
|
+
}, __VLS_173: string, __VLS_174: {
|
|
12
12
|
field: ProFormField;
|
|
13
13
|
model: Record<string, any>;
|
|
14
14
|
};
|
|
15
15
|
type __VLS_Slots = {} & {
|
|
16
|
-
[K in NonNullable<typeof
|
|
16
|
+
[K in NonNullable<typeof __VLS_127>]?: (props: typeof __VLS_128) => any;
|
|
17
17
|
} & {
|
|
18
|
-
[K in NonNullable<typeof
|
|
18
|
+
[K in NonNullable<typeof __VLS_173>]?: (props: typeof __VLS_174) => any;
|
|
19
19
|
};
|
|
20
20
|
declare const __VLS_base: import("vue").DefineComponent<ProFormItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProFormItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -23,8 +23,8 @@ declare const __VLS_base: import("vue").DefineComponent<ProFormProps, {
|
|
|
23
23
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProFormProps> & Readonly<{}>, {
|
|
24
24
|
rules: FormRules;
|
|
25
25
|
labelWidth: string;
|
|
26
|
-
colSpan: number;
|
|
27
26
|
gutter: number;
|
|
27
|
+
colSpan: number;
|
|
28
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
29
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { FormItemRule } from "element-plus";
|
|
2
|
+
import type { Component } from "vue";
|
|
2
3
|
/** ProForm 支持的字段组件类型。 */
|
|
3
|
-
export type ProFormComponentType = "input" | "password" | "textarea" | "input-number" | "segmented" | "switch" | "checkbox" | "select" | "dict" | "radio-group" | "checkbox-group" | "tree-select" | "date-picker" | "cron-expression" | "transfer" | "image-upload" | "images-upload" | "file-upload" | "files-upload" | "rich-text" | "dynamic-list" | "kv-list" | "slot";
|
|
4
|
+
export type ProFormComponentType = "input" | "password" | "textarea" | "input-number" | "color-picker" | "segmented" | "switch" | "checkbox" | "select" | "dict" | "radio-group" | "checkbox-group" | "tree-select" | "date-picker" | "cron-expression" | "transfer" | "image-upload" | "images-upload" | "file-upload" | "files-upload" | "rich-text" | "dynamic-list" | "kv-list" | "slot";
|
|
4
5
|
/** ProForm 选择型字段选项。 */
|
|
5
6
|
export interface ProFormOption {
|
|
6
7
|
label: string;
|
|
7
8
|
value: string | number | boolean;
|
|
8
9
|
disabled?: boolean;
|
|
10
|
+
/** 下拉项前置图标。 */
|
|
11
|
+
icon?: Component;
|
|
9
12
|
children?: ProFormOption[];
|
|
10
13
|
/** Element Plus 懒加载树节点是否为叶子节点。 */
|
|
11
14
|
isLeaf?: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** 富文本预览组件属性。 */
|
|
2
|
+
interface RichTextPreviewProps {
|
|
3
|
+
/** 待展示的 HTML 内容。 */
|
|
4
|
+
modelValue: string;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<RichTextPreviewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RichTextPreviewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -28,10 +28,10 @@ declare const __VLS_base: import("vue").DefineComponent<UploadFileProps, {}, {},
|
|
|
28
28
|
height: string;
|
|
29
29
|
drag: boolean;
|
|
30
30
|
fileType: File.ImageMimeType[];
|
|
31
|
-
borderRadius: string;
|
|
32
31
|
fileSize: number;
|
|
33
32
|
uploadType: string;
|
|
34
33
|
imageUrl: string;
|
|
34
|
+
borderRadius: string;
|
|
35
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
37
|
declare const _default: typeof __VLS_export;
|
|
@@ -30,11 +30,11 @@ declare const __VLS_base: import("vue").DefineComponent<UploadFileProps, {}, {},
|
|
|
30
30
|
height: string;
|
|
31
31
|
drag: boolean;
|
|
32
32
|
fileType: File.ImageMimeType[];
|
|
33
|
-
borderRadius: string;
|
|
34
33
|
fileSize: number;
|
|
35
34
|
uploadType: string;
|
|
36
35
|
fileList: UploadUserFile[];
|
|
37
36
|
limit: number;
|
|
37
|
+
borderRadius: string;
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
39
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
40
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|