[new feature] SwitchCell: add cell-size prop

This commit is contained in:
陈嘉涵
2019-04-30 15:30:24 +08:00
parent 95925ab328
commit 70351dc4f0
8 changed files with 36 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ export type SwitchCellProps = SharedSwitchProps & {
size: string;
title?: string;
border?: boolean;
cellSize?: string;
};
const [sfc, bem] = use('switch-cell');
@@ -25,9 +26,10 @@ function SwitchCell(
return (
<Cell
center
size={props.cellSize}
title={props.title}
border={props.border}
class={bem()}
class={bem([props.cellSize])}
{...inherit(ctx)}
>
<Switch {...{ props, on: ctx.listeners }} />
@@ -38,6 +40,7 @@ function SwitchCell(
SwitchCell.props = {
...switchProps,
title: String,
cellSize: String,
border: {
type: Boolean,
default: true