优化 /demo/playground/page-cache/params/1 展示效果
Former-commit-id: 8a68b00831009e86fdffe41256366fda0d835ad1 [formerly 8a68b00831009e86fdffe41256366fda0d835ad1 [formerly 8a68b00831009e86fdffe41256366fda0d835ad1 [formerly 8a68b00831009e86fdffe41256366fda0d835ad1 [formerly 140dda30b3415a5919faa67c94ef999a277cea1f [formerly eb3953f0cc40de1ee319853d5ffe24a4c0120dbf]]]]] Former-commit-id: fa8cab1faa5f8227b6be5ec955db1c83025f7565 Former-commit-id: dd7820ad852daa634c7d99b42283fc94c3800eb2 Former-commit-id: 320aca331f60295fb8b3a00bb2dc91345f387b12 [formerly fe41ee17bb7366ad68a14a6c85c4db7604261444] Former-commit-id: e8a9879d55092e407dc3767011c51244f8d60f30 Former-commit-id: 610a2093b07be897db664bb166a318c23b13e9cb Former-commit-id: 064faf6013f23ef89835d14ec2bedc8ad0e5ee69 Former-commit-id: cd553a8b44fdfc345dd432f5b14a120dbdf8c684 Former-commit-id: 690baf5ec1ca08457187d8ccaf1bb620b973d49e
This commit is contained in:
parent
95377e0332
commit
c54538acf6
|
|
@ -3,8 +3,18 @@
|
|||
<template slot="header">这个页面会被 keep-alive</template>
|
||||
<h2 class="d2-mt-0">编号:{{id}}</h2>
|
||||
<p class="d2-mt-0">在下面的输入框输入任意字符后,切换到其它页面,再回到此页时输入框文字保留,证明被缓存</p>
|
||||
<el-input v-model="data.value" placeholder="input here" />
|
||||
<input v-model="data.value" placeholder="input here" />
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<p>el-input</p>
|
||||
<el-input v-model="data.value" placeholder="input here" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<p>html input</p>
|
||||
<div class="el-input el-input--default">
|
||||
<input v-model="data.value" placeholder="input here" class="el-input__inner" />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
|
|
@ -39,7 +49,6 @@ export default {
|
|||
},
|
||||
// 第一次进入或从其他组件对应路由进入时触发
|
||||
beforeRouteEnter (to, from, next) {
|
||||
console.log('beforeRouteEnter => ', to)
|
||||
const id = to.params.id
|
||||
if (id) {
|
||||
next(instance => instance.switchData(id))
|
||||
|
|
@ -49,7 +58,6 @@ export default {
|
|||
},
|
||||
// 在同一组件对应的多个路由间切换时触发
|
||||
beforeRouteUpdate (to, from, next) {
|
||||
console.log('beforeRouteUpdate => ', to)
|
||||
const id = to.params.id
|
||||
if (id) {
|
||||
this.switchData(id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue