-
zhangwei
2025-03-05 16213c0f85aa3ac8317797bf4a05fd12940e16d3
src/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue
@@ -52,9 +52,6 @@
            // #ifdef APP-NVUE
            width: 0, // nvue下才这么计算,vue下放到computed中,否则会因为延时造成闪烁
            // #endif
            // #ifdef MP-TOUTIAO
            width: '100%',
            // #endif
            classes: [], // 类名集合,用于判断是否显示右边和下边框
         };
      },
@@ -69,26 +66,16 @@
      },
      // #endif
      computed: {
         // #ifndef APP-NVUE || MP-TOUTIAO
         // vue下放到computed中,否则会因为延时造成闪烁
         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))
         }
      },