mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-30 12:52:43 +08:00
fixed(advance-table): light-ui border width cause scrollbar width computed incorrect
This commit is contained in:
parent
f4371053f0
commit
62373a1344
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "naive-ui",
|
"name": "naive-ui",
|
||||||
"version": "0.5.4",
|
"version": "0.5.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<slot name="table-operation-search-right" />
|
<slot name="table-operation-search-right" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="n-advance-table__tbody">
|
<div ref="tbodyWrapper" class="n-advance-table__tbody">
|
||||||
<n-table
|
<n-table
|
||||||
ref="header"
|
ref="header"
|
||||||
style="padding:0;border-bottom-left-radius:0;border-bottom-right-radius:0;"
|
style="padding:0;border-bottom-left-radius:0;border-bottom-right-radius:0;"
|
||||||
@ -618,8 +618,8 @@ export default {
|
|||||||
computeScollBar () {
|
computeScollBar () {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.tbodyWidth = this.relTable.offsetWidth
|
this.tbodyWidth = this.relTable.offsetWidth
|
||||||
this.scrollBarWidth = this.wrapperWidth - this.tbodyWidth
|
this.scrollBarWidth = this.tbodyWrapperWidth - this.tbodyWidth
|
||||||
console.log('TCL: mounted -> this.scrollBarWidth', this.wrapperWidth, this.tbodyWidth)
|
// console.log('TCL: mounted -> this.scrollBarWidth', this.wrapperWidth, this.tbodyWidth)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
computeCustomWidthStl (column) {
|
computeCustomWidthStl (column) {
|
||||||
@ -658,6 +658,7 @@ export default {
|
|||||||
init () {
|
init () {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.wrapperWidth = this.$refs.tableWrapper.offsetWidth
|
this.wrapperWidth = this.$refs.tableWrapper.offsetWidth
|
||||||
|
this.tbodyWrapperWidth = this.$refs.tbodyWrapper.clientWidth
|
||||||
this.computeScollBar()
|
this.computeScollBar()
|
||||||
|
|
||||||
// console.log(this.relTable.offsetWidth)
|
// console.log(this.relTable.offsetWidth)
|
||||||
|
Loading…
Reference in New Issue
Block a user