feat: 编辑态优化 (#444)
This commit is contained in:
parent
6c9ac33ea5
commit
c93515d2bd
@ -16,7 +16,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { watch, ref } from 'vue'
|
import { watch, ref } from 'vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
import { useEditStore } from '@/management/stores/edit'
|
||||||
|
const editStore = useEditStore()
|
||||||
|
const { setCurrentEditOne } = editStore
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
text: '内容设置',
|
text: '内容设置',
|
||||||
@ -38,6 +40,7 @@ watch(
|
|||||||
activeRouter,
|
activeRouter,
|
||||||
(val: any) => {
|
(val: any) => {
|
||||||
// 避免编辑页刷新丢失query
|
// 避免编辑页刷新丢失query
|
||||||
|
setCurrentEditOne(null)
|
||||||
const query = route.query
|
const query = route.query
|
||||||
router.push({ name: val, query })
|
router.push({ name: val, query })
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user