File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed
views/demo/feat/tab-params Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 66- 增加富文本嵌入表单的示例
77- 表单组件 schema 增加 ` required ` 属性。简化配置
88- openModal 和 openDrawer 第二个参数可以代替` transferModalData ` 传参到内部
9+ - 带参路由可以被缓存
910
1011### ⚡ Performance Improvements
1112
Original file line number Diff line number Diff line change 11import { defineComponent } from 'vue' ;
2- // import { Layout } from 'ant-design-vue';
2+ import { Layout } from 'ant-design-vue' ;
3+ import { RouterView } from 'vue-router' ;
4+
35// hooks
46
57import { ContentEnum } from '/@/enums/appEnum' ;
68import { appStore } from '/@/store/modules/app' ;
7- import PageLayout from '/@/layouts/page/index' ;
9+ // import PageLayout from '/@/layouts/page/index';
810export default defineComponent ( {
911 name : 'DefaultLayoutContent' ,
1012 setup ( ) {
@@ -13,9 +15,10 @@ export default defineComponent({
1315 const { contentMode } = getProjectConfig ;
1416 const wrapClass = contentMode === ContentEnum . FULL ? 'full' : 'fixed' ;
1517 return (
16- // <Layout.Content class={`layout-content ${wrapClass} `}>
17- < PageLayout class = { `layout-content ${ wrapClass } ` } />
18- // </Layout.Content>
18+ < Layout . Content class = { `layout-content ${ wrapClass } ` } >
19+ { ( ) => < RouterView /> }
20+ { /* <PageLayout class={`layout-content ${wrapClass} `} /> */ }
21+ </ Layout . Content >
1922 ) ;
2023 } ;
2124 } ,
Original file line number Diff line number Diff line change @@ -44,10 +44,10 @@ export default defineComponent({
4444 // TODO add key?
4545 const Content = openCache ? (
4646 < KeepAlive max = { max } include = { cacheTabs } >
47- < Component />
47+ < Component key = { route . path } />
4848 </ KeepAlive >
4949 ) : (
50- < Component />
50+ < Component key = { route . path } />
5151 ) ;
5252 return openRouterTransition ? (
5353 < Transition
Original file line number Diff line number Diff line change 11<template >
22 <div class =" p-4" >
33 Current Param : {{ params }}
4- <!-- <input /> -->
4+ <br />
5+ Keep Alive
6+ <input />
57 </div >
68</template >
79<script lang="ts">
You can’t perform that action at this time.
0 commit comments