上一页

This commit is contained in:
yuping
2023-02-20 05:57:44 +08:00
parent e6ca8a8d5b
commit 09421dcb4f
13 changed files with 170 additions and 157 deletions

View File

@@ -1,7 +1,7 @@
import {useRoute, useRouter} from "vue-router/dist/vue-router";
import {useStore} from "vuex";
import {PROJECT, TASK_TYPES} from "@/api/CONST";
import {computed, onMounted} from "vue";
import {TASK_TYPES} from "@/api/CONST";
import {computed, watchEffect} from "vue";
export function useTaskPage() {
const router = useRouter()
@@ -16,11 +16,9 @@ export function useTaskPage() {
}))) : info.value.taskBoList)
const index = computed(() => taskList.value?.findIndex(t => t.id == taskId))
const hasPrev = computed(() => index.value - 1 > 0)
const hasNext = computed(() => taskList.value.length > index)
const hasNext = computed(() => taskList.value.length > index.value)
onMounted(() => {
dispatch('getProjectInfo', {projectId:infoId})
})
type == 1 ? dispatch('getProjectInfo', {projectId: infoId}) : dispatch('getRouterInfo', {routerId: infoId})
function nextPage() {
toPage(taskList.value[index.value + 1])
@@ -41,7 +39,7 @@ export function useTaskPage() {
infoId: info.id,
courseId: d.courseId,
pName: info.name,
sName:d.stageName,
sName: d.stageName,
chapterOrStageId: d.stageId,
btype: type
},