index.vue 727 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <app-modal direction="right-top" height="100%" v-model:show="showModal">
  3. <app-address :show-radio="true" @change="onChange" />
  4. </app-modal>
  5. </template>
  6. <script lang="ts" setup>
  7. import { computed } from 'vue'
  8. import AppModal from '@/components/base/modal/index.vue'
  9. import AppAddress from '@mobile/views/mine/address/Index.vue'
  10. const props = defineProps({
  11. show: {
  12. type: Boolean,
  13. default: false
  14. }
  15. })
  16. const emit = defineEmits(['update:show', 'change'])
  17. const showModal = computed({
  18. get: () => props.show,
  19. set: (val) => emit('update:show', val)
  20. })
  21. const onChange = (item: Model.UserReceiveInfoRsp) => {
  22. showModal.value = false
  23. emit('change', item)
  24. }
  25. </script>