You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
772 B
38 lines
772 B
<template>
|
|
<view class="box shadow-lg">
|
|
<view v-for="item in data.sonTask" :key="item.detailId">
|
|
<span class="text-xs text-gray-500">{{ item.name }}</span>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { reactive } from 'vue';
|
|
|
|
const props = defineProps({
|
|
task: {
|
|
type: Object,
|
|
default: () => {},
|
|
},
|
|
});
|
|
const data = reactive({ sonTask: [] });
|
|
|
|
async function getSonTask() {
|
|
try {
|
|
const res = await uni.$u.api.findSonTask({ detailId: props.task.detailId });
|
|
data.sonTask = res;
|
|
} catch (error) {
|
|
console.error('p-subtasks.vue getSonTask error: ', error);
|
|
}
|
|
}
|
|
getSonTask();
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.box{
|
|
border-radius: 8px;
|
|
background: #fff;
|
|
padding: 16px;
|
|
overflow: hidden;
|
|
}
|
|
</style>
|
|
|