From 4b59ae9424b2c55276c883b70bcddda047f8c403 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 20 Sep 2018 14:58:10 +0800 Subject: [PATCH] [improvement] Cell: value should not has width when empty (#609) --- dist/field/index.js | 2 +- example/pages/dashboard/index.wxml | 1 - packages/cell/index.pcss | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/field/index.js b/dist/field/index.js index 4fb39fa2..b42679ac 100644 --- a/dist/field/index.js +++ b/dist/field/index.js @@ -66,7 +66,7 @@ create({ 'van-field--error': data.error, 'van-field__textarea': data.type === 'textarea', 'van-field__input--disabled': data.disabled, - [`van-field--${data.inputAlign}`]: data.inputAlign + [`van-field__input--${data.inputAlign}`]: data.inputAlign }); } }, diff --git a/example/pages/dashboard/index.wxml b/example/pages/dashboard/index.wxml index 8ee64a1b..76b7ba06 100644 --- a/example/pages/dashboard/index.wxml +++ b/example/pages/dashboard/index.wxml @@ -13,7 +13,6 @@ wx:for="{{ group.list }}" wx:key="item.title" is-link - title-width="200px" url="/pages{{ item.path }}/index" title="{{ item.title }}" > diff --git a/packages/cell/index.pcss b/packages/cell/index.pcss index 9f582a90..3528eced 100644 --- a/packages/cell/index.pcss +++ b/packages/cell/index.pcss @@ -32,6 +32,10 @@ &__title, &__value { flex: 1; + + &:empty { + display: none; + } } &__value {