fix(runtime-dom): set `text` as an attribute for `a` tags

This commit is contained in:
tycho 2024-10-18 17:36:12 +08:00
parent 657603d7b7
commit 92b1d9b2cc
1 changed files with 5 additions and 0 deletions

View File

@ -122,6 +122,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