首页 > 解决方案 > 在输入 [Vue.js] 中设置“名称”

问题描述

这在 Vue 中合法吗?

<input :name="_charset_" />

或者我应该这样做:

<input name="_charset_" />

标签: vue.js

解决方案


to put in layman's terms.

this is when _charset_ is a variable which you have defined in data() or computed

  <input :name="_charset_" />

this is when _charset_ is a literal string.

<input name="_charset_" />

推荐阅读