Ohm-Management - Projektarbeit B-ME
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.

grid.js 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = Grid;
  6. function Grid(name) {
  7. /* @vue/component */
  8. return {
  9. name: 'v-' + name,
  10. functional: true,
  11. props: {
  12. id: String,
  13. tag: {
  14. type: String,
  15. default: 'div'
  16. }
  17. },
  18. render: function render(h, _ref) {
  19. var props = _ref.props,
  20. data = _ref.data,
  21. children = _ref.children;
  22. data.staticClass = (name + ' ' + (data.staticClass || '')).trim();
  23. var attrs = data.attrs;
  24. if (attrs) {
  25. // reset attrs to extract utility clases like pa-3
  26. data.attrs = {};
  27. var classes = Object.keys(attrs).filter(function (key) {
  28. // TODO: Remove once resolved
  29. // https://github.com/vuejs/vue/issues/7841
  30. if (key === 'slot') return false;
  31. var value = attrs[key];
  32. // add back data attributes like data-test="foo" but do not
  33. // add them as classes
  34. if (key.startsWith('data-')) {
  35. data.attrs[key] = value;
  36. return false;
  37. }
  38. return value || typeof value === 'string';
  39. });
  40. if (classes.length) data.staticClass += ' ' + classes.join(' ');
  41. }
  42. if (props.id) {
  43. data.domProps = data.domProps || {};
  44. data.domProps.id = props.id;
  45. }
  46. return h(props.tag, data, children);
  47. }
  48. };
  49. }
  50. //# sourceMappingURL=grid.js.map