html - W3C 验证和 Vue 的 HTML 绑定(bind)语法

标签 html vue.js w3c-validation

当我使用 W3C 验证器验证我的页面时,我在 Vue 的事件和绑定(bind)语法中遇到了这个错误:

Error: Attribute v-on:click not allowed on element div at this point.

有办法解决这个问题吗?

最佳答案

他们最好支持使用 data-* attributes ,例如,data-v-on:click,但他们似乎没有。

查看他们的问题 Why not using HTML5 data-* attributes .

似乎有可能overwrite the used prefix , 但是这个选项 seems to have been removed .

关于html - W3C 验证和 Vue 的 HTML 绑定(bind)语法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39498365/

相关文章:

c# - 将html有序列表值传递给c#文本框并在sql查询中使用

javascript - Vue2 : changing data property of child component based on a prop from a parent component

javascript - 与 Math.random 的 v-bind 行为不符合预期

javascript - VueJs v-for 循环未正确更新

html - 隐藏字段的标签是否符合 508 标准?

css - 所有 IE 版本的一个条件 css?

css - 同一文件中的 SVG 和 CSS 属性

php - 如何生成随机字符串和哈希列表并将其输出到 HTML 表格中?

javascript - JQuery忽略表单元素

html - 相当于 CSS 中的 <center> 标签?