refactor: ♻️ 移除 log 和完善 mock 接口
This commit is contained in:
@@ -79,7 +79,6 @@ const tagsViewStore = useTagsViewStore();
|
||||
const appStore = useAppStore();
|
||||
|
||||
const { visitedViews } = storeToRefs(tagsViewStore);
|
||||
console.log("visitedViews", visitedViews);
|
||||
const settingsStore = useSettingsStore();
|
||||
const layout = computed(() => settingsStore.layout);
|
||||
|
||||
@@ -142,14 +141,11 @@ function filterAffixTags(routes: RouteRecordRaw[], basePath = "/") {
|
||||
let tags: TagView[] = [];
|
||||
routes.forEach(processRoute);
|
||||
|
||||
console.log("filterAffixTags", tags);
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
function initTags() {
|
||||
const tags: TagView[] = filterAffixTags(permissionStore.routes);
|
||||
console.log("initTags", tags);
|
||||
affixTags.value = tags;
|
||||
for (const tag of tags) {
|
||||
// Must have tag name
|
||||
@@ -160,7 +156,6 @@ function initTags() {
|
||||
}
|
||||
|
||||
function addTags() {
|
||||
console.log("addTags", visitedViews);
|
||||
if (route.meta.title) {
|
||||
tagsViewStore.addView({
|
||||
name: route.name as string,
|
||||
@@ -174,7 +169,6 @@ function addTags() {
|
||||
}
|
||||
|
||||
function moveToCurrentTag() {
|
||||
console.log("moveToCurrentTag", visitedViews);
|
||||
// 使用 nextTick() 的目的是确保在更新 tagsView 组件之前,scrollPaneRef 对象已经滚动到了正确的位置。
|
||||
nextTick(() => {
|
||||
for (const tag of visitedViews.value) {
|
||||
|
||||
Reference in New Issue
Block a user