share.vue 819 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <a-form
  3. :label-col="{ span: 5 }"
  4. :wrapper-col="{ span: 19 }"
  5. class="share-form"
  6. >
  7. <a-form-item label="作品链接">
  8. <a-input disabled :value="url" />
  9. </a-form-item>
  10. <!-- <a-form-item label="作品葵花码">
  11. <img :src="room.leaderMiniCode" class="mini-code" />
  12. </a-form-item> -->
  13. </a-form>
  14. </template>
  15. <script lang="ts" setup>
  16. import { useRoomStore } from '@/store'
  17. import type { Room } from '@/store'
  18. defineOptions({ name: 'RoomShare' })
  19. const props = defineProps<{ room: Room; num: string }>()
  20. const roomStore = useRoomStore()
  21. const url = roomStore.getShareUrl({
  22. roomId: props.room.id,
  23. num: props.num,
  24. role: 'customer'
  25. })
  26. </script>
  27. <style lang="scss" scoped>
  28. .share-form {
  29. margin: 20px 0;
  30. }
  31. .mini-code {
  32. width: 120px;
  33. height: 120px;
  34. }
  35. </style>