123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template>
- <view class="fx-row fx-bet-cen p-40 gap-40 bg-white mx-card" @click="handleEntryClick">
- <uv-image :src="icon" width="48" height="48"/>
- <view class="flex-1 fx-col">
- <uv-text size="16" type="main" bold :text="name"/>
- <uv-text size="12" type="tips" :text="description" margin="5px 0 0 0"/>
- </view>
- <uv-icon size="16" name="arrow-right"/>
- </view>
- </template>
- <script>
- import {useTransfer} from "@/hooks/useTransfer";
- export default {
- name: "ai-entry-card",
- props: {
- name: {
- type: String,
- default: ''
- },
- description: {
- type: String,
- default: ''
- },
- path: {
- type: String,
- default: ''
- },
- icon: {
- type: String,
- default: ''
- }
- },
- setup(props) {
- const {transferTo} = useTransfer()
- const handleEntryClick = () => {
- if (!props.path) return
- transferTo(props.path)
- }
- return {
- handleEntryClick
- }
- }
- }
- </script>
- <style scoped>
- </style>
|