ai-entry-card.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="fx-row fx-bet-cen p-40 gap-40 bg-white mx-card" @click="handleEntryClick">
  3. <uv-image :src="icon" width="48" height="48"/>
  4. <view class="flex-1 fx-col">
  5. <uv-text size="16" type="main" bold :text="name"/>
  6. <uv-text size="12" type="tips" :text="description" margin="5px 0 0 0"/>
  7. </view>
  8. <uv-icon size="16" name="arrow-right"/>
  9. </view>
  10. </template>
  11. <script>
  12. import {useTransfer} from "@/hooks/useTransfer";
  13. export default {
  14. name: "ai-entry-card",
  15. props: {
  16. name: {
  17. type: String,
  18. default: ''
  19. },
  20. description: {
  21. type: String,
  22. default: ''
  23. },
  24. path: {
  25. type: String,
  26. default: ''
  27. },
  28. icon: {
  29. type: String,
  30. default: ''
  31. }
  32. },
  33. setup(props) {
  34. const {transferTo} = useTransfer()
  35. const handleEntryClick = () => {
  36. if (!props.path) return
  37. transferTo(props.path)
  38. }
  39. return {
  40. handleEntryClick
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped>
  46. </style>