StatusTip.vue 668 B

123456789101112131415161718192021222324
  1. <script setup lang="ts">
  2. import { statusTipProps } from 'wot-design-uni/components/wd-status-tip/types'
  3. import { StaticUrl } from '@/config'
  4. const props = defineProps({ ...statusTipProps, image: { type: String, default: '' }, imageSize: { type: String, default: '248rpx' } })
  5. const imgs = computed(() => {
  6. if (props.image)
  7. return `${StaticUrl}/${props.image}`
  8. return `${StaticUrl}/status-tip.png`
  9. })
  10. </script>
  11. <template>
  12. <wd-status-tip v-bind="props">
  13. <template #image>
  14. <image
  15. :style="{ width: imageSize, height: imageSize }"
  16. :src="imgs"
  17. />
  18. </template>
  19. </wd-status-tip>
  20. </template>
  21. <style lang="scss" scoped></style>