-
-
-
+
@@ -19,26 +17,19 @@
@@ -84,7 +76,7 @@ export default {
.right-panel {
width: 100%;
- max-width: 260px;
+ max-width: 300px;
height: 100vh;
position: fixed;
top: 0;
@@ -131,4 +123,34 @@ export default {
line-height: 48px;
}
}
+
+.right-panel-items {
+ margin-top: 60px;
+ height: 100vh;
+ overflow: auto;
+}
+
+.project-configuration {
+ display: flex;
+ width: 100%;
+ height: 30px;
+ position: fixed;
+ justify-content: space-between;
+ align-items: center;
+ top: 15px;
+ margin-left: 10px;
+ i {
+ font-size: 20px;
+ margin-right: 20px;
+ &:hover {
+ cursor: pointer;
+ color: red;
+ }
+ }
+}
+
+:deep(.el-divider--horizontal) {
+ width: 90%;
+ margin: 20px auto 0 auto;
+}
diff --git a/src/layout/components/setting/index.vue b/src/layout/components/setting/index.vue
index bc6b2f380..70afc1c62 100644
--- a/src/layout/components/setting/index.vue
+++ b/src/layout/components/setting/index.vue
@@ -15,6 +15,14 @@
+
+
@@ -24,11 +32,14 @@ import { onMounted, reactive, toRefs } from "vue";
import { storageLocal } from "/@/utils/storage";
import { toggleClass } from "/@/utils/operate";
import { emitter } from "/@/utils/mitt";
+import { useRouter } from "vue-router";
export default {
name: "setting",
components: { panel },
setup() {
+ const router = useRouter();
+
function toggleClass(flag: boolean, clsName: string, target?: HTMLElement) {
const targetEl = target || document.body;
let { className } = targetEl;
@@ -88,12 +99,18 @@ export default {
emitter.emit("tagViewsChange", showVal);
};
+ function onReset() {
+ storageLocal.clear();
+ router.push("/login");
+ }
+
return {
...toRefs(settings),
localOperate,
greyChange,
weekChange,
- tagsChange
+ tagsChange,
+ onReset
};
}
};
diff --git a/src/plugins/i18n/config.ts b/src/plugins/i18n/config.ts
index 6796f341a..4103ebec1 100644
--- a/src/plugins/i18n/config.ts
+++ b/src/plugins/i18n/config.ts
@@ -68,6 +68,7 @@ export const buttonConfig = {
hssearch: "搜索",
hsexpendAll: "全部展开",
hscollapseAll: "全部折叠",
+ hssystemSet: "系统设置",
},
},
en: {
@@ -84,6 +85,7 @@ export const buttonConfig = {
hssearch: "Search",
hsexpendAll: "Expand All",
hscollapseAll: "Collapse All",
+ hssystemSet: "System Set",
},
},
};
diff --git a/src/style/sidebar.scss b/src/style/sidebar.scss
index 22ef3793f..94f06683d 100644
--- a/src/style/sidebar.scss
+++ b/src/style/sidebar.scss
@@ -70,6 +70,7 @@
.is-active > .el-submenu__title,
.is-active > .el-submenu__title i {
+ transition: color 0.3s;
color: $subMenuActiveText !important;
}
diff --git a/src/utils/storage/index.ts b/src/utils/storage/index.ts
index f34f9af44..12a5df502 100644
--- a/src/utils/storage/index.ts
+++ b/src/utils/storage/index.ts
@@ -1,42 +1,46 @@
interface ProxyStorage {
- getItem(key: string): any
- setItem(Key: string, value: string): void
- removeItem(key: string): void
+ getItem(key: string): any;
+ setItem(Key: string, value: string): void;
+ removeItem(key: string): void;
+ clear(): void;
}
//sessionStorage operate
class sessionStorageProxy implements ProxyStorage {
-
- protected storage: ProxyStorage
+ protected storage: ProxyStorage;
constructor(storageModel: ProxyStorage) {
- this.storage = storageModel
+ this.storage = storageModel;
}
- // 存
+ // 存
public setItem(key: string, value: any): void {
- this.storage.setItem(key, JSON.stringify(value))
+ this.storage.setItem(key, JSON.stringify(value));
}
// 取
public getItem(key: string): any {
- return JSON.parse(this.storage.getItem(key)) || null
+ return JSON.parse(this.storage.getItem(key)) || null;
}
// 删
public removeItem(key: string): void {
- this.storage.removeItem(key)
+ this.storage.removeItem(key);
}
+ // 清空
+ public clear(): void {
+ this.storage.clear();
+ }
}
//localStorage operate
class localStorageProxy extends sessionStorageProxy implements ProxyStorage {
constructor(localStorage: ProxyStorage) {
- super(localStorage)
+ super(localStorage);
}
}
-export const storageSession = new sessionStorageProxy(sessionStorage)
+export const storageSession = new sessionStorageProxy(sessionStorage);
-export const storageLocal = new localStorageProxy(localStorage)
\ No newline at end of file
+export const storageLocal = new localStorageProxy(localStorage);