We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f924bd6 commit 0ed147dCopy full SHA for 0ed147d
packages/runtime-dom/__tests__/directives/vCloak.spec.ts
@@ -0,0 +1,10 @@
1
+import { createApp } from '@vue/runtime-dom'
2
+
3
+describe('vCloak', () => {
4
+ test('should be removed after compile', () => {
5
+ const root = document.createElement('div')
6
+ root.setAttribute('v-cloak', '')
7
+ createApp({}).mount(root)
8
+ expect(root.hasAttribute('v-cloak')).toBe(false)
9
+ })
10
+})
packages/runtime-dom/src/index.ts
@@ -63,7 +63,9 @@ export const createApp = ((...args) => {
63
}
64
// clear content before mounting
65
container.innerHTML = ''
66
- return mount(container)
+ const proxy = mount(container)
67
+ container.removeAttribute('v-cloak')
68
+ return proxy
69
70
71
return app
0 commit comments