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; /* 禁止鼠标拖动页面时选中页面文字 */