mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
加入路由切换动画
This commit is contained in:
parent
427c4ac893
commit
804f20bc19
18
src/App.vue
18
src/App.vue
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<router-view v-slot="{ Component }">
|
<router-view v-slot="{ Component }">
|
||||||
<component ref="view" :is="Component" />
|
<transition name="fade">
|
||||||
|
<component ref="view" :is="Component" />
|
||||||
|
</transition>
|
||||||
</router-view>
|
</router-view>
|
||||||
<QuickCommand />
|
<QuickCommand />
|
||||||
</template>
|
</template>
|
||||||
@ -96,13 +98,13 @@ export default defineComponent({
|
|||||||
this.$router.push(enter.code);
|
this.$router.push(enter.code);
|
||||||
},
|
},
|
||||||
outPlugin() {
|
outPlugin() {
|
||||||
|
this.$refs.view.$refs?.commandEditor?.saveCodeHistory();
|
||||||
|
this.$router.push("/");
|
||||||
this.utools.putDB(_.cloneDeep(this.profile), "cfg_profile");
|
this.utools.putDB(_.cloneDeep(this.profile), "cfg_profile");
|
||||||
this.utools.putDB(
|
this.utools.putDB(
|
||||||
_.cloneDeep(this.nativeProfile),
|
_.cloneDeep(this.nativeProfile),
|
||||||
"cfg_" + utools.getNativeId() + "_profile"
|
"cfg_" + utools.getNativeId() + "_profile"
|
||||||
);
|
);
|
||||||
this.$refs.view.$refs?.commandEditor?.saveCodeHistory();
|
|
||||||
this.$router.push("/");
|
|
||||||
},
|
},
|
||||||
runCronTask(featureCode, cronExp) {
|
runCronTask(featureCode, cronExp) {
|
||||||
this.cronJobs[featureCode] = Cron(cronExp, () => {
|
this.cronJobs[featureCode] = Cron(cronExp, () => {
|
||||||
@ -212,4 +214,14 @@ export default defineComponent({
|
|||||||
::-webkit-scrollbar-track-piece {
|
::-webkit-scrollbar-track-piece {
|
||||||
background: rgba(194, 194, 194, 0.1);
|
background: rgba(194, 194, 194, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fade-enter-from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.fade-enter-to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.fade-enter-active {
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user