index.js 1.1 KB

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