fix
This commit is contained in:
@@ -31,9 +31,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</n-flex>
|
</n-flex>
|
||||||
<n-flex>
|
<n-flex>
|
||||||
<n-button v-if="roleSuper" text @click="statsModal = true">
|
|
||||||
<Icon :width="16" icon="lucide:bar-chart-2"></Icon>
|
|
||||||
</n-button>
|
|
||||||
<n-button
|
<n-button
|
||||||
v-if="authed"
|
v-if="authed"
|
||||||
text
|
text
|
||||||
@@ -52,11 +49,10 @@
|
|||||||
<TutorialContent v-if="taskTab === TASK_TYPE.Tutorial" />
|
<TutorialContent v-if="taskTab === TASK_TYPE.Tutorial" />
|
||||||
<ChallengeList v-else />
|
<ChallengeList v-else />
|
||||||
</div>
|
</div>
|
||||||
<TaskStatsModal v-model:show="statsModal" :task-id="taskId" />
|
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Icon } from "@iconify/vue"
|
import { Icon } from "@iconify/vue"
|
||||||
import { computed, ref, watch } from "vue"
|
import { computed, watch } from "vue"
|
||||||
import { step, tutorialIds, prev, next, prevDisabled, nextDisabled } from "../../store/tutorial"
|
import { step, tutorialIds, prev, next, prevDisabled, nextDisabled } from "../../store/tutorial"
|
||||||
import { authed, roleSuper } from "../../store/user"
|
import { authed, roleSuper } from "../../store/user"
|
||||||
import { taskTab, taskId, challengeDisplay } from "../../store/task"
|
import { taskTab, taskId, challengeDisplay } from "../../store/task"
|
||||||
@@ -64,11 +60,9 @@ import { useRoute, useRouter } from "vue-router"
|
|||||||
import { TASK_TYPE } from "../../utils/const"
|
import { TASK_TYPE } from "../../utils/const"
|
||||||
import ChallengeList from "./ChallengeList.vue"
|
import ChallengeList from "./ChallengeList.vue"
|
||||||
import TutorialContent from "./TutorialContent.vue"
|
import TutorialContent from "./TutorialContent.vue"
|
||||||
import TaskStatsModal from "./TaskStatsModal.vue"
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const statsModal = ref(false)
|
|
||||||
|
|
||||||
// 路由同步:初始执行 + watch 响应 SPA 内部导航
|
// 路由同步:初始执行 + watch 响应 SPA 内部导航
|
||||||
function syncRoute(routeName: string) {
|
function syncRoute(routeName: string) {
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<n-flex style="margin: 0 8px">
|
<n-flex style="margin: 0 8px">
|
||||||
|
<n-button v-if="roleAdmin || roleSuper" text @click="showStats = true">
|
||||||
|
<Icon :width="16" icon="lucide:bar-chart-2" />
|
||||||
|
</n-button>
|
||||||
<n-button
|
<n-button
|
||||||
v-if="authed"
|
v-if="authed"
|
||||||
text
|
text
|
||||||
@@ -18,9 +21,6 @@
|
|||||||
>
|
>
|
||||||
<Icon :width="16" icon="lucide:list" />
|
<Icon :width="16" icon="lucide:list" />
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button v-if="roleAdmin || roleSuper" text @click="showStats = true">
|
|
||||||
<Icon :width="16" icon="lucide:bar-chart-2" />
|
|
||||||
</n-button>
|
|
||||||
<n-button v-if="roleSuper" text @click="edit">
|
<n-button v-if="roleSuper" text @click="edit">
|
||||||
<Icon :width="16" icon="lucide:edit" />
|
<Icon :width="16" icon="lucide:edit" />
|
||||||
</n-button>
|
</n-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user