Merge branch 'master' of gitee.com:wang_fan_w/dc-admin
This commit is contained in:
commit
9d8fe97c11
@ -20,6 +20,9 @@ export default {
|
||||
["third-menu-7"]: "third-menu-7",
|
||||
["third-menu-8"]: "third-menu-8",
|
||||
["third-menu-9"]: "third-menu-9",
|
||||
["personal-center"]: "personal center",
|
||||
["userinfo"]: "userinfo",
|
||||
["user-settings"]: "user settings",
|
||||
["about-project"]: "about project",
|
||||
["not-power"]: "No permission",
|
||||
["not-found"]: "Page not found",
|
||||
@ -44,6 +47,7 @@ export default {
|
||||
["logout"]: "logout",
|
||||
["notice"]: "Notice",
|
||||
["message"]: "Message",
|
||||
["backlog"]: "Backlog"
|
||||
["backlog"]: "Backlog",
|
||||
["switch-language-to-preview"]: "Please switch the language to preview the internationalization effect"
|
||||
}
|
||||
};
|
||||
|
||||
@ -20,6 +20,9 @@ export default {
|
||||
["third-menu-7"]: "三级菜单-7",
|
||||
["third-menu-8"]: "三级菜单-8",
|
||||
["third-menu-9"]: "三级菜单-9",
|
||||
["personal-center"]: "用户中心",
|
||||
["userinfo"]: "用户信息",
|
||||
["user-settings"]: "用户设置",
|
||||
["about-project"]: "关于项目",
|
||||
["not-power"]: "没有权限",
|
||||
["not-found"]: "未找到页面",
|
||||
@ -44,6 +47,7 @@ export default {
|
||||
["logout"]: "退出登录",
|
||||
["notice"]: "通知",
|
||||
["message"]: "消息",
|
||||
["backlog"]: "待办"
|
||||
["backlog"]: "待办",
|
||||
["switch-language-to-preview"]: "请切换语言来预览国际化效果"
|
||||
}
|
||||
};
|
||||
|
||||
@ -136,6 +136,7 @@ const handleCancel = () => {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: $margin;
|
||||
column-gap: $margin;
|
||||
}
|
||||
|
||||
.layout-defaults,
|
||||
@ -143,7 +144,6 @@ const handleCancel = () => {
|
||||
.layout-mixing {
|
||||
width: 70px;
|
||||
height: 50px;
|
||||
margin-right: $margin;
|
||||
background: $color-fill-1;
|
||||
border-radius: $radius-box;
|
||||
overflow: hidden;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div :class="layoutType == 'layoutHead' ? 'logo_head no-border' : 'logo_head'">
|
||||
<img :src="Logo" class="logo" />
|
||||
<span :class="isDark ? 'logo_title dark' : 'logo_title'" v-if="!collapsed">dc admin</span>
|
||||
<span :class="isDark ? 'logo_title dark' : 'logo_title'" v-if="isTitle">dc admin</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -12,6 +12,7 @@ import { useThemeConfig } from "@/store/modules/theme-config";
|
||||
const themeStore = useThemeConfig();
|
||||
const { collapsed, asideDark, layoutType } = storeToRefs(themeStore);
|
||||
|
||||
// 黑暗模式的文字渲染
|
||||
const isDark = computed(() => {
|
||||
if (asideDark.value && layoutType.value != "layoutHead") {
|
||||
return true;
|
||||
@ -19,6 +20,15 @@ const isDark = computed(() => {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// 是否展示标题
|
||||
const isTitle = computed(() => {
|
||||
if (!collapsed.value || layoutType.value == "layoutHead") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
<template>
|
||||
<a-menu
|
||||
:breakpoint="layoutType === 'layoutDefaults' ? undefined : 'xl'"
|
||||
:mode="'vertical'"
|
||||
:theme="asideDark ? 'dark' : 'light'"
|
||||
:collapsed="collapsed"
|
||||
:auto-scroll-into-view="true"
|
||||
:auto-open-selected="true"
|
||||
:accordion="isAccordion"
|
||||
:selected-keys="[currentRoute.name]"
|
||||
@menu-item-click="onMenuItem"
|
||||
>
|
||||
<MenuItem :route-tree="routeTree" />
|
||||
</a-menu>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import MenuItem from "@/layout/components/Menu/menu-item.vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useThemeConfig } from "@/store/modules/theme-config";
|
||||
import { useRoutesListStore } from "@/store/modules/route-list";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRoutingMethod } from "@/hooks/useRoutingMethod";
|
||||
const router = useRouter();
|
||||
const routerStore = useRoutesListStore();
|
||||
const { routeTree, currentRoute } = storeToRefs(routerStore);
|
||||
const themeStore = useThemeConfig();
|
||||
const { collapsed, isAccordion, layoutType, asideDark } = storeToRefs(themeStore);
|
||||
|
||||
/**
|
||||
* @description 菜单点击事件
|
||||
* @param {String} key
|
||||
*/
|
||||
const onMenuItem = (key: string) => {
|
||||
const { findLinearArray } = useRoutingMethod();
|
||||
const find = findLinearArray(key);
|
||||
// 路由存在则存入并跳转,不存在则跳404
|
||||
if (find) {
|
||||
router.push(find.path);
|
||||
} else {
|
||||
router.push("/404");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@ -239,6 +239,54 @@ export const dynamicRoutes: RouteRecordRaw[] = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/personal-center",
|
||||
name: "personal-center",
|
||||
meta: {
|
||||
title: "personal-center",
|
||||
link: "",
|
||||
hide: false,
|
||||
keepAlive: true,
|
||||
affix: false,
|
||||
iframe: false,
|
||||
roles: ["admin"],
|
||||
svgIcon: "user"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/personal-center/userinfo",
|
||||
name: "userinfo",
|
||||
component: () => import("@/views/personal-center/userinfo/userinfo.vue"),
|
||||
meta: {
|
||||
title: "userinfo",
|
||||
link: "",
|
||||
hide: false,
|
||||
keepAlive: true,
|
||||
affix: false,
|
||||
iframe: false,
|
||||
roles: ["admin"],
|
||||
icon: "icon-menu"
|
||||
},
|
||||
children: []
|
||||
},
|
||||
{
|
||||
path: "/personal-center/user-settings",
|
||||
name: "user-settings",
|
||||
component: () => import("@/views/personal-center/user-settings/user-settings.vue"),
|
||||
meta: {
|
||||
title: "user-settings",
|
||||
link: "",
|
||||
hide: false,
|
||||
keepAlive: true,
|
||||
affix: false,
|
||||
iframe: false,
|
||||
roles: ["admin"],
|
||||
icon: "icon-menu"
|
||||
},
|
||||
children: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/internationalization",
|
||||
name: "internationalization",
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 卡片过渡动画
|
||||
// 根据遍历的卡片数量应用动画,卡片数量支持20个
|
||||
@for $i from 0 through 20 {
|
||||
.animated-fade-up-#{$i} {
|
||||
opacity: 0; // 初始透明度
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
@import "./index.scss";
|
||||
|
||||
// 处理首页数据图大小
|
||||
// 页面宽度 大于 0px 小于 992px;
|
||||
@media screen and (min-width: $xs) and (max-width: $lg) {
|
||||
.sell-histogram {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>关于项目</div>
|
||||
<div class="dc-page">关于项目</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
@ -1,7 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-date-picker style="width: 200px" />
|
||||
<a-pagination :total="50" show-total show-jumper show-page-size />
|
||||
<div class="dc-page">
|
||||
<p>{{ $t(`language.switch-language-to-preview`) }}</p>
|
||||
<br />
|
||||
<div>
|
||||
<a-date-picker style="width: 200px" />
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<a-time-picker type="time-range" style="width: 252px" />
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<a-range-picker
|
||||
style="width: 360px"
|
||||
show-time
|
||||
:time-picker-props="{ defaultValue: ['00:00:00', '09:09:06'] }"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
/>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<a-pagination :total="50" show-total show-jumper show-page-size />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>二级-菜单 页面缓存</div>
|
||||
<a-input :style="{ width: '320px' }" placeholder="请输入内容测试页面缓存" allow-clear v-model="form" />
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>三级-菜单-01 页面缓存</div>
|
||||
<a-input :style="{ width: '320px' }" placeholder="请输入内容测试页面缓存" allow-clear v-model="form" />
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>三级-菜单-02 页面缓存</div>
|
||||
<a-input :style="{ width: '320px' }" placeholder="请输入内容测试页面缓存" allow-clear v-model="form" />
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>三级-菜单-03</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>三级-菜单-04</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>三级-菜单-05</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>三级-菜单-06</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>三级-菜单-07</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>三级-菜单-08</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="dc-page">
|
||||
<div>三级-菜单-09</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div class="dc-page">用户设置</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
7
src/views/personal-center/userinfo/userinfo.vue
Normal file
7
src/views/personal-center/userinfo/userinfo.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div class="dc-page">个人中心</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Loading…
x
Reference in New Issue
Block a user