Merge pull request #1329 from dataease/pr@dev@refactor_auth-model

fix: 优化仪表板编辑时,边界可能间隙不一致
This commit is contained in:
王嘉豪 2021-11-30 15:17:09 +08:00 committed by GitHub
commit 748158ecb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 34 deletions

View File

@ -451,9 +451,8 @@ export default {
}
},
style() {
// console.log('style-top:' + this.y + '--' + this.top)
return {
padding: this.curGap + 'px',
padding: this.curGap + 'px!important',
transform: `translate(${this.left}px, ${this.top}px) rotate(${this.rotate}deg)`,
width: this.computedWidth,
height: this.computedHeight,
@ -529,7 +528,6 @@ export default {
width: this.computedMainSlotWidth,
height: this.computedMainSlotHeight
}
// console.log('style=>' + JSON.stringify(style))
return style
},
curComponent() {
@ -698,7 +696,7 @@ export default {
const rect = this.$el.parentNode.getBoundingClientRect()
this.parentX = rect.x
this.parentY = rect.y
return [Math.round(parseFloat(style.getPropertyValue('width'), 10)), 100000]
return [Math.round(parseFloat(style.getPropertyValue('width'), 10)) + 6, 100000]
}
if (typeof this.parent === 'string') {
const parentNode = document.querySelector(this.parent)
@ -1810,35 +1808,8 @@ export default {
transition: 0.2s
}
.gap_class{
padding:5px;
}
.de-drag-active{
outline: 1px solid #70c0ff;
user-select: none;
}
/*.mouseOn >>> .icon-shezhi{*/
/* z-index: 2;*/
/* display:block!important;*/
/*}*/
/*.vdr > i{*/
/* right: 5px;*/
/* color: gray;*/
/* position: absolute;*/
/*}*/
/*.vdr >>> i:hover {*/
/* color: red;*/
/*}*/
/*.vdr:hover >>> i {*/
/* z-index: 2;*/
/* display:block;*/
/*}*/
/*.vdr>>>.icon-shezhi {*/
/* display:none*/
/*}*/
</style>

View File

@ -280,4 +280,9 @@ export default {
padding: 10px 20px 20px;
}
::-webkit-scrollbar {
width: 0px!important;
height: 0px!important;
}
</style>

View File

@ -147,5 +147,10 @@ export default {
}
.full-height {
height: 100vh !important;
::-webkit-scrollbar {
width: 0px;
height: 0px;
}
}
</style>

View File

@ -699,7 +699,7 @@ export default {
if (domInfo) {
this.outStyle.height = domInfo.offsetHeight - this.getGap()
// restore
this.outStyle.width = domInfo.offsetWidth - this.getGap() + (Math.random() * 0.000001)
this.outStyle.width = domInfo.offsetWidth - this.getGap() + (Math.random() * 0.000001) + 2
}
})
},
@ -1057,8 +1057,8 @@ export default {
}
::-webkit-scrollbar {
width: 0px;
height: 0px;
width: 2px!important;
height: 2px!important;
}
</style>