设为首页 - 加入收藏
广告 1000x90
您的当前位置:当前位置: 首页 >

正文

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

来源: 编辑: 时间:2025-06-24 20:10: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标签属性使用模板字符串时需要在外层加上双引号或单引号?
    {dede:pagebreak/}

相关文章:

    {dede:likearticle row='10' channelid='1' typeid="all"}
  • [/]
  • {/dede:likearticle}

相关推荐:

  • [/]
  • [/]
  • [/]
  • [/]
  • [/]
  • [/]
  • [/]
  • [/]
  • [/]
  • [/]

网友评论:

{dede:include file='ajaxfeedback.htm' /}

模板天下 www.mobantianxia.com 联系QQ:498872301 邮箱:498872301@qq.com

版权@|备案:赣-ICP备93621495号-1|网站地图

Top