2019-02-02 17:04:02 +08:00

39 lines
700 B
JavaScript

import { use } from '../utils';
import Cell from '../cell';
import Switch from '../switch';
import SwitchMixin from '../mixins/switch';
const [sfc, bem] = use('switch-cell');
export default sfc(
{
mixins: [SwitchMixin],
props: {
title: String,
border: Boolean,
size: {
type: String,
default: '24px'
}
},
render(h, context, inherit) {
const { props } = context;
return (
<Cell
center
title={props.title}
border={props.border}
class={bem()}
{...inherit}
>
<Switch {...{ props, on: context.listeners }} />
</Cell>
);
}
},
true
);