zoukankan      html  css  js  c++  java
  • Element Select 带图标

    如图所示:

    代码如下:

    <el-table-column label="风险类型" width="220">
    <template slot-scope="scope">
    <el-select size="mini" v-model="scope.row.RiskTypeIds" placeholder="请选择风险类型"
    multiple :multiple-limit="5" collapse-tags style="180px;">
    <el-option v-for="risk in riskTypeList"
    :key="risk.Id"
    :label="risk.DictionaryName"
    :value="risk.Id">
    <div>
    <img class="risk" v-bind:src="getHeadPic(risk.CodeImgUrl)" alt=""
    onerror="javascript: this.src = '../../images/flame.PNG'" style="height:34px;34px;float:left;margin-bottom:5px;padding-top:5px;">
    <span style=" float:left; font-family: none;padding-left:10px;">{{ risk.DictionaryName }}</span>
    </div>
    </el-option>
    </el-select>
    </template>
    </el-table-column>

    方法

    getHeadPic: function (headPic) {
    if (headPic != null && headPic != undefined && headPic != '') {
    return vm.UrlHead + headPic.replace(".", "smaller.");
    }
    return vm.UrlHead + "/null";
    },

  • 相关阅读:
    bzoj 1503: [NOI 2004]郁闷的出纳员
    bzoj 1001: [BeiJing2006]狼抓兔子
    bzoj 1005: [HNOI2008]明明的烦恼
    bzoj 1004: [HNOI2008]Cards
    bzoj 1003: [ZJOI2006]物流运输trans
    06day1
    05day2
    04day2
    04day1
    03day2
  • 原文地址:https://www.cnblogs.com/hongjiaojiao/p/14036143.html
Copyright © 2011-2022 走看看