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
                }
            }
        },
    愿你出走半生,归来仍是少年!
  • 相关阅读:
    源码搭建zabbix平台
    如何用手机远程控制自己的电脑
    nginx无法启动问题详解
    在<script>中加HTML注释标签<!-- --> 的原因?
    UNICODE,GBK,UTF-8区别
    dart学习一 windows环境安装dart环境
    Git使用方法(精心整理,绝对够用)
    非常好用的jQuery表格排序插件
    Redis NOAUTH Authentication required.
    Docker概念、安装
  • 原文地址:https://www.cnblogs.com/wszxx/p/14657661.html
Copyright © 2011-2022 走看看