mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
types(Cell): add CellSize type (#9802)
This commit is contained in:
@@ -23,11 +23,13 @@ import { Icon } from '../icon';
|
|||||||
|
|
||||||
const [name, bem] = createNamespace('cell');
|
const [name, bem] = createNamespace('cell');
|
||||||
|
|
||||||
|
export type CellSize = 'normal' | 'large';
|
||||||
|
|
||||||
export type CellArrowDirection = 'up' | 'down' | 'left' | 'right';
|
export type CellArrowDirection = 'up' | 'down' | 'left' | 'right';
|
||||||
|
|
||||||
export const cellSharedProps = {
|
export const cellSharedProps = {
|
||||||
icon: String,
|
icon: String,
|
||||||
size: String as PropType<'large'>,
|
size: String as PropType<CellSize>,
|
||||||
title: numericProp,
|
title: numericProp,
|
||||||
value: numericProp,
|
value: numericProp,
|
||||||
label: numericProp,
|
label: numericProp,
|
||||||
|
@@ -197,7 +197,12 @@ app.use(CellGroup);
|
|||||||
The component exports the following type definitions:
|
The component exports the following type definitions:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import type { CellProps, CellGroupProps, CellArrowDirection } from 'vant';
|
import type {
|
||||||
|
CellSize,
|
||||||
|
CellProps,
|
||||||
|
CellGroupProps,
|
||||||
|
CellArrowDirection,
|
||||||
|
} from 'vant';
|
||||||
```
|
```
|
||||||
|
|
||||||
## Theming
|
## Theming
|
||||||
|
@@ -202,7 +202,12 @@ app.use(CellGroup);
|
|||||||
组件导出以下类型定义:
|
组件导出以下类型定义:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import type { CellProps, CellGroupProps, CellArrowDirection } from 'vant';
|
import type {
|
||||||
|
CellSize,
|
||||||
|
CellProps,
|
||||||
|
CellGroupProps,
|
||||||
|
CellArrowDirection,
|
||||||
|
} from 'vant';
|
||||||
```
|
```
|
||||||
|
|
||||||
## 主题定制
|
## 主题定制
|
||||||
|
@@ -3,4 +3,4 @@ import _Cell from './Cell';
|
|||||||
|
|
||||||
export const Cell = withInstall(_Cell);
|
export const Cell = withInstall(_Cell);
|
||||||
export default Cell;
|
export default Cell;
|
||||||
export type { CellProps, CellArrowDirection } from './Cell';
|
export type { CellSize, CellProps, CellArrowDirection } from './Cell';
|
||||||
|
Reference in New Issue
Block a user