index.js 720 B

1234567891011121314151617181920212223242526272829303132
  1. import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
  2. import { use } from '../utils';
  3. import { inherit } from '../utils/functional'; // Types
  4. var _use = use('cell-group'),
  5. sfc = _use[0],
  6. bem = _use[1];
  7. function CellGroup(h, props, slots, ctx) {
  8. var Group = h("div", _mergeJSXProps([{
  9. "class": [bem(), {
  10. 'van-hairline--top-bottom': props.border
  11. }]
  12. }, inherit(ctx, true)]), [slots["default"] && slots["default"]()]);
  13. if (props.title) {
  14. return h("div", [h("div", {
  15. "class": bem('title')
  16. }, [props.title]), Group]);
  17. }
  18. return Group;
  19. }
  20. CellGroup.props = {
  21. title: String,
  22. border: {
  23. type: Boolean,
  24. "default": true
  25. }
  26. };
  27. export default sfc(CellGroup);