Skip to content

Commit 5718c78

Browse files
committed
1.tagsView.ts删除页面缓存优化 2.新增Search组件插槽传递
1 parent 401794f commit 5718c78

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/components/Search/src/Search.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { FormSchema } from '@/types/form'
99
1010
const { t } = useI18n()
1111
12+
const slots = useSlots()
13+
1214
const props = defineProps({
1315
// 生成Form的布局结构数组
1416
schema: {
@@ -123,6 +125,7 @@ const setVisible = () => {
123125
</ElButton>
124126
</div>
125127
</template>
128+
<template v-for="(slot, name) in slots" #[name]><slot :name="name"></slot></template>
126129
</Form>
127130

128131
<template v-if="layout === 'bottom'">

src/store/modules/tagsView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const useTagsViewStore = defineStore('tagsView', {
5858
// 删除某个
5959
delView(view: RouteLocationNormalizedLoaded) {
6060
this.delVisitedView(view)
61-
this.addCachedView()
61+
this.delCachedView()
6262
},
6363
// 删除tag
6464
delVisitedView(view: RouteLocationNormalizedLoaded) {
@@ -80,7 +80,7 @@ export const useTagsViewStore = defineStore('tagsView', {
8080
// 删除所有缓存和tag
8181
delAllViews() {
8282
this.delAllVisitedViews()
83-
this.addCachedView()
83+
this.delCachedView()
8484
},
8585
// 删除所有tag
8686
delAllVisitedViews() {

0 commit comments

Comments
 (0)