1.tagsView.ts删除页面缓存优化 2.新增Search组件插槽传递
parent
401794f1bf
commit
5718c78811
|
@ -9,6 +9,8 @@ import { FormSchema } from '@/types/form'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const slots = useSlots()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 生成Form的布局结构数组
|
// 生成Form的布局结构数组
|
||||||
schema: {
|
schema: {
|
||||||
|
@ -123,6 +125,7 @@ const setVisible = () => {
|
||||||
</ElButton>
|
</ElButton>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-for="(slot, name) in slots" #[name]><slot :name="name"></slot></template>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<template v-if="layout === 'bottom'">
|
<template v-if="layout === 'bottom'">
|
||||||
|
|
|
@ -58,7 +58,7 @@ export const useTagsViewStore = defineStore('tagsView', {
|
||||||
// 删除某个
|
// 删除某个
|
||||||
delView(view: RouteLocationNormalizedLoaded) {
|
delView(view: RouteLocationNormalizedLoaded) {
|
||||||
this.delVisitedView(view)
|
this.delVisitedView(view)
|
||||||
this.addCachedView()
|
this.delCachedView()
|
||||||
},
|
},
|
||||||
// 删除tag
|
// 删除tag
|
||||||
delVisitedView(view: RouteLocationNormalizedLoaded) {
|
delVisitedView(view: RouteLocationNormalizedLoaded) {
|
||||||
|
@ -80,7 +80,7 @@ export const useTagsViewStore = defineStore('tagsView', {
|
||||||
// 删除所有缓存和tag
|
// 删除所有缓存和tag
|
||||||
delAllViews() {
|
delAllViews() {
|
||||||
this.delAllVisitedViews()
|
this.delAllVisitedViews()
|
||||||
this.addCachedView()
|
this.delCachedView()
|
||||||
},
|
},
|
||||||
// 删除所有tag
|
// 删除所有tag
|
||||||
delAllVisitedViews() {
|
delAllVisitedViews() {
|
||||||
|
|
Loading…
Reference in New Issue