mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-13 04:33:42 +08:00
theme change is ready
This commit is contained in:
@@ -296,6 +296,12 @@ const changePlatform = () => {
|
||||
.el-select {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content righ
|
||||
}
|
||||
}
|
||||
|
||||
.el-form {
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
import {onMounted, ref} from "vue";
|
||||
import {httpGet, httpPost} from "@/utils/http";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {dateFormat, processContent, removeArrayItem} from "@/utils/libs";
|
||||
import {dateFormat, processContent} from "@/utils/libs";
|
||||
import {Search} from "@element-plus/icons-vue";
|
||||
import 'highlight.js/styles/a11y-dark.css'
|
||||
import hl from "highlight.js";
|
||||
@@ -365,6 +365,12 @@ const showMessages = (row) => {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content right
|
||||
}
|
||||
|
||||
.chat-box {
|
||||
overflow-y: auto;
|
||||
overflow-x hidden
|
||||
|
||||
@@ -365,5 +365,11 @@ const remove = function (row) {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content right
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -328,5 +328,11 @@ const generateToken = () => {
|
||||
text-align center
|
||||
}
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content right
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="admin-home" v-if="isLogin">
|
||||
<admin-sidebar/>
|
||||
<admin-sidebar v-model:theme="theme"/>
|
||||
<div class="content-box" :class="{ 'content-collapse': sidebar.collapse }">
|
||||
<admin-header/>
|
||||
<admin-tags/>
|
||||
<div class="content dark">
|
||||
<admin-header v-model:theme="theme" @changeTheme="changeTheme"/>
|
||||
<admin-tags v-model:theme="theme"/>
|
||||
<div :class="'content '+theme" :style="{height:contentHeight+'px'}">
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition name="move" mode="out-in">
|
||||
<keep-alive :include="tags.nameList">
|
||||
@@ -25,10 +25,13 @@ import AdminTags from "@/components/admin/AdminTags.vue";
|
||||
import {useRouter} from "vue-router";
|
||||
import {checkAdminSession} from "@/action/session";
|
||||
import {ref} from "vue";
|
||||
import {getAdminTheme, setAdminTheme} from "@/store/system";
|
||||
|
||||
const sidebar = useSidebarStore();
|
||||
const tags = useTagsStore();
|
||||
const isLogin = ref(false)
|
||||
const contentHeight = window.innerHeight - 80
|
||||
const theme = ref(getAdminTheme())
|
||||
|
||||
// 获取会话信息
|
||||
const router = useRouter();
|
||||
@@ -37,6 +40,16 @@ checkAdminSession().then(() => {
|
||||
}).catch(() => {
|
||||
router.replace('/admin/login')
|
||||
})
|
||||
|
||||
const changeTheme = (value) => {
|
||||
if (value) {
|
||||
theme.value = 'dark'
|
||||
} else {
|
||||
theme.value = 'light'
|
||||
}
|
||||
setAdminTheme(theme.value)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="stylus">
|
||||
|
||||
@@ -71,5 +71,11 @@ const fetchList = function (_page, _pageSize) {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content right
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -74,7 +74,6 @@ import {httpGet, httpPost} from "@/utils/http";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {dateFormat, removeArrayItem} from "@/utils/libs";
|
||||
import {Plus} from "@element-plus/icons-vue";
|
||||
import {Sortable} from "sortablejs";
|
||||
|
||||
// 变量定义
|
||||
const items = ref([])
|
||||
@@ -178,5 +177,11 @@ const remove = function (row) {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content right
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -150,5 +150,11 @@ const remove = function (row) {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content right
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
<script setup>
|
||||
import {onMounted, ref} from "vue";
|
||||
import {httpGet, httpPost} from "@/utils/http";
|
||||
import {httpPost} from "@/utils/http";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {dateFormat} from "@/utils/libs";
|
||||
import {Search} from "@element-plus/icons-vue";
|
||||
@@ -156,5 +156,12 @@ const fetchData = () => {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
width 100%
|
||||
justify-content right
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -230,5 +230,11 @@ const remove = function (row) {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content right
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -105,5 +105,11 @@ const remove = function (row) {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content right
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -369,5 +369,11 @@ const uploadImg = (file) => {
|
||||
text-align center
|
||||
}
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
justify-content right
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -459,10 +459,9 @@ const onUploadImg = (files, callback) => {
|
||||
|
||||
.el-tabs {
|
||||
width 100%
|
||||
background-color #ffffff
|
||||
background-color var(--el-bg-color)
|
||||
padding 10px 20px 40px 20px
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px
|
||||
border: 1px solid var(--el-border-color);
|
||||
|
||||
.container {
|
||||
.el-form {
|
||||
|
||||
@@ -351,6 +351,11 @@ const doResetPass = () => {
|
||||
}
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding 20px 0
|
||||
display flex
|
||||
}
|
||||
|
||||
.el-select {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user