ヘッダーの戻るボタンがページリロードすると消える問題を修正

This commit is contained in:
syuilo 2020-11-03 20:28:38 +09:00
parent 164cf66284
commit 16249d525f

View file

@ -42,9 +42,12 @@ export default defineComponent({
},
watch: {
$route(to, from) {
$route: {
handler(to, from) {
this.canBack = (window.history.length > 0 && !['index'].includes(to.name));
},
immediate: true
},
},
mounted() {