如:
<v-text-field v-model="editedItem.passing" type="number"
value="0"
min="0"
onKeypress="return(/[d.]/.test(String.fromCharCode(event.keyCode)))" :label="$t('message.examPagePassing')" :rules="[v => !!v || $t('message.required')]" :disabled="editedDisable" required></v-text-field>
添加这个属性
onKeypress="return(/[d.]/.test(String.fromCharCode(event.keyCode)))"