fix deck navigation

This commit is contained in:
syuilo 2020-12-27 18:13:50 +09:00
parent 3fc427b699
commit 3c65e7b76e
3 changed files with 17 additions and 8 deletions

View File

@ -10,7 +10,7 @@ import { faExpandAlt, faColumns, faExternalLinkAlt, faLink, faWindowMaximize } f
import * as os from '@/os';
import copyToClipboard from '@/scripts/copy-to-clipboard';
import { router } from '@/router';
import { ui, url } from '@/config';
import { url } from '@/config';
import { popout } from '@/scripts/popout';
import { ColdDeviceStorage } from '@/store';
@ -115,13 +115,6 @@ export default defineComponent({
if (this.$store.state.defaultSideView && this.sideViewHook && this.to !== '/') {
return this.sideViewHook(this.to);
}
// TODO: a.vuedeck-sotre
//if (deckStore.state.device.deckNavWindow && (ui === 'deck') && this.to !== '/') {
// return this.window();
//}
if (ui === 'desktop') {
return this.window();
}
if (this.$router.currentRoute.value.path === this.to) {
window.scroll({ top: 0, behavior: 'smooth' });

View File

@ -50,6 +50,14 @@ export default defineComponent({
DeckColumnCore,
},
provide() {
return deckStore.state.navWindow ? {
navHook: (url) => {
os.pageWindow(url);
}
} : {};
},
data() {
return {
deckStore,

View File

@ -22,6 +22,14 @@ export default defineComponent({
XSidebar
},
provide() {
return {
navHook: (url) => {
os.pageWindow(url);
}
};
},
data() {
return {
host: host,