| | |
| | | 'sidebar', |
| | | 'avatar', |
| | | 'device' |
| | | ]), |
| | | setting: { |
| | | ]), setting: { |
| | | get() { |
| | | return this.$store.state.settings.showSettings |
| | | return this.$store.state.settings.showSettings; |
| | | }, |
| | | set(val) { |
| | | this.$store.dispatch('settings/changeSetting', { |
| | | key: 'showSettings', |
| | | this.$store.dispatch("settings/changeSetting", { |
| | | key: "showSettings", |
| | | value: val |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | topNav: { |
| | | get() { |
| | | return this.$store.state.settings.topNav |
| | | return this.$store.state.settings.topNav; |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | toggleSideBar() { |
| | | this.$store.dispatch('app/toggleSideBar') |
| | | this.$store.dispatch("app/toggleSideBar"); |
| | | }, |
| | | async logout() { |
| | | this.$confirm('确定注销并退出系统吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$store.dispatch('LogOut').then(() => { |
| | | location.href = '/index'; |
| | | this.$confirm("确定注销并退出系统吗?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | location.href = window.location.origin + '/sso/login' |
| | | }); |
| | | }) |
| | | }).catch(() => {}); |
| | | .catch(() => {}); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | overflow: hidden; |
| | | position: relative; |
| | | background: #fff; |
| | | box-shadow: 0 1px 4px rgba(0,21,41,.08); |
| | | box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); |
| | | |
| | | .hamburger-container { |
| | | line-height: 46px; |
| | | height: 100%; |
| | | float: left; |
| | | cursor: pointer; |
| | | transition: background .3s; |
| | | -webkit-tap-highlight-color:transparent; |
| | | transition: background 0.3s; |
| | | -webkit-tap-highlight-color: transparent; |
| | | |
| | | &:hover { |
| | | background: rgba(0, 0, 0, .025) |
| | | background: rgba(0, 0, 0, 0.025); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | &.hover-effect { |
| | | cursor: pointer; |
| | | transition: background .3s; |
| | | transition: background 0.3s; |
| | | |
| | | &:hover { |
| | | background: rgba(0, 0, 0, .025) |
| | | background: rgba(0, 0, 0, 0.025); |
| | | } |
| | | } |
| | | } |