index.js 882 B

1234567891011121314151617181920212223242526272829303132333435
  1. import _extends from "@babel/runtime/helpers/esm/extends";
  2. import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
  3. import { use } from '../utils';
  4. import { inherit } from '../utils/functional';
  5. import Cell from '../cell';
  6. import Switch from '../switch';
  7. import { switchProps } from '../switch/shared'; // Types
  8. var _use = use('switch-cell'),
  9. sfc = _use[0],
  10. bem = _use[1];
  11. function SwitchCell(h, props, slots, ctx) {
  12. return h(Cell, _mergeJSXProps([{
  13. "attrs": {
  14. "center": true,
  15. "title": props.title,
  16. "border": props.border
  17. },
  18. "class": bem()
  19. }, inherit(ctx)]), [h(Switch, {
  20. "props": _extends({}, props),
  21. "on": _extends({}, ctx.listeners)
  22. })]);
  23. }
  24. SwitchCell.props = _extends({}, switchProps, {
  25. title: String,
  26. border: Boolean,
  27. size: {
  28. type: String,
  29. "default": '24px'
  30. }
  31. });
  32. export default sfc(SwitchCell);