fix: 修复loading样式错误、nodata没有正常显示的问题
This commit is contained in:
@@ -1,44 +0,0 @@
|
|||||||
.nz-chart-tooltip .cn-chart-tooltip-box{
|
|
||||||
display: flex;
|
|
||||||
.cn-chart-tooltip-content{
|
|
||||||
flex: 1;
|
|
||||||
display: inline-block;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow:ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
font-size:14px;
|
|
||||||
color:#666;
|
|
||||||
font-weight:400;
|
|
||||||
margin-left:2px ;
|
|
||||||
}
|
|
||||||
.cn-chart-tooltip-value{
|
|
||||||
float:right;
|
|
||||||
margin-left:20px;
|
|
||||||
font-size:14px;
|
|
||||||
color:#666;
|
|
||||||
font-weight:900;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.cn-chart__single-value {
|
|
||||||
.chart__loading {
|
|
||||||
top: 0;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.chart__loading {
|
|
||||||
position: absolute;
|
|
||||||
height: calc(100% - 47px);
|
|
||||||
top: 47px;
|
|
||||||
width: 100%;
|
|
||||||
background-color: #fefefe;
|
|
||||||
z-index: 1;
|
|
||||||
opacity: .9;
|
|
||||||
|
|
||||||
i {
|
|
||||||
position: absolute;
|
|
||||||
left: calc(50% - 15px);
|
|
||||||
top: calc(50% - 15px);
|
|
||||||
font-size: 30px;
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -340,3 +340,48 @@
|
|||||||
border-left: 5px solid #aeaeae;
|
border-left: 5px solid #aeaeae;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nz-chart-tooltip .cn-chart-tooltip-box{
|
||||||
|
display: flex;
|
||||||
|
.cn-chart-tooltip-content{
|
||||||
|
flex: 1;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size:14px;
|
||||||
|
color:#666;
|
||||||
|
font-weight:400;
|
||||||
|
margin-left:2px ;
|
||||||
|
}
|
||||||
|
.cn-chart-tooltip-value{
|
||||||
|
float:right;
|
||||||
|
margin-left:20px;
|
||||||
|
font-size:14px;
|
||||||
|
color:#666;
|
||||||
|
font-weight:900;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.cn-chart__single-value {
|
||||||
|
.chart__loading {
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.chart__loading {
|
||||||
|
position: absolute;
|
||||||
|
height: calc(100% - 47px);
|
||||||
|
top: 47px;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #fefefe;
|
||||||
|
z-index: 1;
|
||||||
|
opacity: .9;
|
||||||
|
|
||||||
|
i {
|
||||||
|
position: absolute;
|
||||||
|
left: calc(50% - 15px);
|
||||||
|
top: calc(50% - 15px);
|
||||||
|
font-size: 30px;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -346,18 +346,24 @@ export const clickOutside = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const noDataDom = document.createElement('div')
|
function noDataDomFactory () {
|
||||||
noDataDom.setAttribute('class', 'no-data')
|
const noDataDom = document.createElement('div')
|
||||||
noDataDom.innerText = 'No data'
|
noDataDom.setAttribute('class', 'no-data')
|
||||||
|
noDataDom.innerText = 'No data'
|
||||||
|
return noDataDom
|
||||||
|
}
|
||||||
|
|
||||||
export const noData = {
|
export const noData = {
|
||||||
updated (el, binding) {
|
updated (el, binding) {
|
||||||
if (el && binding.oldValue !== binding.value) {
|
if (el) {
|
||||||
|
console.info(binding.value, el)
|
||||||
if (binding.value) {
|
if (binding.value) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
el.childNodes.forEach(node => {
|
el.childNodes.forEach(node => {
|
||||||
|
console.info(node, node.style)
|
||||||
node.style && (node.style.display = 'none')
|
node.style && (node.style.display = 'none')
|
||||||
})
|
})
|
||||||
el.insertBefore(noDataDom, el.childNodes[0])
|
el.insertBefore(noDataDomFactory(), el.childNodes[0])
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user