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
                }
            }
        },
    愿你出走半生,归来仍是少年!
  • 相关阅读:
    ping 网关不同的原因(51cto博客搬迁)
    Linux Shell常用命令总结(51cto 博客搬迁)
    学生管理系统管理系统
    offset属性在各版本浏览器中的不同算法
    常用正则表达式
    select城市3级联动
    html5表单验证消息框
    清除浏览器默认选择效果
    排序之简单的冒泡排序
    简单的桶排序
  • 原文地址:https://www.cnblogs.com/wszxx/p/14657661.html
Copyright © 2011-2022 走看看