From 341643a87e86d1ced94d9aef0f0a18b8315a3491 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Wed, 8 Mar 2023 17:16:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/layout/AiDvTable/AiDvTable.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/layout/AiDvTable/AiDvTable.vue b/components/layout/AiDvTable/AiDvTable.vue index 9546946d..ce7f3e25 100644 --- a/components/layout/AiDvTable/AiDvTable.vue +++ b/components/layout/AiDvTable/AiDvTable.vue @@ -5,7 +5,9 @@ v-for="(item, index) in header" :key="index" :style="{ - width: item.width + 'px', flex: item.width ? 'inherit' : 1}"> + width: item.width + 'px', + flex: item.width ? 'inherit' : 1 + }"> {{ item.v }} @@ -75,12 +77,13 @@ }) this.header = value.map(v => { + console.log((Number(v.width))) return { v: v[headerKey], - width: v.width || '' + width: Number(v.width || 0) ? (Number(v.width || 0) + (this.isShowIndex === '1' ? 0 : 0)) : '' } }) - console.log(this.header) + this.body = bodyKey.map(v => { return value.map(e => { return { @@ -125,7 +128,7 @@ .body { height: calc(100% - 40px); - padding: 10px 12px; + padding: 10px 20px; overflow-y: auto; box-sizing: border-box; .row {