|
@@ -22,23 +22,21 @@ import headerBar from "@/components/headerBar/header-bar";
|
|
|
import useAppStore from "@/store/modules/app";
|
|
|
import useSettingsStore from "@/store/modules/settings";
|
|
|
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
const settingsStore = useSettingsStore();
|
|
|
const theme = computed(() => settingsStore.theme);
|
|
|
const sidebar = computed(() => useAppStore().sidebar);
|
|
|
const device = computed(() => useAppStore().device);
|
|
|
const needTagsView = computed(() => settingsStore.tagsView);
|
|
|
const fixedHeader = computed(() => settingsStore.fixedHeader);
|
|
|
-
|
|
|
const classObj = computed(() => ({
|
|
|
hideSidebar: !sidebar.value.opened,
|
|
|
openSidebar: sidebar.value.opened,
|
|
|
withoutAnimation: sidebar.value.withoutAnimation,
|
|
|
mobile: device.value === "mobile",
|
|
|
}));
|
|
|
-
|
|
|
const { width, height } = useWindowSize();
|
|
|
const WIDTH = 992; // refer to Bootstrap's responsive design
|
|
|
-
|
|
|
watchEffect(() => {
|
|
|
if (device.value === "mobile" && sidebar.value.opened) {
|
|
|
useAppStore().closeSideBar({ withoutAnimation: false });
|
|
@@ -50,15 +48,20 @@ watchEffect(() => {
|
|
|
useAppStore().toggleDevice("desktop");
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
function handleClickOutside() {
|
|
|
useAppStore().closeSideBar({ withoutAnimation: false });
|
|
|
}
|
|
|
-
|
|
|
const settingRef = ref(null);
|
|
|
function setLayout() {
|
|
|
settingRef.value.openSetting();
|
|
|
}
|
|
|
+const getAllDict = () => {
|
|
|
+ proxy.useUserStore()
|
|
|
+ .allDictMap()
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+};
|
|
|
+getAllDict();
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|