- el-input 不允许只输入空格
v-model.trim设置不允许空格
<el-form-item label="航次:" prop="voyageName" >
<el-input v-model.trim="dialogData.dataForm.voyageName" style="width:260px" placeholder="请输入航次"
:disabled="dialogData.disabled"></el-input>
</el-form-item>
- el-table-column长度超过时隐藏显示-tooltip
:show-overflow-tooltip=“true” - 将后台返回的数字0 1 2 转化为对应的文字信息
:formatter=“statusFormatter”
<el-table-column v-if="wenzi === 1" :show-overflow-tooltip="true" align="center" prop="status" label="审核状态"
:formatter="statusFormatter">
</el-table-column>
statusFormatter(row, column) {
const status = row.status
if (status == 0) {
return '待审核'
} else if (status == 1) {
return '审核通过'
} else if (status == -1) {
return '未通过'
}
},