feat: 调整view包结构

This commit is contained in:
valarchie 2023-08-05 15:10:25 +08:00
parent 49a3b118e1
commit f74eef585e
6 changed files with 1 additions and 40 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<!-- v-loading指令 可以直接调用Loading动画 -->
<div class="main" v-loading="loading"> <div class="main" v-loading="loading">
<!-- v-loading指令 可以直接调用Loading动画 -->
<el-row :gutter="2"> <el-row :gutter="2">
<el-col :span="24" class="card-box"> <el-col :span="24" class="card-box">
<el-card> <el-card>

View File

@ -1,39 +0,0 @@
// 抽离可公用的工具函数等用于系统管理页面逻辑
import { computed } from "vue";
import { useDark } from "@pureadmin/utils";
export function usePublicHooks() {
const { isDark } = useDark();
const switchStyle = computed(() => {
return {
"--el-switch-on-color": "#6abe39",
"--el-switch-off-color": "#e84749"
};
});
const tagStyle = computed(() => {
return (status: number) => {
return status === 1
? {
"--el-tag-text-color": isDark.value ? "#6abe39" : "#389e0d",
"--el-tag-bg-color": isDark.value ? "#172412" : "#f6ffed",
"--el-tag-border-color": isDark.value ? "#274a17" : "#b7eb8f"
}
: {
"--el-tag-text-color": isDark.value ? "#e84749" : "#cf1322",
"--el-tag-bg-color": isDark.value ? "#2b1316" : "#fff1f0",
"--el-tag-border-color": isDark.value ? "#58191c" : "#ffa39e"
};
};
});
return {
/** 当前网页是否为`dark`模式 */
isDark,
/** 表现更鲜明的`el-switch`组件 */
switchStyle,
/** 表现更鲜明的`el-tag`组件 */
tagStyle
};
}