zoukankan      html  css  js  c++  java
  • elementui问题汇总

    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
                }
            }
        },
    愿你出走半生,归来仍是少年!
  • 相关阅读:
    appium之模拟坐标方法介绍
    mysql操作数据库常用命令
    appium使用无线连接手机方法
    mysql数据之增删改操作
    mysql之子查询与分组查询
    selenium之多个窗口之间切换
    selenium之内嵌网页iframe切换
    CF103E
    CF724E
    光伏元件
  • 原文地址:https://www.cnblogs.com/wszxx/p/14657661.html
Copyright © 2011-2022 走看看