我使用vuetify组件来添加对输入的验证,但我也将表单设置为" readonly“(使用readonly属性)。
我的问题是我有一些我不想成为“只读”的输入。
遗憾的是,不能用VTextField readonly覆盖VForm readonly为false:
<v-form readonly>
<v-text-field
:readonly="false" // not working
</v-text-field>
</v-form>
所以我想问的是,有没有人有从VForm上下文中排除元素的想法?
发布于 2021-06-28 09:06:35
我自己发现,我们只需要将可编辑元素包装在一个不是只读的新VForm中
<v-form readonly>
// not editable
<v-text-field>
</v-text-field>
<v-form>
// editable
<v-text-field>
</v-text-field>
</v-form>
</v-form>
https://stackoverflow.com/questions/66712853
复制