mirror of https://github.com/vuejs/core.git
Compare commits
4 Commits
2bcda5c0ef
...
18765d3eb3
Author | SHA1 | Date |
---|---|---|
|
18765d3eb3 | |
|
c16f8a94c7 | |
|
e9c954f141 | |
|
92b1d9b2cc |
|
@ -311,7 +311,7 @@ function prepareDeps(sub: Subscriber) {
|
|||
}
|
||||
|
||||
function cleanupDeps(sub: Subscriber) {
|
||||
// Cleanup unsued deps
|
||||
// Cleanup unused deps
|
||||
let head
|
||||
let tail = sub.depsTail
|
||||
let link = tail
|
||||
|
|
|
@ -394,4 +394,12 @@ describe('runtime-dom: props patching', () => {
|
|||
|
||||
expect(fn).toBeCalledTimes(0)
|
||||
})
|
||||
|
||||
// #12211
|
||||
test('should not override content when `text` attribute is set', () => {
|
||||
const root = document.createElement('div')
|
||||
render(h('a', { text: '' }, ['foo']), root)
|
||||
const a = root.children[0]
|
||||
expect(a.textContent).toBe('foo')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -127,6 +127,11 @@ function shouldSetAsProp(
|
|||
return false
|
||||
}
|
||||
|
||||
// #12211 <a text> must be set as attribute
|
||||
if (key === 'text' && el.tagName === 'A') {
|
||||
return false
|
||||
}
|
||||
|
||||
// #8780 the width or height of embedded tags must be set as attribute
|
||||
if (key === 'width' || key === 'height') {
|
||||
const tag = el.tagName
|
||||
|
|
Loading…
Reference in New Issue