@liujitcn/kratos-admin-core 0.0.29 → 0.0.32
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 +15 -8
- package/build/auto-imports.json +73 -0
- package/build/plugins.ts +2 -58
- package/dist/package/declarations/src/api/base/{config.d.ts → v1/config.d.ts} +1 -1
- package/dist/package/declarations/src/api/base/{file.d.ts → v1/file.d.ts} +3 -1
- package/dist/package/declarations/src/api/base/{language.d.ts → v1/language.d.ts} +1 -1
- package/dist/package/declarations/src/api/base/{login.d.ts → v1/login.d.ts} +2 -2
- package/dist/package/declarations/src/api/base/v1/mfa.d.ts +26 -0
- package/dist/package/declarations/src/api/base/{oauth.d.ts → v1/oauth.d.ts} +1 -1
- package/dist/package/declarations/src/api/system/{auth.d.ts → admin/v1/auth.d.ts} +2 -2
- package/dist/package/declarations/src/api/system/{base_dict.d.ts → admin/v1/base_dict.d.ts} +1 -1
- package/dist/package/declarations/src/api/system/{base_tenant.d.ts → admin/v1/base_tenant.d.ts} +2 -2
- 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/ProTable/index.vue.d.ts +114 -0
- package/dist/package/declarations/src/components/RichTextPreview/index.vue.d.ts +8 -0
- package/dist/package/declarations/src/components/TreeFilter/index.vue.d.ts +84 -76
- package/dist/package/declarations/src/components/Upload/File.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Upload/Files.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Upload/Img.vue.d.ts +2 -2
- package/dist/package/declarations/src/components/Upload/Imgs.vue.d.ts +2 -2
- package/dist/package/declarations/src/components/WangEditor/index.vue.d.ts +2 -0
- package/dist/package/declarations/src/documentTitle.d.ts +2 -0
- package/dist/package/declarations/src/format.d.ts +1 -1
- package/dist/package/declarations/src/index.d.ts +2 -1
- package/dist/package/declarations/src/layouts/components/LockScreen.vue.d.ts +3 -0
- package/dist/package/declarations/src/locales/generated.d.ts +208 -0
- package/dist/package/declarations/src/locales/index.d.ts +2 -0
- package/dist/package/declarations/src/modules/index.d.ts +1 -3
- package/dist/package/declarations/src/request.d.ts +1 -1
- package/dist/package/declarations/src/routers/index.d.ts +1 -1
- package/dist/package/declarations/src/rpc/base/v1/login.d.ts +37 -5
- 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/auth.d.ts +13 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +0 -101
- package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n.d.ts +10 -6
- package/dist/package/declarations/src/rpc/system/common/v1/common.d.ts +26 -0
- package/dist/package/declarations/src/security.d.ts +2 -0
- package/dist/package/declarations/src/stores/interface/index.d.ts +19 -1
- package/dist/package/declarations/src/stores/modules/lockScreen.d.ts +20 -0
- package/dist/package/declarations/src/stores/modules/user.d.ts +7 -6
- 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/passwordStrength.d.ts +1 -12
- package/dist/package/declarations/src/utils/request.d.ts +13 -2
- package/dist/package/declarations/src/utils/utils.d.ts +4 -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/{config.ts → v1/config.ts} +2 -2
- package/dist/package/src/api/base/{file.ts → v1/file.ts} +20 -24
- package/dist/package/src/api/base/{language.ts → v1/language.ts} +2 -2
- package/dist/package/src/api/base/{login.ts → v1/login.ts} +3 -3
- package/dist/package/src/api/base/v1/mfa.ts +114 -0
- package/dist/package/src/api/base/{oauth.ts → v1/oauth.ts} +2 -2
- package/dist/package/src/api/system/{auth.ts → admin/v1/auth.ts} +3 -3
- package/dist/package/src/api/system/{base_dict.ts → admin/v1/base_dict.ts} +2 -2
- package/dist/package/src/api/system/{base_tenant.ts → admin/v1/base_tenant.ts} +3 -3
- package/dist/package/src/bootstrap.ts +6 -5
- package/dist/package/src/components/CronExpression/index.vue +4 -3
- package/dist/package/src/components/Dialog/PasswordVerifyDialog.vue +176 -0
- package/dist/package/src/components/Dialog/ProDialog.vue +1 -0
- package/dist/package/src/components/ImportExcel/index.vue +4 -2
- package/dist/package/src/components/Loading/fullScreen.ts +2 -1
- package/dist/package/src/components/MarkdownPreview/index.vue +22 -2
- 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/PasswordStrength/index.vue +1 -1
- 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/components/TableColumn.vue +14 -6
- package/dist/package/src/components/ProTable/index.vue +9 -5
- package/dist/package/src/components/RichTextPreview/index.vue +56 -0
- package/dist/package/src/components/SelectIcon/index.vue +3 -2
- package/dist/package/src/components/Upload/File.vue +2 -2
- package/dist/package/src/components/Upload/Files.vue +2 -2
- package/dist/package/src/components/Upload/Img.vue +7 -5
- package/dist/package/src/components/Upload/Imgs.vue +6 -5
- package/dist/package/src/components/WangEditor/index.vue +10 -7
- package/dist/package/src/config/index.ts +1 -1
- package/dist/package/src/documentTitle.ts +8 -0
- package/dist/package/src/format.ts +1 -1
- package/dist/package/src/index.ts +2 -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 +26 -6
- package/dist/package/src/layouts/components/Header/components/InfoDialog.vue +4 -3
- package/dist/package/src/layouts/components/Header/components/PasswordDialog.vue +4 -3
- package/dist/package/src/layouts/components/Header/components/SearchMenu.vue +16 -8
- package/dist/package/src/layouts/components/LockScreen.vue +573 -0
- package/dist/package/src/layouts/components/Tabs/index.vue +12 -3
- package/dist/package/src/layouts/components/ThemeDrawer/index.scss +4 -4
- 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 +51 -3
- package/dist/package/src/locales/index.ts +16 -12
- package/dist/package/src/locales/ja-JP.json +51 -3
- package/dist/package/src/locales/zh-CN.json +51 -3
- package/dist/package/src/locales/zh-TW.json +51 -3
- package/dist/package/src/modules/index.ts +2 -4
- package/dist/package/src/request.ts +3 -0
- package/dist/package/src/routers/index.ts +15 -14
- package/dist/package/src/rpc/base/v1/login.ts +37 -4
- 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/auth.ts +13 -0
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +0 -112
- package/dist/package/src/rpc/system/admin/v1/base_i18n.ts +10 -6
- package/dist/package/src/rpc/system/common/v1/common.ts +35 -0
- package/dist/package/src/security.ts +2 -0
- package/dist/package/src/stores/interface/index.ts +20 -1
- package/dist/package/src/stores/modules/auth.ts +1 -1
- package/dist/package/src/stores/modules/config.ts +2 -2
- package/dist/package/src/stores/modules/dict.ts +1 -1
- package/dist/package/src/stores/modules/lockScreen.ts +78 -0
- package/dist/package/src/stores/modules/user.ts +34 -22
- package/dist/package/src/stores/runtime.ts +1 -0
- package/dist/package/src/styles/element.scss +35 -4
- package/dist/package/src/utils/clipboard.ts +22 -0
- package/dist/package/src/utils/passwordCrypto.ts +1 -1
- package/dist/package/src/utils/passwordStrength.ts +7 -24
- package/dist/package/src/utils/request.ts +175 -40
- package/dist/package/src/utils/tenant.ts +1 -1
- package/dist/package/src/utils/utils.ts +25 -6
- package/dist/package/src/utils/webauthn.ts +90 -0
- package/dist/package/src/views/login/components/LoginForm.vue +257 -24
- package/dist/package/src/views/login/index.scss +2 -2
- 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 +4 -1
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
export * from "./modules";
|
|
8
8
|
export * from "./locales";
|
|
9
|
-
export { defLanguageService } from "./api/base/language";
|
|
9
|
+
export { defLanguageService } from "./api/base/v1/language";
|
|
10
|
+
export { setAdminDocumentTitle } from "./documentTitle";
|
|
10
11
|
export { kratosAdminModule } from "./modules/kratosAdmin";
|
|
11
12
|
export { bootstrapAdminApp } from "./bootstrap";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<el-header>
|
|
5
5
|
<div class="header-lf mask-image">
|
|
6
6
|
<div class="logo flx-center">
|
|
7
|
-
<img class="logo-img" :src="logoUrl" alt="
|
|
7
|
+
<img class="logo-img" :src="logoUrl" :alt="t('core.layout.logo_alt')" />
|
|
8
8
|
<span class="logo-text">{{ title }}</span>
|
|
9
9
|
</div>
|
|
10
10
|
<ToolBarLeft />
|
|
@@ -46,11 +46,13 @@ import Main from "../../layouts/components/Main/index.vue";
|
|
|
46
46
|
import SubMenu from "../../layouts/components/Menu/SubMenu.vue";
|
|
47
47
|
import ToolBarLeft from "../../layouts/components/Header/ToolBarLeft.vue";
|
|
48
48
|
import ToolBarRight from "../../layouts/components/Header/ToolBarRight.vue";
|
|
49
|
+
import { useLocaleStore } from "../../locales";
|
|
49
50
|
|
|
50
51
|
const route = useRoute();
|
|
51
52
|
const authStore = useAuthStore();
|
|
52
53
|
const configStore = useConfigStore();
|
|
53
54
|
const globalStore = useGlobalStore();
|
|
55
|
+
const { t } = useLocaleStore();
|
|
54
56
|
const accordion = computed(() => globalStore.accordion);
|
|
55
57
|
const isCollapse = computed(() => globalStore.isCollapse);
|
|
56
58
|
const menuList = computed(() => authStore.showMenuListGet);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<el-container class="layout">
|
|
4
4
|
<div class="aside-split">
|
|
5
5
|
<div class="logo flx-center">
|
|
6
|
-
<img class="logo-img" :src="logoUrl" alt="
|
|
6
|
+
<img class="logo-img" :src="logoUrl" :alt="t('core.layout.logo_alt')" />
|
|
7
7
|
</div>
|
|
8
8
|
<el-scrollbar>
|
|
9
9
|
<div class="split-list">
|
|
@@ -60,12 +60,14 @@ import Main from "../../layouts/components/Main/index.vue";
|
|
|
60
60
|
import ToolBarLeft from "../../layouts/components/Header/ToolBarLeft.vue";
|
|
61
61
|
import ToolBarRight from "../../layouts/components/Header/ToolBarRight.vue";
|
|
62
62
|
import SubMenu from "../../layouts/components/Menu/SubMenu.vue";
|
|
63
|
+
import { useLocaleStore } from "../../locales";
|
|
63
64
|
|
|
64
65
|
const route = useRoute();
|
|
65
66
|
const router = useRouter();
|
|
66
67
|
const authStore = useAuthStore();
|
|
67
68
|
const configStore = useConfigStore();
|
|
68
69
|
const globalStore = useGlobalStore();
|
|
70
|
+
const { t } = useLocaleStore();
|
|
69
71
|
const accordion = computed(() => globalStore.accordion);
|
|
70
72
|
const isCollapse = computed(() => globalStore.isCollapse);
|
|
71
73
|
const menuList = computed(() => authStore.showMenuListGet.filter(item => Boolean(item.path) || Boolean(item.children?.length)));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<el-container class="layout">
|
|
4
4
|
<el-header>
|
|
5
5
|
<div class="logo flx-center">
|
|
6
|
-
<img class="logo-img" :src="logoUrl" alt="
|
|
6
|
+
<img class="logo-img" :src="logoUrl" :alt="t('core.layout.logo_alt')" />
|
|
7
7
|
<span class="logo-text">{{ title }}</span>
|
|
8
8
|
</div>
|
|
9
9
|
<el-menu mode="horizontal" :router="false" :default-active="activeMenu">
|
|
@@ -44,11 +44,13 @@ import { getRouteMenuKey, getRouteMetaIcon, getRouteMetaTitle, getRouteTarget, i
|
|
|
44
44
|
import Main from "../../layouts/components/Main/index.vue";
|
|
45
45
|
import ToolBarRight from "../../layouts/components/Header/ToolBarRight.vue";
|
|
46
46
|
import SubMenu from "../../layouts/components/Menu/SubMenu.vue";
|
|
47
|
+
import { useLocaleStore } from "../../locales";
|
|
47
48
|
|
|
48
49
|
const route = useRoute();
|
|
49
50
|
const router = useRouter();
|
|
50
51
|
const authStore = useAuthStore();
|
|
51
52
|
const configStore = useConfigStore();
|
|
53
|
+
const { t } = useLocaleStore();
|
|
52
54
|
const menuList = computed(() => authStore.showMenuListGet);
|
|
53
55
|
const activeMenu = computed(() => route.path as string);
|
|
54
56
|
const title = computed(() => configStore.display.sysName || import.meta.env.VITE_GLOB_APP_TITLE);
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
<el-aside>
|
|
5
5
|
<div class="aside-box" :style="{ width: isCollapse ? '65px' : '240px' }">
|
|
6
6
|
<div ref="logoWrapperRef" :class="['logo', { 'logo--text-only': !showLogoIcon && !isCollapse }]">
|
|
7
|
-
<img
|
|
7
|
+
<img
|
|
8
|
+
v-show="isCollapse || showLogoIcon"
|
|
9
|
+
ref="logoIconRef"
|
|
10
|
+
class="logo-img"
|
|
11
|
+
:src="logoUrl"
|
|
12
|
+
:alt="t('core.layout.logo_alt')"
|
|
13
|
+
/>
|
|
8
14
|
<span
|
|
9
15
|
v-show="!isCollapse"
|
|
10
16
|
ref="logoTextRef"
|
|
@@ -46,11 +52,13 @@ import Main from "../../layouts/components/Main/index.vue";
|
|
|
46
52
|
import ToolBarLeft from "../../layouts/components/Header/ToolBarLeft.vue";
|
|
47
53
|
import ToolBarRight from "../../layouts/components/Header/ToolBarRight.vue";
|
|
48
54
|
import SubMenu from "../../layouts/components/Menu/SubMenu.vue";
|
|
55
|
+
import { useLocaleStore } from "../../locales";
|
|
49
56
|
|
|
50
57
|
const route = useRoute();
|
|
51
58
|
const authStore = useAuthStore();
|
|
52
59
|
const configStore = useConfigStore();
|
|
53
60
|
const globalStore = useGlobalStore();
|
|
61
|
+
const { t } = useLocaleStore();
|
|
54
62
|
const accordion = computed(() => globalStore.accordion);
|
|
55
63
|
const isCollapse = computed(() => globalStore.isCollapse);
|
|
56
64
|
const menuList = computed(() => authStore.showMenuListGet);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-dropdown ref="dropdownRef" trigger="click" placement="bottom-end" popper-class="header-avatar-dropdown">
|
|
3
3
|
<div class="avatar">
|
|
4
|
-
<img :src="avatarSrc" alt="avatar" @error="handleAvatarError" />
|
|
4
|
+
<img :src="avatarSrc" :alt="t('core.layout.avatar')" @error="handleAvatarError" />
|
|
5
5
|
</div>
|
|
6
6
|
<template #dropdown>
|
|
7
7
|
<div class="user-panel">
|
|
8
8
|
<div class="user-panel__summary">
|
|
9
9
|
<div class="user-panel__avatar">
|
|
10
|
-
<img :src="avatarSrc" alt="avatar" @error="handleAvatarError" />
|
|
10
|
+
<img :src="avatarSrc" :alt="t('core.layout.avatar')" @error="handleAvatarError" />
|
|
11
11
|
</div>
|
|
12
12
|
<div class="user-panel__identity">
|
|
13
13
|
<div class="user-panel__name">{{ displayName }}</div>
|
|
@@ -23,7 +23,11 @@
|
|
|
23
23
|
@click.stop="handleUserMenuAction(action.path)"
|
|
24
24
|
>
|
|
25
25
|
<el-icon v-if="action.icon"><component :is="action.icon" /></el-icon>
|
|
26
|
-
|
|
26
|
+
<span>{{ t(action.labelKey) }}</span>
|
|
27
|
+
</button>
|
|
28
|
+
<button class="action-btn action-btn--lock" type="button" @click.stop="lockScreen">
|
|
29
|
+
<el-icon><Lock /></el-icon>
|
|
30
|
+
<span>{{ t("core.layout.lock_screen") }}</span>
|
|
27
31
|
</button>
|
|
28
32
|
<button class="action-btn action-btn--danger" type="button" @click="logout">
|
|
29
33
|
<el-icon><SwitchButton /></el-icon>
|
|
@@ -41,16 +45,17 @@ import { LOGIN_URL } from "../../../../config";
|
|
|
41
45
|
import { useRouter } from "vue-router";
|
|
42
46
|
import { useUserStore } from "../../../../stores/modules/user";
|
|
43
47
|
import { useAuthStore } from "../../../../stores/modules/auth";
|
|
44
|
-
import { ElMessageBox, ElMessage } from "element-plus";
|
|
45
48
|
import type { DropdownInstance } from "element-plus";
|
|
46
49
|
import defaultAvatar from "../../../../assets/images/avatar.png";
|
|
47
50
|
import { navigateTo } from "../../../../utils/router";
|
|
48
51
|
import { getAdminUserMenuActions } from "../../../../modules";
|
|
49
52
|
import { useLocaleStore } from "../../../../locales";
|
|
53
|
+
import { useLockScreenStore } from "../../../../stores/modules/lockScreen";
|
|
50
54
|
|
|
51
55
|
const router = useRouter();
|
|
52
56
|
const userStore = useUserStore();
|
|
53
57
|
const authStore = useAuthStore();
|
|
58
|
+
const lockScreenStore = useLockScreenStore();
|
|
54
59
|
const userMenuActions = getAdminUserMenuActions();
|
|
55
60
|
const dropdownRef = ref<DropdownInstance>();
|
|
56
61
|
const { t } = useLocaleStore();
|
|
@@ -112,6 +117,12 @@ const handleUserMenuAction = async (path: string) => {
|
|
|
112
117
|
dropdownRef.value?.handleClose();
|
|
113
118
|
await navigateTo(router, path);
|
|
114
119
|
};
|
|
120
|
+
|
|
121
|
+
/** 打开锁屏密码设置界面并关闭头像菜单。 */
|
|
122
|
+
const lockScreen = () => {
|
|
123
|
+
dropdownRef.value?.handleClose();
|
|
124
|
+
lockScreenStore.openSetup();
|
|
125
|
+
};
|
|
115
126
|
</script>
|
|
116
127
|
|
|
117
128
|
<style scoped lang="scss">
|
|
@@ -135,7 +146,7 @@ const handleUserMenuAction = async (path: string) => {
|
|
|
135
146
|
padding: 16px;
|
|
136
147
|
background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
|
|
137
148
|
border: 1px solid rgb(15 23 42 / 8%);
|
|
138
|
-
border-radius:
|
|
149
|
+
border-radius: var(--admin-page-radius);
|
|
139
150
|
box-shadow: 0 16px 40px rgb(15 23 42 / 14%);
|
|
140
151
|
&__summary {
|
|
141
152
|
display: flex;
|
|
@@ -192,7 +203,7 @@ const handleUserMenuAction = async (path: string) => {
|
|
|
192
203
|
height: 38px;
|
|
193
204
|
cursor: pointer;
|
|
194
205
|
border: none;
|
|
195
|
-
border-radius:
|
|
206
|
+
border-radius: var(--admin-page-radius);
|
|
196
207
|
transition:
|
|
197
208
|
transform 0.2s ease,
|
|
198
209
|
box-shadow 0.2s ease,
|
|
@@ -218,6 +229,15 @@ const handleUserMenuAction = async (path: string) => {
|
|
|
218
229
|
box-shadow: 0 8px 18px rgb(220 38 38 / 14%);
|
|
219
230
|
}
|
|
220
231
|
}
|
|
232
|
+
&--lock {
|
|
233
|
+
color: var(--el-color-warning-dark-2);
|
|
234
|
+
background: var(--el-color-warning-light-9);
|
|
235
|
+
&:hover {
|
|
236
|
+
color: var(--el-color-warning-dark-2);
|
|
237
|
+
background: var(--el-color-warning-light-8);
|
|
238
|
+
box-shadow: 0 8px 18px rgb(230 162 60 / 14%);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
221
241
|
}
|
|
222
242
|
:deep(.header-avatar-dropdown) {
|
|
223
243
|
padding: 0;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<span>
|
|
2
|
+
<ProDialog v-model="dialogVisible" :title="t('core.layout.info')" width="500px" draggable>
|
|
3
|
+
<span>{{ t("core.layout.info_content") }}</span>
|
|
4
4
|
<template #footer>
|
|
5
5
|
<span class="dialog-footer">
|
|
6
6
|
<el-button @click="dialogVisible = false">{{ t("common.action.cancel") }}</el-button>
|
|
7
7
|
<el-button type="primary" @click="dialogVisible = false">{{ t("common.action.confirm") }}</el-button>
|
|
8
8
|
</span>
|
|
9
9
|
</template>
|
|
10
|
-
</
|
|
10
|
+
</ProDialog>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
14
|
import { useLocaleStore } from "../../../../locales";
|
|
15
|
+
import ProDialog from "../../../../components/Dialog/ProDialog.vue";
|
|
15
16
|
|
|
16
17
|
const { t } = useLocaleStore();
|
|
17
18
|
import { ref } from "vue";
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<span>
|
|
2
|
+
<ProDialog v-model="dialogVisible" :title="t('core.layout.password_change')" width="500px" draggable>
|
|
3
|
+
<span>{{ t("core.layout.password_content") }}</span>
|
|
4
4
|
<template #footer>
|
|
5
5
|
<span class="dialog-footer">
|
|
6
6
|
<el-button @click="dialogVisible = false">{{ t("common.action.cancel") }}</el-button>
|
|
7
7
|
<el-button type="primary" @click="dialogVisible = false">{{ t("common.action.confirm") }}</el-button>
|
|
8
8
|
</span>
|
|
9
9
|
</template>
|
|
10
|
-
</
|
|
10
|
+
</ProDialog>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
14
|
import { useLocaleStore } from "../../../../locales";
|
|
15
|
+
import ProDialog from "../../../../components/Dialog/ProDialog.vue";
|
|
15
16
|
|
|
16
17
|
const { t } = useLocaleStore();
|
|
17
18
|
import { ref } from "vue";
|
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
<el-tooltip effect="dark" :content="t('core.header.menu_search')" placement="bottom" :show-after="200">
|
|
4
4
|
<i :class="'iconfont icon-sousuo'" class="toolBar-icon" @click="handleOpen"></i>
|
|
5
5
|
</el-tooltip>
|
|
6
|
-
<
|
|
6
|
+
<ProDialog
|
|
7
|
+
class="search-dialog"
|
|
8
|
+
v-model="isShowSearch"
|
|
9
|
+
:width="600"
|
|
10
|
+
:show-close="false"
|
|
11
|
+
:show-footer="false"
|
|
12
|
+
top="10vh"
|
|
13
|
+
>
|
|
7
14
|
<el-input
|
|
8
15
|
v-model="searchMenu"
|
|
9
16
|
ref="menuInputRef"
|
|
@@ -30,7 +37,7 @@
|
|
|
30
37
|
</div>
|
|
31
38
|
</div>
|
|
32
39
|
<el-empty v-else class="mt20 mb20" :image-size="100" :description="t('core.header.menu_search_empty')" />
|
|
33
|
-
</
|
|
40
|
+
</ProDialog>
|
|
34
41
|
</div>
|
|
35
42
|
</template>
|
|
36
43
|
|
|
@@ -44,6 +51,7 @@ import { useDebounceFn } from "@vueuse/core";
|
|
|
44
51
|
import type { RouteItem } from "../../../../rpc/system/admin/v1/auth";
|
|
45
52
|
import { getRouteMetaHidden, getRouteMetaIcon, getRouteMetaTitle, getRouteTarget, isExternalPath } from "../../../../utils";
|
|
46
53
|
import { useLocaleStore } from "../../../../locales";
|
|
54
|
+
import ProDialog from "../../../../components/Dialog/ProDialog.vue";
|
|
47
55
|
|
|
48
56
|
/** 可被菜单搜索展示的路由项。 */
|
|
49
57
|
interface SearchRouteItem extends RouteItem {
|
|
@@ -152,11 +160,11 @@ const handleClickMenu = () => {
|
|
|
152
160
|
|
|
153
161
|
<style scoped lang="scss">
|
|
154
162
|
.search-menu {
|
|
155
|
-
:
|
|
156
|
-
border-radius:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
163
|
+
:global(.search-dialog) {
|
|
164
|
+
border-radius: var(--admin-page-radius);
|
|
165
|
+
}
|
|
166
|
+
:global(.search-dialog .el-dialog__header) {
|
|
167
|
+
display: none;
|
|
160
168
|
}
|
|
161
169
|
.menu-list {
|
|
162
170
|
max-height: 515px;
|
|
@@ -174,7 +182,7 @@ const handleClickMenu = () => {
|
|
|
174
182
|
cursor: pointer;
|
|
175
183
|
background-color: transparent;
|
|
176
184
|
border: 1px solid var(--el-border-color);
|
|
177
|
-
border-radius:
|
|
185
|
+
border-radius: var(--admin-page-radius);
|
|
178
186
|
transition: all 0.2s ease;
|
|
179
187
|
.menu-lf {
|
|
180
188
|
display: flex;
|