index.vue 911 B

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