2021-10-28

element中button满足条件置灰

 :disabled="folderSelection.length <= 0 ? true : false" 

element表格超出宽度省略

show-overflow-tooltip

表格复选框置灰

<el-table-column type="selection" width="55" :selectable="checkSelectable"> 

 checkSelectable (row) {
    if(parseFloat(row.file_size) <= 0){
      return false;//符合条件就置灰
    }else{
      return true;//不符合就可选
    }
},

element中的table点击每一行选中复选框,当复选框置灰点击不选中

 <el-table
            ref="filetbale"
            v-show="showFile"
            :data="fileData"
            tooltip-effect="dark"
            style="width: 100%"
            max-height="450"
            @selection-change="flieChange"
            @row-click="handleFileClick"
            
          >

需要判断一下才可以

  handleFileClick(row) {
      if(parseFloat(row.file_size) > 0){
        this.$refs.filetbale.toggleRowSelection(row);
      }
    },

echarts中的tooltip多个元素加单位

tooltip : {  
        trigger: 'axis',  
        formatter:function(params)  
        {  
           var relVal = params[0].name;  
           for (var i = 0, l = params.length; i < l; i++) {  
                relVal += '<br/>' + params[i].seriesName + ' : ' + params[i].value+"件";  
            }  
           return relVal;  
        }  
    },  

echarts中tooltip前加小圆点以及显示当前x轴的元素

 formatter: function (params) {
 	var result = "";
    var dotHtml ='<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#0090ff"></span>';
          var dotHtml2 =
            '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#ff7800"></span>';
          result += params[0].axisValue +"</br>" + dotHtml + params[0].seriesName + params[0].data +"</br>" +
                                                    dotHtml2 +params[1].seriesName +params[1].data;
          return result;
        },

解决element ui 中提示太多堆叠的问题

data中声明的:变量
notifyPromise: Promise.resolve(),
方法里写:
    notify(msg,title) {
      var _this = this;
      _this.notifyPromise = _this.notifyPromise
        .then(_this.$nextTick)
        .then(() => {
          _this.$notify({
            title: "警告",
            message: msg.message,
            type: "warning",
          });
        });
    },
  user-select: none; /* 禁止鼠标拖动页面时选中页面文字 */
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值