mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-03-17 03:02:02 +08:00
# Conflicts: # pom.xml # ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java # ruoyi-framework/src/main/java/com/ruoyi/framework/config/FilterConfig.java # ruoyi-generator/pom.xml # ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java # ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java # ruoyi-generator/src/main/resources/vm/js/api.js.vm # ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm # ruoyi-generator/src/main/resources/vm/vue/index.vue.vm # ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm # ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java # ruoyi-ui/package.json # ruoyi-ui/src/api/monitor/server.js # ruoyi-ui/src/components/RuoYi/Doc/index.vue # ruoyi-ui/src/components/RuoYi/Git/index.vue # ruoyi-ui/src/components/SizeSelect/index.vue # ruoyi-ui/src/layout/components/Sidebar/Logo.vue # ruoyi-ui/src/layout/components/TagsView/index.vue # ruoyi-ui/src/layout/index.vue # ruoyi-ui/src/main.js # ruoyi-ui/src/plugins/download.js # ruoyi-ui/src/router/index.js # ruoyi-ui/src/store/modules/permission.js # ruoyi-ui/src/store/modules/settings.js # ruoyi-ui/src/store/modules/tagsView.js # ruoyi-ui/src/store/modules/user.js # ruoyi-ui/src/views/login.vue # ruoyi-ui/src/views/monitor/job/log.vue # ruoyi-ui/src/views/system/dict/data.vue # ruoyi-ui/src/views/system/role/index.vue # ruoyi-ui/src/views/system/user/authRole.vue # ruoyi-ui/src/views/system/user/index.vue # ruoyi-ui/src/views/system/user/profile/resetPwd.vue # ruoyi-ui/src/views/system/user/profile/userAvatar.vue # ruoyi-ui/src/views/system/user/profile/userInfo.vue
57 lines
1.3 KiB
Vue
57 lines
1.3 KiB
Vue
<template>
|
|
<el-dropdown trigger="click" @command="handleSetSize">
|
|
<div>
|
|
<svg-icon class-name="size-icon" icon-class="size" />
|
|
</div>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">
|
|
{{ item.label }}
|
|
</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
sizeOptions: [
|
|
{ label: 'Default', value: 'default' },
|
|
{ label: 'Medium', value: 'medium' },
|
|
{ label: 'Small', value: 'small' },
|
|
{ label: 'Mini', value: 'mini' }
|
|
]
|
|
}
|
|
},
|
|
computed: {
|
|
size() {
|
|
return this.$store.getters.size
|
|
}
|
|
},
|
|
methods: {
|
|
handleSetSize(size) {
|
|
this.$ELEMENT.size = size
|
|
this.$store.dispatch('app/setSize', size)
|
|
this.refreshView()
|
|
this.$message({
|
|
message: 'Switch Size Success',
|
|
type: 'success'
|
|
})
|
|
},
|
|
refreshView() {
|
|
// In order to make the cached page re-rendered
|
|
this.$store.dispatch('tagsView/delAllCachedViews', this.$route)
|
|
|
|
const { fullPath } = this.$route
|
|
|
|
this.$nextTick(() => {
|
|
this.$router.replace({
|
|
path: '/redirect' + fullPath
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
}
|
|
</script>
|