feat(sfc): scopeId runtime support

This commit is contained in:
Evan You
2019-12-16 13:33:10 -05:00
parent 04e11187b9
commit 69c9dbc825
7 changed files with 71 additions and 6 deletions

View File

@@ -38,5 +38,9 @@ export const nodeOps = {
nextSibling: (node: Node): Node | null => node.nextSibling,
querySelector: (selector: string): Element | null =>
doc.querySelector(selector)
doc.querySelector(selector),
setScopeId(el: Element, id: string) {
el.setAttribute(id, '')
}
}