From 2d43a1df3f5ba42710e6d21c27d1e13bdb8dfd56 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期一, 24 三月 2025 09:23:08 +0800 Subject: [PATCH] - --- src/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue | 27 +++++++-------------------- 1 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue b/src/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue index 867e897..43c5ce7 100644 --- a/src/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue +++ b/src/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue @@ -52,9 +52,6 @@ // #ifdef APP-NVUE width: 0, // nvue涓嬫墠杩欎箞璁$畻锛寁ue涓嬫斁鍒癱omputed涓紝鍚﹀垯浼氬洜涓哄欢鏃堕�犳垚闂儊 // #endif - // #ifdef MP-TOUTIAO - width: '100%', - // #endif classes: [], // 绫诲悕闆嗗悎锛岀敤浜庡垽鏂槸鍚︽樉绀哄彸杈瑰拰涓嬭竟妗� }; }, @@ -69,26 +66,16 @@ }, // #endif computed: { - // #ifndef APP-NVUE || MP-TOUTIAO - // vue涓嬫斁鍒癱omputed涓紝鍚﹀垯浼氬洜涓哄欢鏃堕�犳垚闂儊 - width() { - if (this.parentData.col > 0) { - return 100 / Number(this.parentData.col) + '%' - } else { - return 0; - } - }, - // #endif itemStyle() { const style = { - background: this.bgColor, - // #ifndef MP - width: this.width - // #endif - // #ifdef MP - width: '100%' - // #endif + background: this.bgColor } + // #ifdef APP-NVUE + style['width'] = this.width + // #endif + // #ifndef APP-NVUE + style['width'] = '100%' + // #endif return deepMerge(style, addStyle(this.customStyle)) } }, -- Gitblit v1.9.1