mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-18 12:34:25 +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",
|
||||
"version": "0.5.4",
|
||||
"version": "0.5.5",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -31,7 +31,7 @@
|
||||
<slot name="table-operation-search-right" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="n-advance-table__tbody">
|
||||
<div ref="tbodyWrapper" class="n-advance-table__tbody">
|
||||
<n-table
|
||||
ref="header"
|
||||
style="padding:0;border-bottom-left-radius:0;border-bottom-right-radius:0;"
|
||||
@ -618,8 +618,8 @@ export default {
|
||||
computeScollBar () {
|
||||
this.$nextTick(() => {
|
||||
this.tbodyWidth = this.relTable.offsetWidth
|
||||
this.scrollBarWidth = this.wrapperWidth - this.tbodyWidth
|
||||
console.log('TCL: mounted -> this.scrollBarWidth', this.wrapperWidth, this.tbodyWidth)
|
||||
this.scrollBarWidth = this.tbodyWrapperWidth - this.tbodyWidth
|
||||
// console.log('TCL: mounted -> this.scrollBarWidth', this.wrapperWidth, this.tbodyWidth)
|
||||
})
|
||||
},
|
||||
computeCustomWidthStl (column) {
|
||||
@ -658,6 +658,7 @@ export default {
|
||||
init () {
|
||||
this.$nextTick(() => {
|
||||
this.wrapperWidth = this.$refs.tableWrapper.offsetWidth
|
||||
this.tbodyWrapperWidth = this.$refs.tbodyWrapper.clientWidth
|
||||
this.computeScollBar()
|
||||
|
||||
// console.log(this.relTable.offsetWidth)
|
||||
|
Loading…
Reference in New Issue
Block a user