[new feature] Collapse: add size prop (#2946)

This commit is contained in:
neverland 2019-03-11 20:48:19 +08:00 committed by GitHub
parent e553c6e0dd
commit b971ddfb7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,6 @@ import { Mods } from '../utils/use/bem';
export type CellProps = RouteProps & export type CellProps = RouteProps &
SharedCellProps & { SharedCellProps & {
size?: string;
clickable?: boolean; clickable?: boolean;
arrowDirection?: string; arrowDirection?: string;
}; };
@ -102,7 +101,6 @@ function Cell(
Cell.props = { Cell.props = {
...cellProps, ...cellProps,
...routeProps, ...routeProps,
size: String,
clickable: Boolean, clickable: Boolean,
arrowDirection: String arrowDirection: String
}; };

View File

@ -1,5 +1,6 @@
export type SharedCellProps = { export type SharedCellProps = {
icon?: string; icon?: string;
size?: string;
border: boolean; border: boolean;
center?: boolean; center?: boolean;
isLink?: boolean; isLink?: boolean;
@ -14,6 +15,7 @@ export type SharedCellProps = {
export const cellProps = { export const cellProps = {
icon: String, icon: String,
size: String,
center: Boolean, center: Boolean,
isLink: Boolean, isLink: Boolean,
required: Boolean, required: Boolean,

View File

@ -91,6 +91,7 @@ export default {
|------|------|------|------| |------|------|------|------|
| name | Name | `String | Number` | `index` | | name | Name | `String | Number` | `index` |
| icon | Left Icon | `String` | - | | icon | Left Icon | `String` | - |
| size | Title sizecan be set to `large` | `String` | - |
| title | Title | `String | Number` | - | | title | Title | `String | Number` | - |
| value | Right text | `String | Number` | - | | value | Right text | `String | Number` | - |
| label | Description below the title | `String` | - | | label | Description below the title | `String` | - |

View File

@ -103,6 +103,7 @@ export default {
|------|------|------|------|------|------| |------|------|------|------|------|------|
| name | 唯一标识符,默认为索引值 | `String | Number` | `index` | - | | name | 唯一标识符,默认为索引值 | `String | Number` | `index` | - |
| icon | 标题栏左侧图标名称或图片链接,可选值见 Icon 组件 | `String` | - | 1.2.1 | | icon | 标题栏左侧图标名称或图片链接,可选值见 Icon 组件 | `String` | - | 1.2.1 |
| size | 标题栏大小,可选值为 `large` | `String` | - | 1.6.9 |
| title | 标题栏左侧内容 | `String | Number` | - | - | | title | 标题栏左侧内容 | `String | Number` | - | - |
| value | 标题栏右侧内容 | `String | Number` | - | 1.2.1 | | value | 标题栏右侧内容 | `String | Number` | - | 1.2.1 |
| label | 标题栏描述信息 | `String | Number` | - | 1.2.1 | | label | 标题栏描述信息 | `String | Number` | - | 1.2.1 |

View File

@ -10,7 +10,6 @@ export default sfc({
props: { props: {
...cellProps, ...cellProps,
size: String,
error: Boolean, error: Boolean,
leftIcon: String, leftIcon: String,
rightIcon: String, rightIcon: String,