项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

74 rivejä
1.8 KiB

  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. require("../../../src/components/VGrid/_grid.sass");
  7. require("../../../src/components/VGrid/VGrid.sass");
  8. var _grid2 = _interopRequireDefault(require("./grid"));
  9. var _mergeData = _interopRequireDefault(require("../../util/mergeData"));
  10. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  11. /* @vue/component */
  12. var _default = (0, _grid2.default)('container').extend({
  13. name: 'v-container',
  14. functional: true,
  15. props: {
  16. id: String,
  17. tag: {
  18. type: String,
  19. default: 'div'
  20. },
  21. fluid: {
  22. type: Boolean,
  23. default: false
  24. }
  25. },
  26. render: function render(h, _ref) {
  27. var props = _ref.props,
  28. data = _ref.data,
  29. children = _ref.children;
  30. var classes;
  31. var attrs = data.attrs;
  32. if (attrs) {
  33. // reset attrs to extract utility clases like pa-3
  34. data.attrs = {};
  35. classes = Object.keys(attrs).filter(function (key) {
  36. // TODO: Remove once resolved
  37. // https://github.com/vuejs/vue/issues/7841
  38. if (key === 'slot') return false;
  39. var value = attrs[key]; // add back data attributes like data-test="foo" but do not
  40. // add them as classes
  41. if (key.startsWith('data-')) {
  42. data.attrs[key] = value;
  43. return false;
  44. }
  45. return value || typeof value === 'string';
  46. });
  47. }
  48. if (props.id) {
  49. data.domProps = data.domProps || {};
  50. data.domProps.id = props.id;
  51. }
  52. return h(props.tag, (0, _mergeData.default)(data, {
  53. staticClass: 'container',
  54. class: Array({
  55. 'container--fluid': props.fluid
  56. }).concat(classes || [])
  57. }), children);
  58. }
  59. });
  60. exports.default = _default;
  61. //# sourceMappingURL=VContainer.js.map