mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-13 12:56:47 +08:00
上一页
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user