2021-04-19 19:47:17 +08:00

21 lines
519 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<dl>
<dt>页面缓存必须满足以下条件</dt>
<dd>1. 路由配置name属性</dd>
<dd>2. 当前页面设置name属性并且跟路由配置的name属性一致否则无法缓存</dd>
</dl>
</template>
<script>
import { defineComponent, onActivated } from 'vue'
export default defineComponent({
name: 'test-cache', // 该name必须跟路由配置的name一致
setup() {
console.log('cache')
onActivated(() => {
console.log('onActivated')
})
},
})
</script>