Merge pull request #49 from xiaoxian521/feat/layout

style: [sidebar.scss] delete overflow-x: auto
This commit is contained in:
啝裳 2021-10-01 21:15:49 +08:00 committed by GitHub
commit 52dba8a79c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View File

@ -129,14 +129,12 @@ export default defineComponent({
function translationCh() {
instance.locale = { locale: "zh" };
locale.value = "zh";
window.location.reload();
}
// English
function translationEn() {
instance.locale = { locale: "en" };
locale.value = "en";
window.location.reload();
}
return {

View File

@ -78,6 +78,8 @@ import {
defineComponent,
unref,
watch,
nextTick,
onMounted,
getCurrentInstance
} from "vue";
import { useI18n } from "vue-i18n";
@ -137,6 +139,7 @@ export default defineComponent({
const instance =
getCurrentInstance().appContext.config.globalProperties.$storage;
const menuRef = templateRef<ElRef | null>("menu", null);
const routeStore = usePermissionStoreHook();
const route = useRoute();
const router = useRouter();
@ -198,19 +201,30 @@ export default defineComponent({
router.push("/welcome");
}
function handleResize() {
menuRef.value.handleResize();
}
//
function translationCh() {
instance.locale = { locale: "zh" };
locale.value = "zh";
handleResize();
}
// English
function translationEn() {
instance.locale = { locale: "en" };
locale.value = "en";
menuRef.value.handleResize();
handleResize();
}
onMounted(() => {
nextTick(() => {
handleResize();
});
});
return {
locale,
usename,

View File

@ -161,8 +161,6 @@
height: 100%;
min-width: 0;
flex: 1;
// todo::
overflow-x: auto;
align-items: center;
}