Commit ba95ac54 by caoyanzhi

update: 客户详情调整

parent 412e738d
......@@ -574,15 +574,39 @@
padding-top: 20px;
}
}
// 描述列表最后一行取消padding
/deep/.el-descriptions {
.info-lebel,
.member-info-row {
font-size: 0;
&+.member-info-row {
margin-top: 20px;
}
.member-info-name {
display: inline-block;
vertical-align: middle;
max-width: 72px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.info-lebel {
margin-right: 10px;
line-height: 24px;
}
.info-content {
font-size: 14px;
.gray-font {
color: #909399;
}
display: inline-block;
vertical-align: top;
line-height: 24px;
}
}
.info-lebel,
.info-content {
font-size: 14px;
color: #606266;
.gray-font {
color: #909399;
}
}
// 描述列表最后一行取消padding
/deep/.el-descriptions {
.el-descriptions-item__cell {
padding-bottom: 20px;
}
......
......@@ -268,6 +268,18 @@ export default {
this.getAllDetail();
this.getLogPage();
},
isOverflow(text) {
const dom = document.createElement('span');
dom.style.position = 'fixed';
dom.style.zIndex = -1;
dom.style.opacity = 0;
dom.innerText = text;
document.body.appendChild(dom);
const result = dom.offsetWidth >= 72;
console.log(dom.offsetWidth)
document.body.removeChild(dom);
return result;
},
getAllDetail () {
const param = { memberId: this.memberId, pageName: this.pageName };
const urlArr = [
......@@ -281,6 +293,8 @@ export default {
if (res.data.errorCode === 0) {
const ret = res.data.result;
if (api === 'memberLoadBaseDetail') {
ret.member.memberNameOverflow = this.isOverflow(ret.member.memberName);
ret.member.thirdNicknameOverflow = this.isOverflow(ret.member.thirdNickname);
this.member = Object.assign({}, ret.member);
if (!Array.isArray(this.member.memberSources)) {
this.member.memberSources = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment