[vue]为什么对html标签属性使用模板字符串时需要在外层加上双引号或单引号?

Views :
Update time : 2025-06-24 19:20:15

路过 因为它是 HTML,或者说 Vue 作者希望 vue template 兼容 HTML 规则 那么它就要按照 HTML 规范去解析 template,不管借助不可见 dom 创建它还是写 parse 解析它。

在 HTML 中,解析到 atrribue value 时有 3 种状态 After attribute value (quoted) stateAttribute value (single-quoted) stateAttribute value (unquoted) state这里的异常对应着 unquoted 13.2.5.38 Attribute value (unquoted) state Consume the next inp…。

[vue]为什么对html标签属性使用模板字符串时需要在外层加上双引号或单引号?
Related News
Read More >>
Blog Post With Youtube Video 为什么大部分人都认为2560x1440是2K?
2025-06-25 15:15:18
为什么大部分人都认为2560x1440是2K?...
Blog Post With Youtube Video 请问照片里这个人是谁呀?
2025-06-25 14:30:18
请问照片里这个人是谁呀?...
Blog Post With Youtube Video 不是都说6月美债要爆吗 怎么没消息了?
2025-06-25 15:30:19
不是都说6月美债要爆吗 怎么没消息了?...
Blog Post With Youtube Video 有没有什么路由器让你用过之后彻底惊艳了?
2025-06-25 14:45:25
有没有什么路由器让你用过之后彻底惊艳了?...

Leave Your Message