mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[new feature] Collapse: add size prop (#2946)
This commit is contained in:
parent
e553c6e0dd
commit
b971ddfb7b
@ -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
|
||||||
};
|
};
|
||||||
|
@ -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,
|
||||||
|
@ -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 size,can 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` | - |
|
||||||
|
@ -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 |
|
||||||
|
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user