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.

positionable.js 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.factory = factory;
  6. var _vue = require('vue');
  7. var _vue2 = _interopRequireDefault(_vue);
  8. var _helpers = require('../util/helpers');
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. var availableProps = {
  11. absolute: Boolean,
  12. bottom: Boolean,
  13. fixed: Boolean,
  14. left: Boolean,
  15. right: Boolean,
  16. top: Boolean
  17. };
  18. function factory() {
  19. var selected = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  20. return _vue2.default.extend({
  21. name: 'positionable',
  22. props: selected.length ? (0, _helpers.filterObjectOnKeys)(availableProps, selected) : availableProps
  23. });
  24. }
  25. exports.default = factory();
  26. // Add a `*` before the second `/`
  27. /* Tests /
  28. let single = factory(['top']).extend({
  29. created () {
  30. this.top
  31. this.bottom
  32. this.absolute
  33. }
  34. })
  35. let some = factory(['top', 'bottom']).extend({
  36. created () {
  37. this.top
  38. this.bottom
  39. this.absolute
  40. }
  41. })
  42. let all = factory().extend({
  43. created () {
  44. this.top
  45. this.bottom
  46. this.absolute
  47. this.foobar
  48. }
  49. })
  50. /**/
  51. //# sourceMappingURL=positionable.js.map