mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 14:45:25 +00:00
set menu
This commit is contained in:
parent
f5ef34252f
commit
ddcfb8d890
@ -33,11 +33,6 @@ if (!appStore.utc) {
|
|||||||
ElMessage.error(res.errors);
|
ElMessage.error(res.errors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
|
|
||||||
appStore.setIsMobile(true);
|
|
||||||
} else {
|
|
||||||
appStore.setIsMobile(false);
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.app-main {
|
.app-main {
|
||||||
|
@ -109,14 +109,21 @@ import { ref } from "vue";
|
|||||||
import { useRouter, RouteRecordRaw } from "vue-router";
|
import { useRouter, RouteRecordRaw } from "vue-router";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import Icon from "@/components/Icon.vue";
|
import Icon from "@/components/Icon.vue";
|
||||||
|
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||||
|
|
||||||
|
const appStore = useAppStoreWithOut();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const name = ref<any>(String(useRouter().currentRoute.value.name));
|
const name = ref<any>(String(useRouter().currentRoute.value.name));
|
||||||
const theme = ["VirtualMachine", "Kubernetes"].includes(name.value || "")
|
const theme = ["VirtualMachine", "Kubernetes"].includes(name.value || "")
|
||||||
? ref("light")
|
? ref("light")
|
||||||
: ref("black");
|
: ref("black");
|
||||||
const routes = ref<any>(useRouter().options.routes);
|
const routes = ref<any>(useRouter().options.routes);
|
||||||
const isCollapse = ref(false);
|
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
|
||||||
|
appStore.setIsMobile(true);
|
||||||
|
} else {
|
||||||
|
appStore.setIsMobile(false);
|
||||||
|
}
|
||||||
|
const isCollapse = ref(appStore.isMobile ? true : false);
|
||||||
const controlMenu = () => {
|
const controlMenu = () => {
|
||||||
isCollapse.value = !isCollapse.value;
|
isCollapse.value = !isCollapse.value;
|
||||||
};
|
};
|
||||||
|
@ -25,6 +25,7 @@ body {
|
|||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
text-size-adjust: 100%;
|
text-size-adjust: 100%;
|
||||||
min-width: 1024px;
|
min-width: 1024px;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
|
Loading…
Reference in New Issue
Block a user