Browse Source
* modify the sidebar menu control mode * modify side menu * store last path * fix security auth error * fix resource e2e * fix resource manage e2e bug3.0.0/version-upgrade
Devosend
3 years ago
committed by
GitHub
19 changed files with 136 additions and 126 deletions
@ -1,51 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { defineStore } from 'pinia' |
||||
import MenuState from './types' |
||||
|
||||
export const useMenuStore = defineStore({ |
||||
id: 'menu', |
||||
state: (): MenuState => ({ |
||||
menuKey: 'home', |
||||
isShowSide: false, |
||||
projectCode: '' |
||||
}), |
||||
persist: true, |
||||
getters: { |
||||
getMenuKey(): string { |
||||
return this.menuKey |
||||
}, |
||||
getShowSideStatus(): boolean { |
||||
return this.isShowSide || false |
||||
}, |
||||
getProjectCode(): string { |
||||
return this.projectCode || '' |
||||
} |
||||
}, |
||||
actions: { |
||||
setMenuKey(menuKey: string): void { |
||||
this.menuKey = menuKey |
||||
}, |
||||
setShowSideStatus(isShowSide: boolean): void { |
||||
this.isShowSide = isShowSide |
||||
}, |
||||
setProjectCode(projectCode: string): void { |
||||
this.projectCode = projectCode |
||||
} |
||||
} |
||||
}) |
Loading…
Reference in new issue