diff --git a/docs/markdown/changelog.en-US.md b/docs/markdown/changelog.en-US.md index 212c991c0..4c5e15289 100644 --- a/docs/markdown/changelog.en-US.md +++ b/docs/markdown/changelog.en-US.md @@ -1,5 +1,31 @@ # Changelog +### [v2.3.0-beta.2](https://github.com/youzan/vant/tree/v2.3.0-beta.2) +`2019-12-06` + +**Style** + +Upgrading the style of business components: + +- CouponList + +**Features** + +- CouponList: add show-count prop [\#5139](https://github.com/youzan/vant/pull/5139) + +**Bug Fixes** + +- fix Sku stepper value must be integer [\#5202](https://github.com/youzan/vant/pull/5202) +- fix Sku stepper should not emit invalid num [\#5210](https://github.com/youzan/vant/pull/5210) +- fix Card incorrect price font-family [\#5194](https://github.com/youzan/vant/pull/5194) +- fix AddressList incorrect horizontal padding [\#5204](https://github.com/youzan/vant/pull/5204) +- fix Picker should not submit form [\#5182](https://github.com/youzan/vant/pull/5182) +- fix Stepper should not submit form [\#5183](https://github.com/youzan/vant/pull/5183) +- fix ActionSheet should not submit form [\#5181](https://github.com/youzan/vant/pull/5181) +- fix Uploader not trigger oversize event when upload same file [\#5177](https://github.com/youzan/vant/pull/5177) +- fix less import issue [\#5157](https://github.com/youzan/vant/pull/5157) + + ### [v2.3.0-beta.1](https://github.com/youzan/vant/tree/v2.3.0-beta.1) `2019-11-30` @@ -19,11 +45,11 @@ Upgrading the style of business components: - Card: add price-top slot [\#5134](https://github.com/youzan/vant/pull/5134) - Circle: add stroke-linecap prop [\#5087](https://github.com/youzan/vant/pull/5087) - CountDown: support SS and S format [\#5154](https://github.com/youzan/vant/pull/5154) -- Sku: add new startSaleNum prop [\#5105](https://github.com/youzan/vant/pull/5105) +- Sku: add new start-sale-num prop [\#5105](https://github.com/youzan/vant/pull/5105) - SubmitBar: add text-align prop [\#5130](https://github.com/youzan/vant/pull/5130) - AddressList: add default-tag-text prop [\#5106](https://github.com/youzan/vant/pull/5106) - ContactList: add default-tag-text prop [\#5089](https://github.com/youzan/vant/pull/5089) -- ContactCard: add show-set-default prop [\#5083](https://github.com/youzan/vant/pull/5083) +- ContactCard: add show-set-default、set-default-label prop [\#5083](https://github.com/youzan/vant/pull/5083) - Toast: improve type definitions [\#5086](https://github.com/youzan/vant/pull/5086) **Bug Fixes** diff --git a/docs/markdown/changelog.zh-CN.md b/docs/markdown/changelog.zh-CN.md index b998447d2..0ba5ea697 100644 --- a/docs/markdown/changelog.zh-CN.md +++ b/docs/markdown/changelog.zh-CN.md @@ -11,6 +11,32 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。 - 主版本号:发布时间不定,包含不兼容更新,预计下一个主版本会与 Vue 3.0 同期发布。 +### [v2.3.0-beta.2](https://github.com/youzan/vant/tree/v2.3.0-beta.2) +`2019-12-06` + +**Style** + +升级以下业务组件的样式: + +- CouponList + +**Features** + +- CouponList: 新增 show-count 属性 [\#5139](https://github.com/youzan/vant/pull/5139) + +**Bug Fixes** + +- 修复 Sku 步进器可能输入小数的问题 [\#5202](https://github.com/youzan/vant/pull/5202) +- 修复 Sku 步进器事件可能抛出小数的问题 [\#5210](https://github.com/youzan/vant/pull/5210) +- 修复 Card 价格字体错误的问题 [\#5194](https://github.com/youzan/vant/pull/5194) +- 修复 AddressList 左右边距错误的问题 [\#5204](https://github.com/youzan/vant/pull/5204) +- 修复 Picker 按钮会提交表单的问题 [\#5182](https://github.com/youzan/vant/pull/5182) +- 修复 Stepper 按钮会提交表单的问题 [\#5183](https://github.com/youzan/vant/pull/5183) +- 修复 ActionSheet 按钮会提交表单的问题 [\#5181](https://github.com/youzan/vant/pull/5181) +- 修复 Uploader 重复上传同张图片时不会触发 oversize 事件的问题 [\#5177](https://github.com/youzan/vant/pull/5177) +- 修复主题定制时使用低版本 Less 会报错的问题 [\#5157](https://github.com/youzan/vant/pull/5157) + + ### [v2.3.0-beta.1](https://github.com/youzan/vant/tree/v2.3.0-beta.1) `2019-11-30` @@ -34,7 +60,7 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。 - SubmitBar: 新增 text-align 属性 [\#5130](https://github.com/youzan/vant/pull/5130) - AddressList: 新增 default-tag-text 属性 [\#5106](https://github.com/youzan/vant/pull/5106) - ContactList: 新增 default-tag-text 属性 [\#5089](https://github.com/youzan/vant/pull/5089) -- ContactCard: 新增 show-set-default 属性 [\#5083](https://github.com/youzan/vant/pull/5083) +- ContactCard: 新增 show-set-default、set-default-label 属性 [\#5083](https://github.com/youzan/vant/pull/5083) - Toast: 完善 TS 类型定义 [\#5086](https://github.com/youzan/vant/pull/5086) **Bug Fixes** diff --git a/package.json b/package.json index 9ab5a23ad..803f66b57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vant", - "version": "2.3.0-beta.1", + "version": "2.3.0-beta.2", "description": "Mobile UI Components built on Vue", "main": "lib/index.js", "module": "es/index.js", diff --git a/src/address-list/README.md b/src/address-list/README.md index 7187257af..a95977951 100644 --- a/src/address-list/README.md +++ b/src/address-list/README.md @@ -77,7 +77,7 @@ export default { | disabled-text | Disabled text | *string* | - | - | | switchable | Whether to allow switch address | *boolean* | `true` | - | | add-button-text | Add button text | *string* | `Add new address` | - | -| default-tag-text | Default tag text | *string* | - | - | +| default-tag-text | Default tag text | *string* | - | 2.3.0 | ### Events diff --git a/src/address-list/README.zh-CN.md b/src/address-list/README.zh-CN.md index 1bdc323bb..4784b9e06 100644 --- a/src/address-list/README.zh-CN.md +++ b/src/address-list/README.zh-CN.md @@ -78,7 +78,7 @@ export default { | disabled-text | 不可配送提示文案 | *string* | - | - | | switchable | 是否允许切换地址 | *boolean* | `true` | - | | add-button-text | 底部按钮文字 | *string* | `新增地址` | - | -| default-tag-text | 默认地址标签文字 | *string* | - | - | +| default-tag-text | 默认地址标签文字 | *string* | - | 2.3.0 | ### Events diff --git a/src/card/index.less b/src/card/index.less index 86df44a08..d9bbedee6 100644 --- a/src/card/index.less +++ b/src/card/index.less @@ -64,11 +64,16 @@ display: inline-block; color: @card-price-color; font-weight: @font-weight-bold; + font-size: @card-price-font-size; + } - &--integer { - font-size: @card-price-integer-font-size; - font-family: @card-price-font-family; - } + &__price-integer { + font-size: @card-price-integer-font-size; + font-family: @card-price-font-family; + } + + &__price-decimal { + font-family: @card-price-font-family; } &__origin-price { diff --git a/src/card/index.tsx b/src/card/index.tsx index 2dc3cc48e..bb34138a9 100644 --- a/src/card/index.tsx +++ b/src/card/index.tsx @@ -101,7 +101,11 @@ function Card( } if (props.title) { - return
{props.title}
; + return ( +
+ {props.title} +
+ ); } } @@ -118,11 +122,11 @@ function Card( function PriceContent() { const priceArr = props.price!.toString().split('.'); return ( -
- {props.currency} - {priceArr[0]}. - {priceArr[1]} -
+
+ {props.currency} + {priceArr[0]}. + {priceArr[1]} +
); } @@ -149,7 +153,11 @@ function Card( function Num() { if (showNum) { - return
{slots.num ? slots.num() : `x${props.num}`}
; + return ( +
+ {slots.num ? slots.num() : `x${props.num}`} +
+ ); } } diff --git a/src/card/test/__snapshots__/demo.spec.js.snap b/src/card/test/__snapshots__/demo.spec.js.snap index 77352ba68..fe11d3433 100644 --- a/src/card/test/__snapshots__/demo.spec.js.snap +++ b/src/card/test/__snapshots__/demo.spec.js.snap @@ -17,7 +17,7 @@ exports[`renders demo correctly 1`] = `
-
¥2.00
+
¥2.00
x2
@@ -41,7 +41,7 @@ exports[`renders demo correctly 1`] = `
-
¥2.00
+
¥2.00
¥ 10.00
x2
@@ -70,7 +70,7 @@ exports[`renders demo correctly 1`] = `
-
¥2.00
+
¥2.00
x2
diff --git a/src/contact-card/README.md b/src/contact-card/README.md index e1e2d3e1e..d082319ac 100644 --- a/src/contact-card/README.md +++ b/src/contact-card/README.md @@ -155,7 +155,7 @@ export default { | v-model | Id of chosen contact | *string \| number* | - | - | | list | Contact list | *Contact[]* | `[]` | - | | add-text | Add button text | *string* | `Add new contact` | - | -| default-tag-text | Default tag text | *string* | - | - | +| default-tag-text | Default tag text | *string* | - | 2.3.0 | ### ContactList Events @@ -175,8 +175,8 @@ export default { | is-saving | Whether to show save button loading status | *boolean* | `false` | - | | is-deleting | Whether to show delete button loading status | *boolean* | `false` | - | | tel-validator | The method to validate tel | *(tel: string) => boolean* | - | - | -| show-set-default | Whether to show default contact switch | *boolean* | `false` | - | -| set-default-label | default contact switch label | *string* | - | - | +| show-set-default | Whether to show default contact switch | *boolean* | `false` | 2.3.0 | +| set-default-label | default contact switch label | *string* | - | 2.3.0 | ### ContactEdit Events diff --git a/src/contact-card/README.zh-CN.md b/src/contact-card/README.zh-CN.md index c5883b390..d77059e1e 100644 --- a/src/contact-card/README.zh-CN.md +++ b/src/contact-card/README.zh-CN.md @@ -159,7 +159,7 @@ export default { | v-model | 当前选中联系人的 id | *string \| number* | - | - | | list | 联系人列表 | *Contact[]* | `[]` | - | | add-text | 新建按钮文案 | *string* | `新建联系人` | - | -| default-tag-text | 默认联系人标签文案 | *string* | - | - | +| default-tag-text | 默认联系人标签文案 | *string* | - | 2.3.0 | ### ContactList Events @@ -178,8 +178,8 @@ export default { | is-saving | 是否显示保存按钮加载动画 | *boolean* | `false` | - | | is-deleting | 是否显示删除按钮加载动画 | *boolean* | `false` | - | | tel-validator | 手机号格式校验函数 | *(tel: string) => boolean* | - | - | -| show-set-default | 是否显示默认联系人栏 | *boolean* | `false` | - | -| set-default-label | 默认联系人栏文案 | *string* | - | - | +| show-set-default | 是否显示默认联系人栏 | *boolean* | `false` | 2.3.0 | +| set-default-label | 默认联系人栏文案 | *string* | - | 2.3.0 | ### ContactEdit Events diff --git a/src/coupon-list/README.md b/src/coupon-list/README.md index 7704d3791..1ab147a2e 100644 --- a/src/coupon-list/README.md +++ b/src/coupon-list/README.md @@ -99,7 +99,7 @@ export default { | input-placeholder | Input placeholder | *string* | `Coupon code` | - | | currency | Currency symbol | *string* | `¥` | - | | empty-image | Placeholder image when list is empty | *string* | `https://img.yzcdn.cn/vant/coupon-empty.png` | - | -| show-count | Whether to show coupon count in tab title | *boolean* | `true` | - | +| show-count | Whether to show coupon count in tab title | *boolean* | `true` | 2.3.0 | ### CouponList Events diff --git a/src/coupon-list/README.zh-CN.md b/src/coupon-list/README.zh-CN.md index f8dd8bc9b..647cdd39a 100644 --- a/src/coupon-list/README.zh-CN.md +++ b/src/coupon-list/README.zh-CN.md @@ -101,7 +101,7 @@ export default { | show-exchange-bar | 是否展示兑换栏 | *boolean* | `true` | - | | currency | 货币符号 | *string* | `¥` | - | | empty-image | 列表为空时的占位图 | *string* | `https://img.yzcdn.cn/vant/coupon-empty.png` | 2.1.0 | -| show-count | 是否展示可用 / 不可用数量 | *boolean* | `true` | - | +| show-count | 是否展示可用 / 不可用数量 | *boolean* | `true` | 2.3.0 | ### CouponList Events diff --git a/src/icon/README.md b/src/icon/README.md index c25a1e656..f17477afb 100644 --- a/src/icon/README.md +++ b/src/icon/README.md @@ -16,7 +16,7 @@ Vue.use(Icon); Use `name` prop to set icon name or icon URL ```html - + ``` @@ -27,9 +27,9 @@ Use `dot` prop, a small red dot will be displayed in the upper right corner of t Use `info` prop, the info will be displayed in the upper right corner of the icon. ```html - - - + + + ``` ### Icon Color @@ -37,8 +37,8 @@ Use `info` prop, the info will be displayed in the upper right corner of the ico Use `color` prop to set icon color ```html - - + + ``` ### Icon Size @@ -46,8 +46,8 @@ Use `color` prop to set icon color Use `size` prop to set icon size ```html - - + + ``` ### Use local font file diff --git a/src/icon/README.zh-CN.md b/src/icon/README.zh-CN.md index 168f0b41b..b3a103404 100644 --- a/src/icon/README.zh-CN.md +++ b/src/icon/README.zh-CN.md @@ -20,7 +20,7 @@ Vue.use(Icon); `Icon`的`name`属性支持传入图标名称或图片链接,所有可用的图标名称见右侧示例 ```html - + ``` @@ -29,28 +29,27 @@ Vue.use(Icon); 设置`dot`属性后,会在图标右上角展示一个小红点。设置`info`属性后,会在图标右上角展示相应的徽标 ```html - - - + + + ``` - ### 图标颜色 `Icon`的`color`属性用来设置图标的颜色 ```html - - + + ``` ### 图标大小 -`Icon`的`size`属性用来设置图标的尺寸大小 +`Icon`的`size`属性用来设置图标的尺寸大小,默认单位为`px` ```html - - + + ``` ### 使用本地字体文件 diff --git a/src/icon/demo/index.vue b/src/icon/demo/index.vue index 6e5086ea8..5afc03bf5 100644 --- a/src/icon/demo/index.vue +++ b/src/icon/demo/index.vue @@ -1,76 +1,89 @@