项目原始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.
 
 
 
 

78 line
2.0 KiB

  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _VPicker = _interopRequireDefault(require("../../components/VPicker"));
  7. var _colorable = _interopRequireDefault(require("../colorable"));
  8. var _themeable = _interopRequireDefault(require("../themeable"));
  9. var _mixins = _interopRequireDefault(require("../../util/mixins"));
  10. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  11. // Components
  12. // Mixins
  13. // Utils
  14. var _default = (0, _mixins.default)(_colorable.default, _themeable.default
  15. /* @vue/component */
  16. ).extend({
  17. name: 'picker',
  18. props: {
  19. fullWidth: Boolean,
  20. headerColor: String,
  21. landscape: Boolean,
  22. noTitle: Boolean,
  23. width: {
  24. type: [Number, String],
  25. default: 290
  26. }
  27. },
  28. methods: {
  29. genPickerTitle: function genPickerTitle() {
  30. return null;
  31. },
  32. genPickerBody: function genPickerBody() {
  33. return null;
  34. },
  35. genPickerActionsSlot: function genPickerActionsSlot() {
  36. return this.$scopedSlots.default ? this.$scopedSlots.default({
  37. save: this.save,
  38. cancel: this.cancel
  39. }) : this.$slots.default;
  40. },
  41. genPicker: function genPicker(staticClass) {
  42. var children = [];
  43. if (!this.noTitle) {
  44. var title = this.genPickerTitle();
  45. title && children.push(title);
  46. }
  47. var body = this.genPickerBody();
  48. body && children.push(body);
  49. children.push(this.$createElement('template', {
  50. slot: 'actions'
  51. }, [this.genPickerActionsSlot()]));
  52. return this.$createElement(_VPicker.default, {
  53. staticClass: staticClass,
  54. props: {
  55. color: this.headerColor || this.color,
  56. dark: this.dark,
  57. fullWidth: this.fullWidth,
  58. landscape: this.landscape,
  59. light: this.light,
  60. width: this.width,
  61. noTitle: this.noTitle
  62. }
  63. }, children);
  64. }
  65. }
  66. });
  67. exports.default = _default;
  68. //# sourceMappingURL=index.js.map