diff --git a/src/address-edit/test/__snapshots__/demo.spec.js.snap b/src/address-edit/test/__snapshots__/demo.spec.js.snap index c434308f4..376043844 100644 --- a/src/address-edit/test/__snapshots__/demo.spec.js.snap +++ b/src/address-edit/test/__snapshots__/demo.spec.js.snap @@ -51,7 +51,11 @@ exports[`renders demo correctly 1`] = ` -
+
diff --git a/src/address-edit/test/__snapshots__/index.spec.js.snap b/src/address-edit/test/__snapshots__/index.spec.js.snap index 0a71ccce1..c0036ebe1 100644 --- a/src/address-edit/test/__snapshots__/index.spec.js.snap +++ b/src/address-edit/test/__snapshots__/index.spec.js.snap @@ -35,7 +35,9 @@ exports[`create a AddressEdit 1`] = ` -
+
`; @@ -88,7 +90,9 @@ exports[`create a AddressEdit with props 1`] = ` -
+
`; @@ -141,7 +145,9 @@ exports[`set-default 1`] = ` -
+
`; @@ -194,7 +200,9 @@ exports[`show area component 1`] = ` -
+
`; @@ -247,7 +255,9 @@ exports[`show area component 2`] = ` -
+
`; @@ -286,6 +296,8 @@ exports[`valid area placeholder confirm 1`] = ` -
+
`; diff --git a/src/address-list/test/__snapshots__/demo.spec.js.snap b/src/address-list/test/__snapshots__/demo.spec.js.snap index 46d2927fc..d52ece63a 100644 --- a/src/address-list/test/__snapshots__/demo.spec.js.snap +++ b/src/address-list/test/__snapshots__/demo.spec.js.snap @@ -40,7 +40,9 @@ exports[`renders demo correctly 1`] = ` -
+
diff --git a/src/address-list/test/__snapshots__/index.spec.js.snap b/src/address-list/test/__snapshots__/index.spec.js.snap index d9ffb7d07..4b8ac0806 100644 --- a/src/address-list/test/__snapshots__/index.spec.js.snap +++ b/src/address-list/test/__snapshots__/index.spec.js.snap @@ -22,6 +22,8 @@ exports[`unswitchable 1`] = ` -
+
`; diff --git a/src/button/index.less b/src/button/index.less index 0201d95c6..691f967f3 100644 --- a/src/button/index.less +++ b/src/button/index.less @@ -2,9 +2,7 @@ .van-button { position: relative; - display: inline-flex; - align-items: center; - justify-content: center; + display: inline-block; box-sizing: border-box; height: @button-default-height; margin: 0; @@ -125,7 +123,7 @@ } &--block { - display: flex; + display: block; width: 100%; } @@ -146,6 +144,15 @@ border-radius: 0; } + // align-items are ignored when flex container is a button in legacy safari + // see: https://bugs.webkit.org/show_bug.cgi?id=169700 + &__content { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + } + &__icon { min-width: 1em; font-size: 1.2em; diff --git a/src/button/index.tsx b/src/button/index.tsx index 48764640c..6b3c6e5c2 100644 --- a/src/button/index.tsx +++ b/src/button/index.tsx @@ -149,7 +149,7 @@ function Button( onTouchstart={onTouchstart} {...inherit(ctx)} > - {Content()} +
{Content()}
); } diff --git a/src/button/test/__snapshots__/demo.spec.js.snap b/src/button/test/__snapshots__/demo.spec.js.snap index eda6ae532..9d218df71 100644 --- a/src/button/test/__snapshots__/demo.spec.js.snap +++ b/src/button/test/__snapshots__/demo.spec.js.snap @@ -3,26 +3,84 @@ exports[`renders demo correctly 1`] = `
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
`; diff --git a/src/button/test/__snapshots__/index.spec.js.snap b/src/button/test/__snapshots__/index.spec.js.snap index e247ce2a6..239b474c2 100644 --- a/src/button/test/__snapshots__/index.spec.js.snap +++ b/src/button/test/__snapshots__/index.spec.js.snap @@ -1,12 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`icon-prefix prop 1`] = ` - + `; exports[`loading-size prop 1`] = ` `; diff --git a/src/calendar/test/__snapshots__/index.spec.js.snap b/src/calendar/test/__snapshots__/index.spec.js.snap index f8af63e92..378b78307 100644 --- a/src/calendar/test/__snapshots__/index.spec.js.snap +++ b/src/calendar/test/__snapshots__/index.spec.js.snap @@ -47,7 +47,9 @@ exports[`color prop when type is range 1`] = ` - + `; @@ -98,7 +100,9 @@ exports[`color prop when type is single 1`] = ` - + `; @@ -152,7 +156,9 @@ exports[`formatter prop 1`] = ` - + `; @@ -206,7 +212,9 @@ exports[`popup wrapper 2`] = ` - + @@ -259,7 +267,9 @@ exports[`row-height prop 1`] = ` - + `; diff --git a/src/card/test/__snapshots__/demo.spec.js.snap b/src/card/test/__snapshots__/demo.spec.js.snap index 7a2eae8bc..016ba0f01 100644 --- a/src/card/test/__snapshots__/demo.spec.js.snap +++ b/src/card/test/__snapshots__/demo.spec.js.snap @@ -77,11 +77,15 @@ exports[`renders demo correctly 1`] = ` + + diff --git a/src/checkbox/test/__snapshots__/demo.spec.js.snap b/src/checkbox/test/__snapshots__/demo.spec.js.snap index c0f82db6b..d0eee0534 100644 --- a/src/checkbox/test/__snapshots__/demo.spec.js.snap +++ b/src/checkbox/test/__snapshots__/demo.spec.js.snap @@ -116,11 +116,15 @@ exports[`renders demo correctly 1`] = ` 复选框 c -
+ + +
diff --git a/src/circle/test/__snapshots__/demo.spec.js.snap b/src/circle/test/__snapshots__/demo.spec.js.snap index 80e56effa..6e0db1b94 100644 --- a/src/circle/test/__snapshots__/demo.spec.js.snap +++ b/src/circle/test/__snapshots__/demo.spec.js.snap @@ -48,6 +48,10 @@ exports[`renders demo correctly 1`] = `
大小定制
-
+
`; diff --git a/src/contact-card/test/__snapshots__/demo.spec.js.snap b/src/contact-card/test/__snapshots__/demo.spec.js.snap index 5483ee003..dc45fe441 100644 --- a/src/contact-card/test/__snapshots__/demo.spec.js.snap +++ b/src/contact-card/test/__snapshots__/demo.spec.js.snap @@ -20,7 +20,9 @@ exports[`renders demo correctly 1`] = ` -
+
-
+
diff --git a/src/contact-card/test/__snapshots__/index.spec.js.snap b/src/contact-card/test/__snapshots__/index.spec.js.snap index 4425c0489..5c4e54037 100644 --- a/src/contact-card/test/__snapshots__/index.spec.js.snap +++ b/src/contact-card/test/__snapshots__/index.spec.js.snap @@ -12,6 +12,8 @@ exports[`ContactList render 1`] = ` -
+
`; diff --git a/src/coupon-list/test/__snapshots__/index.spec.js.snap b/src/coupon-list/test/__snapshots__/index.spec.js.snap index 915cc62fd..cbbd843d0 100644 --- a/src/coupon-list/test/__snapshots__/index.spec.js.snap +++ b/src/coupon-list/test/__snapshots__/index.spec.js.snap @@ -7,7 +7,9 @@ exports[`empty-image prop 1`] = `
- +
@@ -30,7 +32,9 @@ exports[`empty-image prop 1`] = `
-
+
`; @@ -57,7 +61,9 @@ exports[`render coupon list 1`] = `
- +
@@ -176,7 +182,9 @@ exports[`render coupon list 1`] = `
-
+
`; @@ -203,7 +211,9 @@ exports[`render empty coupon list 1`] = `
- +
@@ -230,6 +240,8 @@ exports[`render empty coupon list 1`] = `
-
+
`; diff --git a/src/dialog/test/__snapshots__/demo.spec.js.snap b/src/dialog/test/__snapshots__/demo.spec.js.snap index 0e32cfd65..d1c83443a 100644 --- a/src/dialog/test/__snapshots__/demo.spec.js.snap +++ b/src/dialog/test/__snapshots__/demo.spec.js.snap @@ -2,24 +2,38 @@ exports[`renders demo correctly 1`] = `
-
+
-
+ +
-
+ +
-
+ +
+
+ diff --git a/src/dialog/test/__snapshots__/index.spec.js.snap b/src/dialog/test/__snapshots__/index.spec.js.snap index 100a324a3..09ae657df 100644 --- a/src/dialog/test/__snapshots__/index.spec.js.snap +++ b/src/dialog/test/__snapshots__/index.spec.js.snap @@ -2,26 +2,38 @@ exports[`button color 1`] = ` `; exports[`button text 1`] = ` `; exports[`default slot 1`] = ` `; exports[`title slot 1`] = ` `; diff --git a/src/empty/test/__snapshots__/demo.spec.js.snap b/src/empty/test/__snapshots__/demo.spec.js.snap index fb3d618ca..a2ae408b9 100644 --- a/src/empty/test/__snapshots__/demo.spec.js.snap +++ b/src/empty/test/__snapshots__/demo.spec.js.snap @@ -44,9 +44,11 @@ exports[`renders demo correctly 1`] = `

描述文字

-
+
+ diff --git a/src/field/test/__snapshots__/demo.spec.js.snap b/src/field/test/__snapshots__/demo.spec.js.snap index 4372debf6..794067c85 100644 --- a/src/field/test/__snapshots__/demo.spec.js.snap +++ b/src/field/test/__snapshots__/demo.spec.js.snap @@ -99,9 +99,11 @@ exports[`renders demo correctly 1`] = `
短信验证码
-
+
+
diff --git a/src/form/test/__snapshots__/demo.spec.js.snap b/src/form/test/__snapshots__/demo.spec.js.snap index 341ad1e37..c978f58fe 100644 --- a/src/form/test/__snapshots__/demo.spec.js.snap +++ b/src/form/test/__snapshots__/demo.spec.js.snap @@ -16,9 +16,11 @@ exports[`renders demo correctly 1`] = `
-
+ +
@@ -41,9 +43,11 @@ exports[`renders demo correctly 1`] = `
-
+ +
@@ -208,9 +212,11 @@ exports[`renders demo correctly 1`] = `
-
+ + diff --git a/src/form/test/__snapshots__/events.spec.js.snap b/src/form/test/__snapshots__/events.spec.js.snap index 9904e678f..a20948ddc 100644 --- a/src/form/test/__snapshots__/events.spec.js.snap +++ b/src/form/test/__snapshots__/events.spec.js.snap @@ -13,6 +13,8 @@ exports[`failed event 1`] = `
B failed
- + `; diff --git a/src/form/test/__snapshots__/methods.spec.js.snap b/src/form/test/__snapshots__/methods.spec.js.snap index 03deea7e9..6c019b6b1 100644 --- a/src/form/test/__snapshots__/methods.spec.js.snap +++ b/src/form/test/__snapshots__/methods.spec.js.snap @@ -12,6 +12,8 @@ exports[`resetValidation method - reset one field 1`] = `
B failed
- + `; diff --git a/src/form/test/__snapshots__/props.spec.js.snap b/src/form/test/__snapshots__/props.spec.js.snap index d33e3b524..b708bbb89 100644 --- a/src/form/test/__snapshots__/props.spec.js.snap +++ b/src/form/test/__snapshots__/props.spec.js.snap @@ -93,6 +93,8 @@ exports[`validate-first prop 1`] = `
- + `; diff --git a/src/goods-action/test/__snapshots__/demo.spec.js.snap b/src/goods-action/test/__snapshots__/demo.spec.js.snap index 4c36ac40d..6a7f9e539 100644 --- a/src/goods-action/test/__snapshots__/demo.spec.js.snap +++ b/src/goods-action/test/__snapshots__/demo.spec.js.snap @@ -13,7 +13,11 @@ exports[`renders demo correctly 1`] = `
购物车 - +
@@ -32,7 +36,11 @@ exports[`renders demo correctly 1`] = `
12
店铺 -
+
@@ -51,7 +59,11 @@ exports[`renders demo correctly 1`] = `
已收藏 -
+
@@ -65,7 +77,11 @@ exports[`renders demo correctly 1`] = `
购物车 -
+ diff --git a/src/goods-action/test/__snapshots__/index.spec.js.snap b/src/goods-action/test/__snapshots__/index.spec.js.snap index c6108e99b..50696c6d1 100644 --- a/src/goods-action/test/__snapshots__/index.spec.js.snap +++ b/src/goods-action/test/__snapshots__/index.spec.js.snap @@ -1,6 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Button render default slot 1`] = ``; +exports[`Button render default slot 1`] = ` + +`; exports[`Icon render default slot 1`] = `
diff --git a/src/notify/test/__snapshots__/demo.spec.js.snap b/src/notify/test/__snapshots__/demo.spec.js.snap index 1ca33dc29..f55c7335b 100644 --- a/src/notify/test/__snapshots__/demo.spec.js.snap +++ b/src/notify/test/__snapshots__/demo.spec.js.snap @@ -2,10 +2,24 @@ exports[`renders demo correctly 1`] = `
-
+
-
+
-
+
`; diff --git a/src/overlay/test/__snapshots__/demo.spec.js.snap b/src/overlay/test/__snapshots__/demo.spec.js.snap index 11eab0ba7..2179861ea 100644 --- a/src/overlay/test/__snapshots__/demo.spec.js.snap +++ b/src/overlay/test/__snapshots__/demo.spec.js.snap @@ -2,10 +2,14 @@ exports[`renders demo correctly 1`] = `
-
+
-
+
diff --git a/src/sku/test/__snapshots__/demo.spec.js.snap b/src/sku/test/__snapshots__/demo.spec.js.snap index 3bbf590d9..7e7703f78 100644 --- a/src/sku/test/__snapshots__/demo.spec.js.snap +++ b/src/sku/test/__snapshots__/demo.spec.js.snap @@ -4,27 +4,35 @@ exports[`renders demo correctly 1`] = `
-
+
+
-
+
+
-
+
+
-
+
+ `; diff --git a/src/steps/test/__snapshots__/demo.spec.js.snap b/src/steps/test/__snapshots__/demo.spec.js.snap index cd11ee3e3..98a80d91e 100644 --- a/src/steps/test/__snapshots__/demo.spec.js.snap +++ b/src/steps/test/__snapshots__/demo.spec.js.snap @@ -27,7 +27,9 @@ exports[`renders demo correctly 1`] = `
- +
diff --git a/src/sticky/test/__snapshots__/demo.spec.js.snap b/src/sticky/test/__snapshots__/demo.spec.js.snap index 3fa91b535..07457da6f 100644 --- a/src/sticky/test/__snapshots__/demo.spec.js.snap +++ b/src/sticky/test/__snapshots__/demo.spec.js.snap @@ -4,24 +4,30 @@ exports[`renders demo correctly 1`] = `
-
+
+
-
+
+
-
+
+
diff --git a/src/submit-bar/test/__snapshots__/demo.spec.js.snap b/src/submit-bar/test/__snapshots__/demo.spec.js.snap index c026d9925..df6874505 100644 --- a/src/submit-bar/test/__snapshots__/demo.spec.js.snap +++ b/src/submit-bar/test/__snapshots__/demo.spec.js.snap @@ -5,7 +5,9 @@ exports[`renders demo correctly 1`] = `
-
合计:¥30.50
+
合计:¥30.50
@@ -14,7 +16,9 @@ exports[`renders demo correctly 1`] = `
你的收货地址不支持同城送, 我们已为你推荐快递
-
合计:¥30.50
+
合计:¥30.50
@@ -22,7 +26,9 @@ exports[`renders demo correctly 1`] = `
合计:¥30.50
@@ -39,7 +45,9 @@ exports[`renders demo correctly 1`] = `
全选 -
合计:¥30.50
+
合计:¥30.50
diff --git a/src/submit-bar/test/__snapshots__/index.spec.js.snap b/src/submit-bar/test/__snapshots__/index.spec.js.snap index 7c24b7229..5241284d9 100644 --- a/src/submit-bar/test/__snapshots__/index.spec.js.snap +++ b/src/submit-bar/test/__snapshots__/index.spec.js.snap @@ -3,21 +3,27 @@ exports[`decimal-length prop 1`] = `
-
合计:¥1.1
+
合计:¥1.1
`; exports[`disable safe-area-inset-bottom prop 1`] = `
-
+
`; exports[`disable submit 1`] = `
-
合计:¥0.01
+
合计:¥0.01
`; @@ -25,7 +31,9 @@ exports[`disable submit 1`] = ` exports[`suffix-label prop 1`] = `
-
Label¥1.11Suffix Label
+
Label¥1.11Suffix Label
`; @@ -33,18 +41,24 @@ exports[`suffix-label prop 1`] = ` exports[`text-align prop 1`] = `
-
合计:¥1.11
+
合计:¥1.11
`; exports[`top slot 1`] = ` -
top
+
top
`; exports[`without price 1`] = `
-
+
`; diff --git a/src/swipe-cell/test/__snapshots__/demo.spec.js.snap b/src/swipe-cell/test/__snapshots__/demo.spec.js.snap index 3763302b7..2e1757d61 100644 --- a/src/swipe-cell/test/__snapshots__/demo.spec.js.snap +++ b/src/swipe-cell/test/__snapshots__/demo.spec.js.snap @@ -6,12 +6,18 @@ exports[`renders demo correctly 1`] = `
-
+
单元格
内容
-
+
@@ -39,19 +45,25 @@ exports[`renders demo correctly 1`] = `
-
+
-
+
单元格
内容
-
+
diff --git a/src/toast/test/__snapshots__/demo.spec.js.snap b/src/toast/test/__snapshots__/demo.spec.js.snap index 36b7a85d1..f06b2697b 100644 --- a/src/toast/test/__snapshots__/demo.spec.js.snap +++ b/src/toast/test/__snapshots__/demo.spec.js.snap @@ -2,10 +2,28 @@ exports[`renders demo correctly 1`] = `
-
-
-
-
-
+
+
+
+
+
`; diff --git a/src/uploader/test/__snapshots__/demo.spec.js.snap b/src/uploader/test/__snapshots__/demo.spec.js.snap index 4470b6b31..34b43c532 100644 --- a/src/uploader/test/__snapshots__/demo.spec.js.snap +++ b/src/uploader/test/__snapshots__/demo.spec.js.snap @@ -95,10 +95,12 @@ exports[`renders demo correctly 1`] = `
-
+
+