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.

picker.js 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Components
  2. import VPicker from '../components/VPicker';
  3. // Mixins
  4. import Colorable from './colorable';
  5. import Themeable from './themeable';
  6. // Utils
  7. import mixins from '../util/mixins';
  8. export default mixins(Colorable, Themeable
  9. /* @vue/component */
  10. ).extend({
  11. name: 'picker',
  12. props: {
  13. fullWidth: Boolean,
  14. headerColor: String,
  15. landscape: Boolean,
  16. noTitle: Boolean,
  17. width: {
  18. type: [Number, String],
  19. default: 290
  20. }
  21. },
  22. methods: {
  23. genPickerTitle: function genPickerTitle() {
  24. return null;
  25. },
  26. genPickerBody: function genPickerBody() {
  27. return null;
  28. },
  29. genPickerActionsSlot: function genPickerActionsSlot() {
  30. return this.$scopedSlots.default ? this.$scopedSlots.default({
  31. save: this.save,
  32. cancel: this.cancel
  33. }) : this.$slots.default;
  34. },
  35. genPicker: function genPicker(staticClass) {
  36. var children = [];
  37. if (!this.noTitle) {
  38. var title = this.genPickerTitle();
  39. title && children.push(title);
  40. }
  41. var body = this.genPickerBody();
  42. body && children.push(body);
  43. children.push(this.$createElement('template', { slot: 'actions' }, [this.genPickerActionsSlot()]));
  44. return this.$createElement(VPicker, {
  45. staticClass: staticClass,
  46. props: {
  47. color: this.headerColor || this.color,
  48. dark: this.dark,
  49. fullWidth: this.fullWidth,
  50. landscape: this.landscape,
  51. light: this.light,
  52. width: this.width
  53. }
  54. }, children);
  55. }
  56. }
  57. });
  58. //# sourceMappingURL=picker.js.map