mirror of https://github.com/vuejs/core.git
Merge e9c954f141
into c16f8a94c7
This commit is contained in:
commit
18765d3eb3
|
@ -394,4 +394,12 @@ describe('runtime-dom: props patching', () => {
|
||||||
|
|
||||||
expect(fn).toBeCalledTimes(0)
|
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
|
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
|
// #8780 the width or height of embedded tags must be set as attribute
|
||||||
if (key === 'width' || key === 'height') {
|
if (key === 'width' || key === 'height') {
|
||||||
const tag = el.tagName
|
const tag = el.tagName
|
||||||
|
|
Loading…
Reference in New Issue