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
                }
            }
        },
    愿你出走半生,归来仍是少年!
  • 相关阅读:
    总结(yst)
    iOS 中 OC项目使用swift第三方工具(OC、swift 混合)
    iOS Appstore 版本更新
    软件设计模式
    iOS huhuProject积累
    iOS暴力禁用navigationviewcontroller右滑手势和手势的优先级
    ios 真机调试支持包的路径
    ios 沙盒路径
    Undefined symbols for architecture x86_64 "_OBJC_CLASS_$_类名",referenced fromobjc-class in .o
    pako.js GZIP定义解压和压缩的方法
  • 原文地址:https://www.cnblogs.com/wszxx/p/14657661.html
Copyright © 2011-2022 走看看