|
|
|
|
@ -1,12 +1,21 @@
@@ -1,12 +1,21 @@
|
|
|
|
|
<template> |
|
|
|
|
<el-tooltip effect="dark" :content="t('head.size')" placement="left"> |
|
|
|
|
<el-tooltip |
|
|
|
|
effect="dark" |
|
|
|
|
:content="t('head.size')" |
|
|
|
|
placement="bottom" |
|
|
|
|
:show-after="0" |
|
|
|
|
:hide-after="10" |
|
|
|
|
transition="" |
|
|
|
|
:popper-options="{ modifiers: [{ name: 'eventListeners', enabled: false }] }" |
|
|
|
|
popper-class="non-interactive-tooltip" |
|
|
|
|
> |
|
|
|
|
<el-dropdown class="head-icon" :size="state.size.size" trigger="click" :teleported="false"> |
|
|
|
|
<el-button icon="Switch" :size="state.size.size" circle></el-button> |
|
|
|
|
<template #dropdown> |
|
|
|
|
<el-dropdown-menu> |
|
|
|
|
<el-dropdown-item @click="changeSize('small')">{{ t('head.small') }}</el-dropdown-item> |
|
|
|
|
<el-dropdown-item @click="changeSize('normal')">{{ t('head.normal') }}</el-dropdown-item> |
|
|
|
|
<el-dropdown-item @click="changeSize('large')">{{ t('head.large') }}</el-dropdown-item> |
|
|
|
|
<el-dropdown-item @click="changeSize('small')">{{ t("head.small") }}</el-dropdown-item> |
|
|
|
|
<el-dropdown-item @click="changeSize('normal')">{{ t("head.normal") }}</el-dropdown-item> |
|
|
|
|
<el-dropdown-item @click="changeSize('large')">{{ t("head.large") }}</el-dropdown-item> |
|
|
|
|
</el-dropdown-menu> |
|
|
|
|
</template> |
|
|
|
|
</el-dropdown> |
|
|
|
|
@ -22,11 +31,15 @@ const { t } = useI18n();
@@ -22,11 +31,15 @@ const { t } = useI18n();
|
|
|
|
|
|
|
|
|
|
const { state, commit, dispatch } = useStore(); |
|
|
|
|
|
|
|
|
|
const changeSize = type => { |
|
|
|
|
commit('updateState', ['size', Size[type]]) |
|
|
|
|
commit('initSize', [window.innerHeight, window.innerWidth]); |
|
|
|
|
} |
|
|
|
|
const changeSize = (type) => { |
|
|
|
|
commit("updateState", ["size", Size[type]]); |
|
|
|
|
commit("initSize", [window.innerHeight, window.innerWidth]); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
onMounted(() => {}); |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped></style> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.non-interactive-tooltip { |
|
|
|
|
pointer-events: none !important; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
|