mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 18:45:23 +00:00
set page mode
This commit is contained in:
parent
02f5c4b976
commit
eac922c8e4
@ -33,6 +33,11 @@ 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 {
|
||||||
|
@ -33,6 +33,7 @@ interface AppState {
|
|||||||
autoRefresh: boolean;
|
autoRefresh: boolean;
|
||||||
pageTitle: string;
|
pageTitle: string;
|
||||||
version: string;
|
version: string;
|
||||||
|
isMobile: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const appStore = defineStore({
|
export const appStore = defineStore({
|
||||||
@ -51,6 +52,7 @@ export const appStore = defineStore({
|
|||||||
autoRefresh: false,
|
autoRefresh: false,
|
||||||
pageTitle: "",
|
pageTitle: "",
|
||||||
version: "",
|
version: "",
|
||||||
|
isMobile: false,
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
duration(): Duration {
|
duration(): Duration {
|
||||||
@ -121,6 +123,9 @@ export const appStore = defineStore({
|
|||||||
this.utcHour = utcHour;
|
this.utcHour = utcHour;
|
||||||
this.utc = `${utcHour}:${utcMin}`;
|
this.utc = `${utcHour}:${utcMin}`;
|
||||||
},
|
},
|
||||||
|
setIsMobile(mode: boolean) {
|
||||||
|
this.isMobile = mode;
|
||||||
|
},
|
||||||
setEventStack(funcs: (() => void)[]): void {
|
setEventStack(funcs: (() => void)[]): void {
|
||||||
this.eventStack = funcs;
|
this.eventStack = funcs;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user