fix(TagsView.vue): 首次加载控制台页面未添加至cachedViews问题修复
Former-commit-id: dc8cb2cc1cb43a5083bafe1c21ab5afce21da5db
This commit is contained in:
@@ -80,7 +80,7 @@ import useStore from '@/store';
|
|||||||
|
|
||||||
const { tagsView, permission } = useStore();
|
const { tagsView, permission } = useStore();
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance; // 获取当前组件实例
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
@@ -94,10 +94,17 @@ const scrollPaneRef = ref();
|
|||||||
const left = ref(0);
|
const left = ref(0);
|
||||||
const top = ref(0);
|
const top = ref(0);
|
||||||
|
|
||||||
watch(route, () => {
|
watch(
|
||||||
|
route,
|
||||||
|
() => {
|
||||||
addTags();
|
addTags();
|
||||||
moveToCurrentTag();
|
moveToCurrentTag();
|
||||||
});
|
},
|
||||||
|
{
|
||||||
|
//初始化立即执行
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
watch(visible, value => {
|
watch(visible, value => {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user