index.vue 931 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. methods: {
  45. onSelect(e) {
  46. if (e.value === 'download') {
  47. this.showAlertDialog('功能未上线')
  48. }
  49. },
  50. onCancel(e) {
  51. this.$emit('update:show', false)
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss">
  57. </style>