mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix: rename key to cmpKey
This commit is contained in:
parent
200bf3589a
commit
825b0bf2e3
@ -126,13 +126,13 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const key = `${props.name}_${hashId.value}`
|
const cmpKey = `${props.name}_${hashId.value}`
|
||||||
const ssrHTML = ref<string>(nuxtApp.payload.data[key]?.html || '')
|
const ssrHTML = ref<string>(nuxtApp.payload.data[cmpKey]?.html || '')
|
||||||
|
|
||||||
if (import.meta.client && instance.vnode?.el && !ssrHTML.value) {
|
if (import.meta.client && instance.vnode?.el && !ssrHTML.value) {
|
||||||
ssrHTML.value = getFragmentHTML(instance.vnode.el, true)?.join('') || ''
|
ssrHTML.value = getFragmentHTML(instance.vnode.el, true)?.join('') || ''
|
||||||
nuxtApp.payload.data[key] ||= {}
|
nuxtApp.payload.data[cmpKey] ||= {}
|
||||||
nuxtApp.payload.data[key].html = ssrHTML.value
|
nuxtApp.payload.data[cmpKey].html = ssrHTML.value
|
||||||
}
|
}
|
||||||
|
|
||||||
const uid = ref<string>(ssrHTML.value.match(SSR_UID_RE)?.[1] ?? getId())
|
const uid = ref<string>(ssrHTML.value.match(SSR_UID_RE)?.[1] ?? getId())
|
||||||
|
Loading…
Reference in New Issue
Block a user