mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-05-01 14:49:00 +08:00
fix: useAliveData
This commit is contained in:
parent
4fc15eff0a
commit
714de48d78
@ -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 })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user