|
|
@ -155,6 +155,9 @@ debouncedWatch(
|
|
|
|
if (canceled) return
|
|
|
|
if (canceled) return
|
|
|
|
const c = new Map<string, Map<string, string>>()
|
|
|
|
const c = new Map<string, Map<string, string>>()
|
|
|
|
for (const { id, mod } of mods) {
|
|
|
|
for (const { id, mod } of mods) {
|
|
|
|
|
|
|
|
const mapId = id.slice(0, id.indexOf('#'))
|
|
|
|
|
|
|
|
let map = c.get(mapId)
|
|
|
|
|
|
|
|
if (map) continue
|
|
|
|
const comp = mod.default ?? mod
|
|
|
|
const comp = mod.default ?? mod
|
|
|
|
if (comp?.render) {
|
|
|
|
if (comp?.render) {
|
|
|
|
const app = createApp(comp)
|
|
|
|
const app = createApp(comp)
|
|
|
@ -178,8 +181,6 @@ debouncedWatch(
|
|
|
|
const sections = div.innerHTML.split(headingRegex)
|
|
|
|
const sections = div.innerHTML.split(headingRegex)
|
|
|
|
app.unmount()
|
|
|
|
app.unmount()
|
|
|
|
sections.shift()
|
|
|
|
sections.shift()
|
|
|
|
const mapId = id.slice(0, id.indexOf('#'))
|
|
|
|
|
|
|
|
let map = c.get(mapId)
|
|
|
|
|
|
|
|
if (!map) {
|
|
|
|
if (!map) {
|
|
|
|
map = new Map()
|
|
|
|
map = new Map()
|
|
|
|
c.set(mapId, map)
|
|
|
|
c.set(mapId, map)
|
|
|
|