From 0392db181713c9f12bcc9d89408439d983fbaf78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Mon, 29 Apr 2019 14:31:13 +0800 Subject: [PATCH] [breaking change] Button: remove bottom-action prop --- docs/markdown/v2-progress-tracking.md | 8 ++++++-- docs/src/docs-entry.js | 1 + packages/button/index.less | 15 --------------- packages/button/index.tsx | 5 +---- packages/sku/components/SkuActions.tsx | 13 ++++++++++--- packages/sku/demo/index.vue | 9 ++++++--- packages/sku/en-US.md | 19 +++++++++++++++++-- packages/sku/zh-CN.md | 19 +++++++++++++++++-- packages/style/var.less | 4 ---- 9 files changed, 58 insertions(+), 35 deletions(-) diff --git a/docs/markdown/v2-progress-tracking.md b/docs/markdown/v2-progress-tracking.md index 8e3974b47..900465b07 100644 --- a/docs/markdown/v2-progress-tracking.md +++ b/docs/markdown/v2-progress-tracking.md @@ -2,11 +2,15 @@ ### Actionsheet -- [x] 重命名为 ActionSheet +- [x] 重命名为 ActionSheet + +改动原因:规范命名 ### Button -- [ ] 移除 bottom-action 属性 +- [x] 移除 bottom-action 属性 + +改动原因:冗余属性,可以被 square 和 size="large" 代替 ### Field diff --git a/docs/src/docs-entry.js b/docs/src/docs-entry.js index 41b7d784f..138178248 100644 --- a/docs/src/docs-entry.js +++ b/docs/src/docs-entry.js @@ -12,6 +12,7 @@ export default { 'style-guide.zh-CN': () => import('../markdown/style-guide.zh-CN.md'), 'theme.en-US': () => import('../markdown/theme.en-US.md'), 'theme.zh-CN': () => import('../markdown/theme.zh-CN.md'), + 'v2-progress-tracking': () => import('../markdown/v2-progress-tracking.md'), 'action-sheet.en-US': () => import('../../packages/action-sheet/en-US.md'), 'action-sheet.zh-CN': () => import('../../packages/action-sheet/zh-CN.md'), 'address-edit.en-US': () => import('../../packages/address-edit/en-US.md'), diff --git a/packages/button/index.less b/packages/button/index.less index 79f11d237..09dbc8031 100644 --- a/packages/button/index.less +++ b/packages/button/index.less @@ -131,21 +131,6 @@ display: block; } - &--bottom-action { - border: 0; - width: 100%; - height: 50px; - font-size: 16px; - line-height: 50px; - border-radius: 0; - color: @button-bottom-action-default-color; - background-color: @button-bottom-action-default-background-color; - - &.van-button--primary { - background-color: @button-bottom-action-primary-background-color; - } - } - &--disabled { opacity: @button-disabled-opacity; } diff --git a/packages/button/index.tsx b/packages/button/index.tsx index eea20c878..63071fe43 100644 --- a/packages/button/index.tsx +++ b/packages/button/index.tsx @@ -26,7 +26,6 @@ export type ButtonProps = RouteProps & { nativeType?: string; loadingSize: string; loadingText?: string; - bottomAction?: boolean; }; export type ButtonEvents = { @@ -65,8 +64,7 @@ function Button( block: props.block, plain: props.plain, round: props.round, - square: props.square, - 'bottom-action': props.bottomAction + square: props.square } ]), { 'van-hairline--surround': hairline } @@ -108,7 +106,6 @@ Button.props = { disabled: Boolean, nativeType: String, loadingText: String, - bottomAction: Boolean, tag: { type: String, default: 'button' diff --git a/packages/sku/components/SkuActions.tsx b/packages/sku/components/SkuActions.tsx index 7c6f3daf2..4cd0655ec 100644 --- a/packages/sku/components/SkuActions.tsx +++ b/packages/sku/components/SkuActions.tsx @@ -27,11 +27,18 @@ function SkuActions( return (
{props.showAddCartBtn && ( -
+ diff --git a/packages/style/var.less b/packages/style/var.less index 3e7ddf3a6..d8884392a 100644 --- a/packages/style/var.less +++ b/packages/style/var.less @@ -77,10 +77,6 @@ @button-warning-color: @white; @button-warning-background-color: @orange; @button-warning-border-color: @orange; -@button-bottom-action-default-color: @white; -@button-bottom-action-default-background-color: @orange; -@button-bottom-action-primary-color: @white; -@button-bottom-action-primary-background-color: @red; @button-border-width: 1px; @button-border-radius: 2px; @button-round-border-radius: 10em;