mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-12 08:34:05 +08:00
添加空页面
This commit is contained in:
parent
0ca153ac10
commit
431906a1bb
16
src/App.vue
16
src/App.vue
@ -32,17 +32,23 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
// 默认主题色
|
// 默认主题色
|
||||||
this.setCssVar("primary", this.$profile.primaryColor);
|
this.setCssVar("primary", this.$profile.primaryColor);
|
||||||
|
// 进入插件
|
||||||
utools.onPluginEnter((enter) => {
|
utools.onPluginEnter((enter) => {
|
||||||
// 暗黑模式
|
// 暗黑模式
|
||||||
this.$q.dark.set(utools.isDarkColors());
|
this.$q.dark.set(utools.isDarkColors());
|
||||||
// 路由跳转
|
// 路由跳转
|
||||||
quickcommand.enterData = enter;
|
quickcommand.enterData = enter;
|
||||||
this.$router.push({
|
this.$router.push(enter.code);
|
||||||
path: enter.code,
|
|
||||||
query: {
|
|
||||||
timestamp: new Date().getTime(),
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
// 退出插件
|
||||||
|
utools.onPluginOut(() => {
|
||||||
|
// 切到空路由
|
||||||
|
this.$router.push("loading");
|
||||||
|
// 保存偏好
|
||||||
|
this.$utools.putDB(
|
||||||
|
_.cloneDeep(this.$profile),
|
||||||
|
this.$utools.DBPRE.CFG + "preferences"
|
||||||
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
5
src/pages/LoadingPage.vue
Normal file
5
src/pages/LoadingPage.vue
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!-- loading... -->
|
||||||
|
</div>
|
||||||
|
</template>
|
@ -1,29 +1,39 @@
|
|||||||
const routes = [
|
const routes = [{
|
||||||
{
|
|
||||||
path: '/configuration',
|
path: '/configuration',
|
||||||
component: () => import('pages/ConfigurationPage.vue')
|
component: () =>
|
||||||
|
import ('pages/ConfigurationPage.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/code',
|
path: '/code',
|
||||||
component: () => import('pages/RunCodePage.vue')
|
component: () =>
|
||||||
|
import ('pages/RunCodePage.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/newcommand',
|
path: '/newcommand',
|
||||||
component: () => import('pages/NewCommand.vue')
|
component: () =>
|
||||||
|
import ('pages/NewCommand.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/:type(default|files|key|regex|window|professional)_:uid(\\w+)',
|
path: '/:type(default|files|key|regex|window|professional)_:uid(\\w+)',
|
||||||
component: () => import('pages/CommandPage.vue')
|
component: () =>
|
||||||
|
import ('pages/CommandPage.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/panel_:tags(\\w+)',
|
path: '/panel_:tags(\\w+)',
|
||||||
component: () => import('pages/ConfigurationPage.vue')
|
component: () =>
|
||||||
|
import ('pages/ConfigurationPage.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/needupdate',
|
path: '/needupdate',
|
||||||
name: 'needupdate',
|
name: 'needupdate',
|
||||||
props: true,
|
props: true,
|
||||||
component: () => import('pages/updateWarningPage.vue')
|
component: () =>
|
||||||
|
import ('pages/updateWarningPage.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/loading',
|
||||||
|
component: () =>
|
||||||
|
import ('pages/LoadingPage.vue')
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user