| <template> | 
|   <InfiniteLoading scrollViewClassName="common-infinite-scroll-list" v-bind="infiniteLoadingProps"> | 
|     <template #renderItem="{ item }"> | 
|       <TaskCard @click="goTaskDetail(item)" v-bind="item" /> | 
|     </template> | 
|   </InfiniteLoading> | 
| </template> | 
|   | 
| <script setup lang="ts"> | 
| import { TaskCard } from '@12333/components'; | 
| import { useTaskList } from '@12333/hooks'; | 
| import Taro from '@tarojs/taro'; | 
|   | 
| defineOptions({ | 
|   name: 'CompanyTaskList', | 
| }); | 
|   | 
| type Props = { | 
|   enterpriseId?: string; | 
| }; | 
|   | 
| const props = withDefaults(defineProps<Props>(), {}); | 
|   | 
| const { infiniteLoadingProps } = useTaskList({ | 
|   defaultQueryMenuState: { | 
|     enterpriseId: props.enterpriseId, | 
|   }, | 
| }); | 
|   | 
| function goTaskDetail(item: API.GetTaskInfosQueryResultItem) { | 
|   Taro.navigateTo({ | 
|     url: `${RouterPath.taskDetail}?id=${item.id}&from=apply`, | 
|   }); | 
| } | 
| </script> | 
|   | 
| <style lang="scss"> | 
| @import '@/styles/common.scss'; | 
| </style> |