我在https://jsfiddle.net/rstoenescu/waugrryy/分叉了jsfiddle,然后从我的一个工作项目中向它添加了以下几行:
<q-field class="q-mb-sm" helper="Your first name">
<q-input v-model="form.first_name" inverted-light color="white" stack-label="First Name:" @blur="$v.form.first_name.$touch"
:error="$v.form.first_name.$error" autofocus/>
</q-field>
<q-field class="q-mb-sm" helper="Your last name">
<q-input v-model="form.last_name" inverted-light color="white" stack-label="Last Name:" @blur="$v.form.last_name.$touch"
:error="$v.form.last_name.$error"/>
</q-field>
这是我的jsfiddle:
https://jsfiddle.net/wsztud2h/
问题在于,现在我得到ReferenceError: $v is not defined
了,为什么原因我现在还不很清楚。
有什么想法吗?