【问题标题】:Vuejs . What do $v And $event denotes in Vuejs?Vuejs 。 Vuejs 中的 $v 和 $event 表示什么?
【发布时间】:2018-06-24 01:35:42
【问题描述】:

$v$event 在 Vue.Js 中表示什么?我们在什么情况下使用这些。也请举例详细说明。

【问题讨论】:

标签: javascript vue.js vuejs2 dom-events vue-directives


【解决方案1】:

$v 指的是Vuelidate 用于存储验证状态的特殊对象。在这里阅读更多:https://github.com/vuelidate/vuelidate

如果您的 HTML 代码中有 $v,那么代码肯定会使用 Vuelidate 进行表单验证。

$eventVue.js用来存储和检索事件的特殊对象。在这里阅读更多:https://vuejs.org/v2/guide/events.html

【讨论】:

    【解决方案2】:

    $v 是一个调用 vuelidate 的对象(在撰写评论时,在 Vue.js 2.0 版本中支持),它旨在检查以非 html 形式进行的每个输入。

    官方:https://vuelidate.js.org/

    Github:https://github.com/vuelidate/vuelidate

    自定义 vue js 验证:https://vuejs.org/v2/cookbook/form-validation.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-06-11
      • 2020-06-23
      • 2021-11-25
      • 2020-06-08
      • 1970-01-01
      • 2019-12-22
      • 2021-03-10
      相关资源
      最近更新 更多