1.elementui将表格中的某列设置成红色
<el-table-column slot="note" label="错误信息" prop="note" align="center" width="170">
<template slot-scope="scope">
<span :style="{ color: '#ff4949'}">{{scope.row.note}}</span>
</template>
</el-table-column>
columns: [
{slot: 'index'},
{
prop: "workshopName",
label: "工作室名称",
},
{slot: 'note'},
{
prop: "phone",
label: "手机",
},
],
2.elementui将upload上传文件时额外带参数
<el-upload
name="file"
:action="baseUrl + '/wage/tyty'"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-change="handleChange"
:data="uploadPayload"
:multiple="false"
:file-list="fileList"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
:headers="headers">
data数据是变量,需要用computed
computed: {
uploadPayload() {
return {
userId: this.userId
}
}
},