Commit 0c63842e by 史敦盼

Merge branch 'sdp-v1'

2 parents 4477b0c0 b33ec51a
...@@ -108,12 +108,12 @@ const initAttributePanel = function(that) { ...@@ -108,12 +108,12 @@ const initAttributePanel = function(that) {
} }
} }
// 添加基本信息方法 // 添加基本信息方法
function fnAddInfoItem(contain, name, value) { function fnAddInfoItem(contain, name, value, labelWidth=60) {
const infoItemContain = document.createElement('div'); const infoItemContain = document.createElement('div');
infoItemContain.style.cssText = 'display: flex;padding: 4px 0'; infoItemContain.style.cssText = 'display: flex;padding: 4px 0';
const nameSpan = document.createElement('span'); const nameSpan = document.createElement('span');
nameSpan.innerHTML = name + ': '; nameSpan.innerHTML = name + ': ';
nameSpan.style.cssText = 'margin-right: 10px;width: 60px;text-align: right;flex-shrink: 0;' nameSpan.style.cssText = `margin-right: 10px;width: ${labelWidth}px;text-align: right;flex-shrink: 0;`
const valueSpan = document.createElement('span'); const valueSpan = document.createElement('span');
valueSpan.style.cssText = 'white-space: normal;' valueSpan.style.cssText = 'white-space: normal;'
valueSpan.innerHTML = value valueSpan.innerHTML = value
...@@ -170,7 +170,7 @@ const initAttributePanel = function(that) { ...@@ -170,7 +170,7 @@ const initAttributePanel = function(that) {
let stringAttr = haveAttrString[0].split('info__=')[1]; let stringAttr = haveAttrString[0].split('info__=')[1];
infoList = JSON.parse(stringAttr); infoList = JSON.parse(stringAttr);
infoList.forEach(item => { infoList.forEach(item => {
fnAddInfoItem(that.container, item.name, item.value) fnAddInfoItem(that.container, item.name, item.value, 100)
}) })
} }
} }
...@@ -219,8 +219,9 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy ...@@ -219,8 +219,9 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy
//属性名-------------------------------------------------------------------- //属性名--------------------------------------------------------------------
const item_left_container = document.createElement('div'); const item_left_container = document.createElement('div');
item_left_container.style.cssText = 'display: flex;width: 100%;'; item_left_container.style.cssText = 'display: flex;width: 140px;text-align: right;margin-right: 10px;';
const item_left_span = document.createElement('span'); const item_left_span = document.createElement('span');
item_left_span.style.cssText = 'white-space: normal;width: 100%;text-align: right;'
item_left_span.innerHTML = attrName_ + ': '; item_left_span.innerHTML = attrName_ + ': ';
......
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
$(".right_graph_container").animate({ right: "0%" }, 200, 'linear'); $(".right_graph_container").animate({ right: "0%" }, 200, 'linear');
this.status = 2; this.status = 2;
}else{ }else{
$(".right_graph_container").animate({ right: "-15%" }, 200, 'linear'); $(".right_graph_container").animate({ right: "-45%" }, 200, 'linear');
this.status = 1; this.status = 1;
} }
}, },
...@@ -357,7 +357,7 @@ ...@@ -357,7 +357,7 @@
width: 265px; width: 265px;
height: 100%; height: 100%;
position: absolute; position: absolute;
right: -15%; right: -45%;
top: 0; top: 0;
background-color: rgba(256, 256, 256, 1); background-color: rgba(256, 256, 256, 1);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!