基于Java spring + vue3 + nuxt构建的内容管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
522 B

<template>
<app-header />
<slot />
<app-footer />
</template>
<script setup lang="ts">
//挂载钩子
import {getLoacl, setLocal} from "~/utils/common";
onMounted(() => {
//必须在onMounted的时候才能用local和window
// getLoacl();
window.onbeforeunload = () => {
//离开页面时保存数据,由于可能突发情况,所以重要数据请手动调用setLocal函数
// setLocal(); //如果需要调试本地存储数据,记得把这个注释一下
};
});
</script>