index.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var component_1 = require("../common/component");
  4. (0, component_1.VantComponent)({
  5. props: {
  6. // whether to show popup
  7. show: Boolean,
  8. // overlay custom style
  9. overlayStyle: String,
  10. // z-index
  11. zIndex: {
  12. type: Number,
  13. value: 100,
  14. },
  15. title: String,
  16. cancelText: {
  17. type: String,
  18. value: '取消',
  19. },
  20. description: String,
  21. options: {
  22. type: Array,
  23. value: [],
  24. },
  25. overlay: {
  26. type: Boolean,
  27. value: true,
  28. },
  29. safeAreaInsetBottom: {
  30. type: Boolean,
  31. value: true,
  32. },
  33. closeOnClickOverlay: {
  34. type: Boolean,
  35. value: true,
  36. },
  37. duration: {
  38. type: null,
  39. value: 300,
  40. },
  41. },
  42. methods: {
  43. onClickOverlay: function () {
  44. this.$emit('click-overlay');
  45. },
  46. onCancel: function () {
  47. this.onClose();
  48. this.$emit('cancel');
  49. },
  50. onSelect: function (event) {
  51. this.$emit('select', event.detail);
  52. },
  53. onClose: function () {
  54. this.$emit('close');
  55. },
  56. },
  57. });