index.js 987 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "use strict";
  2. var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
  3. exports.__esModule = true;
  4. exports.default = void 0;
  5. var _babelHelperVueJsxMergeProps = _interopRequireDefault(require("@vue/babel-helper-vue-jsx-merge-props"));
  6. var _utils = require("../utils");
  7. var _functional = require("../utils/functional");
  8. // Utils
  9. var _createNamespace = (0, _utils.createNamespace)('info'),
  10. createComponent = _createNamespace[0],
  11. bem = _createNamespace[1];
  12. function Info(h, props, slots, ctx) {
  13. var dot = props.dot,
  14. info = props.info;
  15. var showInfo = (0, _utils.isDef)(info) && info !== '';
  16. if (!dot && !showInfo) {
  17. return;
  18. }
  19. return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
  20. "class": bem({
  21. dot: dot
  22. })
  23. }, (0, _functional.inherit)(ctx, true)]), [dot ? '' : props.info]);
  24. }
  25. Info.props = {
  26. dot: Boolean,
  27. info: [Number, String]
  28. };
  29. var _default = createComponent(Info);
  30. exports.default = _default;