1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-05-01 06:39:01 +08:00

fix: useAliveData

This commit is contained in:
zclzone 2023-12-09 13:51:21 +08:00
parent 4fc15eff0a
commit 714de48d78

View File

@ -7,7 +7,7 @@
**********************************/ **********************************/
const lastDataMap = new Map() const lastDataMap = new Map()
export const useAliveForm = (initData = {}, key) => { export const useAliveData = (initData = {}, key) => {
key = key ?? useRoute().name key = key ?? useRoute().name
const lastData = lastDataMap.get(key) const lastData = lastDataMap.get(key)
const aliveData = ref(lastData || { ...initData }) const aliveData = ref(lastData || { ...initData })