mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-04-25 07:57:18 +08:00
feat: 调整view包结构
This commit is contained in:
parent
49a3b118e1
commit
f74eef585e
@ -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>
|
@ -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
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user