1 parent
6cb68866a4
commit
882171915c
10 files changed
+108
-32
No files matched your search
@@ -4,8 +4,7 @@ import App from './App.vue'
|
||||
import {router} from './router'
|
||||
import {useGlobalStatusStore} from './stores/useGlobalStatusStore'
|
||||
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import './styles/element-services.css'
|
||||
import './assets/main.css'
|
||||
|
||||
const isReservedResetPath = (pathname) => {
|
||||
@@ -41,5 +40,4 @@ router.onError((error) => {
|
||||
})
|
||||
|
||||
app.use(router)
|
||||
app.use(ElementPlus)
|
||||
app.mount('#app')
|
||||
@@ -0,0 +1,8 @@
|
||||
/* 模板组件和指令由解析器按需加载;显式调用的服务需要独立补齐样式。 */
|
||||
@import 'element-plus/theme-chalk/base.css';
|
||||
@import 'element-plus/theme-chalk/el-message.css';
|
||||
@import 'element-plus/theme-chalk/el-message-box.css';
|
||||
@import 'element-plus/theme-chalk/el-notification.css';
|
||||
@import 'element-plus/theme-chalk/el-overlay.css';
|
||||
@import 'element-plus/theme-chalk/el-button.css';
|
||||
@import 'element-plus/theme-chalk/el-input.css';
|
||||
@@ -1,28 +1,31 @@
|
||||
import {EpMenu} from "vue-icons-plus/ep";
|
||||
import { Lock, Connection, Setting, FolderOpened, Filter, User, Grid } from '@element-plus/icons-vue';
|
||||
|
||||
import {computed, ref, onMounted, onUnmounted} from 'vue'
|
||||
|
||||
import SecuritySettings from '@/views/components/SecuritySettings/SecuritySettings.vue'
|
||||
|
||||
import ThirdPartyAuthorization from '@/views/components/ThirdPartyAuthorization/ThirdPartyAuthorization.vue'
|
||||
|
||||
import ConfigSettings from '@/views/components/ConfigSettings/ConfigSettings.vue'
|
||||
import {computed, ref, onMounted, onUnmounted, defineAsyncComponent} from 'vue'
|
||||
import SettingsPageStatus from '../SettingsPageStatus/SettingsPageStatus.vue'
|
||||
|
||||
import lang from '../../../i18n/i18n';
|
||||
|
||||
import GroupSettings from '../GroupSettings/GroupSettings.vue';
|
||||
|
||||
import RuleSettings from '../RuleSettings/RuleSettings.vue';
|
||||
|
||||
import UserManagement from '../UserManagement/UserManagement.vue';
|
||||
|
||||
import PluginSettings from '../PluginSettings/PluginSettings.vue';
|
||||
|
||||
import {useGlobalStatusStore} from "@/stores/useGlobalStatusStore";
|
||||
|
||||
import BrandLogo from '../BrandLogo/BrandLogo.vue';
|
||||
|
||||
// 分类首次打开时才下载页面,失败时保留可读提示,不能显示空白面板。
|
||||
const lazySettings = loader => defineAsyncComponent({
|
||||
loader,
|
||||
loadingComponent: SettingsPageStatus,
|
||||
errorComponent: SettingsPageStatus,
|
||||
delay: 150,
|
||||
timeout: 30000
|
||||
})
|
||||
const SecuritySettings = lazySettings(() => import('../SecuritySettings/SecuritySettings.vue'))
|
||||
const ThirdPartyAuthorization = lazySettings(() => import('../ThirdPartyAuthorization/ThirdPartyAuthorization.vue'))
|
||||
const ConfigSettings = lazySettings(() => import('../ConfigSettings/ConfigSettings.vue'))
|
||||
const GroupSettings = lazySettings(() => import('../GroupSettings/GroupSettings.vue'))
|
||||
const RuleSettings = lazySettings(() => import('../RuleSettings/RuleSettings.vue'))
|
||||
const UserManagement = lazySettings(() => import('../UserManagement/UserManagement.vue'))
|
||||
const PluginSettings = lazySettings(() => import('../PluginSettings/PluginSettings.vue'))
|
||||
|
||||
export function usePage() {
|
||||
const globalStatus = useGlobalStatusStore();
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
.settings-page-status {
|
||||
padding: 24px;
|
||||
color: var(--pm-text-secondary);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.settings-page-status[role='alert'] {
|
||||
color: var(--el-color-danger);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div class="settings-page-status" :role="error ? 'alert' : 'status'">
|
||||
{{ error ? '设置页面加载失败,请刷新后重试。' : '正在加载设置页面…' }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineProps({ error: { type: Error, default: null } })
|
||||
</script>
|
||||
|
||||
<style scoped src="./SettingsPageStatus.css"></style>
|
||||
Reference in new issue
Block a user