readonly属性是Boolean类型,默认值为false。readonly值为true表示只读。
<el-col :span="12">
<el-form-item label="品名:" prop="materialName">
<el-input v-model="edit.materialName" :readonly="true"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料编码:" prop="materialCode">
<el-input v-model="edit.materialCode" :readonly="true"/>
</el-form-item>
</el-col>