fix(plugin): types

This commit is contained in:
charlie
2021-05-18 11:29:22 +08:00
parent d460e74823
commit cb11e1a826

View File

@@ -185,7 +185,13 @@ export function setupInjectedUI (
attrs: Record<string, any>
) {
const pl = this
const selector = ui.path || `#${ui.slot}`
let selector = ''
if ('slot' in ui) {
selector = `#${ui.slot}`
} else {
selector = ui.path
}
const target = selector && document.querySelector(selector)
if (!target) {