自动添加标题

This commit is contained in:
2025-04-27 22:03:55 +08:00
parent a41ba2e85a
commit 69c3a36957
3 changed files with 10 additions and 3 deletions

View File

@@ -1,5 +1,8 @@
import { ref } from "vue"
import { TASK_TYPE } from "../utils/const"
export const taskTab = ref(TASK_TYPE.Tutorial)
const urlParams = new URLSearchParams(window.location.search)
const currentTask = urlParams.get("task") ?? TASK_TYPE.Tutorial
export const taskTab = ref(currentTask)
export const taskId = ref(0)

View File

@@ -1,6 +1,9 @@
import { ref } from "vue"
export const step = ref(1)
const urlParams = new URLSearchParams(window.location.search)
const currentStep = urlParams.get("step") ?? "1"
export const step = ref(Number(currentStep))
export const show = ref(true)
export const tutorialSize = ref(2 / 5)