index.vue 927 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <van-action-sheet
  3. :show="show"
  4. :actions="actions"
  5. cancel-text="取消"
  6. :close-on-click-overlay="true"
  7. @select="onSelect"
  8. @close="onCancel"
  9. @cancel="onCancel"
  10. />
  11. </template>
  12. <script>
  13. import VanActionSheet from '@/wxcomponents/vant/action-sheet/index'
  14. export default {
  15. options: {
  16. styleIsolation: 'shared'
  17. },
  18. components: {
  19. VanActionSheet
  20. },
  21. props: {
  22. shareInfo: null,
  23. show: Boolean
  24. },
  25. computed: {
  26. },
  27. watch: {
  28. },
  29. data() {
  30. return {
  31. actions: [
  32. // {
  33. // name: '生成海报',
  34. // value: 'download'
  35. // },
  36. {
  37. name: '分享好友',
  38. openType: 'share'
  39. }]
  40. }
  41. },
  42. created() {},
  43. mounted() {
  44. },
  45. methods: {
  46. onSelect(e) {
  47. if (e.value === 'download') {
  48. this.showAlertDialog('功能未上线')
  49. }
  50. },
  51. onCancel(e) {
  52. this.$emit('update:show', false)
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss">
  58. </style>