From 3293e2fb564fbc3cff4a9268b6595ff7f99b37b2 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Fri, 23 May 2025 10:19:47 +0800
Subject: [PATCH] 账号密码支持自定义更新周期
---
ruoyi-ui/src/layout/components/Settings/index.vue | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/ruoyi-ui/src/layout/components/Settings/index.vue b/ruoyi-ui/src/layout/components/Settings/index.vue
index 39043a0..126aa4e 100644
--- a/ruoyi-ui/src/layout/components/Settings/index.vue
+++ b/ruoyi-ui/src/layout/components/Settings/index.vue
@@ -1,5 +1,5 @@
<template>
- <el-drawer size="280px" :visible="visible" :with-header="false" :append-to-body="true" :show-close="false">
+ <el-drawer size="280px" :visible="showSettings" :with-header="false" :append-to-body="true" :before-close="closeSetting">
<div class="drawer-container">
<div>
<div class="setting-drawer-content">
@@ -78,18 +78,15 @@
export default {
components: { ThemePicker },
+ expose: ['openSetting'],
data() {
return {
theme: this.$store.state.settings.theme,
- sideTheme: this.$store.state.settings.sideTheme
+ sideTheme: this.$store.state.settings.sideTheme,
+ showSettings: false
}
},
computed: {
- visible: {
- get() {
- return this.$store.state.settings.showSettings
- }
- },
fixedHeader: {
get() {
return this.$store.state.settings.fixedHeader
@@ -147,6 +144,7 @@
key: 'dynamicTitle',
value: val
})
+ this.$store.dispatch('settings/setTitle', this.$store.state.settings.title)
}
},
},
@@ -165,6 +163,12 @@
})
this.sideTheme = val
},
+ openSetting() {
+ this.showSettings = true
+ },
+ closeSetting(){
+ this.showSettings = false
+ },
saveSetting() {
this.$modal.loading("正在保存到本地,请稍候...")
this.$cache.local.set(
--
Gitblit v1.9.3