disable tutorial management
This commit is contained in:
@@ -23,7 +23,7 @@ import { useMessage } from "naive-ui"
|
|||||||
import { Icon } from "@iconify/vue"
|
import { Icon } from "@iconify/vue"
|
||||||
import { authed, roleNormal, roleSuper, user } from "../store/user"
|
import { authed, roleNormal, roleSuper, user } from "../store/user"
|
||||||
import { loginModal } from "../store/modal"
|
import { loginModal } from "../store/modal"
|
||||||
import { show, step, tutorialSize } from "../store/tutorial"
|
import { show, tutorialSize } from "../store/tutorial"
|
||||||
import { Account } from "../api"
|
import { Account } from "../api"
|
||||||
import { Role } from "../utils/type"
|
import { Role } from "../utils/type"
|
||||||
import { router } from "../router"
|
import { router } from "../router"
|
||||||
@@ -68,7 +68,7 @@ function showTutorial() {
|
|||||||
function clickMenu(name: string) {
|
function clickMenu(name: string) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "dashboard":
|
case "dashboard":
|
||||||
router.push({ name: "tutorial", params: { display: step.value } })
|
router.push({ name: "user-manage", params: { page: 1 } })
|
||||||
break
|
break
|
||||||
case "admin":
|
case "admin":
|
||||||
window.open(ADMIN_URL)
|
window.open(ADMIN_URL)
|
||||||
|
|||||||
@@ -34,9 +34,11 @@ import { css, html, js, tab } from "../store/editors"
|
|||||||
import { Tutorial } from "../api"
|
import { Tutorial } from "../api"
|
||||||
import { step } from "../store/tutorial"
|
import { step } from "../store/tutorial"
|
||||||
import { authed, roleSuper } from "../store/user"
|
import { authed, roleSuper } from "../store/user"
|
||||||
|
import { useStorage } from "@vueuse/core"
|
||||||
|
import { STORAGE_KEY } from "../utils/const"
|
||||||
|
|
||||||
const displays = ref<number[]>([])
|
const displays = ref<number[]>([])
|
||||||
const content = ref("")
|
const content = useStorage(STORAGE_KEY.CONTENT, "")
|
||||||
const $content = useTemplateRef("$content")
|
const $content = useTemplateRef("$content")
|
||||||
|
|
||||||
defineEmits(["hide"])
|
defineEmits(["hide"])
|
||||||
|
|||||||
@@ -6,8 +6,10 @@
|
|||||||
</n-button>
|
</n-button>
|
||||||
<n-button
|
<n-button
|
||||||
v-for="item in menu"
|
v-for="item in menu"
|
||||||
|
:key="item.label"
|
||||||
:type="$route.name === item.route.name ? 'primary' : 'default'"
|
:type="$route.name === item.route.name ? 'primary' : 'default'"
|
||||||
@click="$router.push(item.route)"
|
@click="$router.push(item.route)"
|
||||||
|
:disabled="item.disabled"
|
||||||
>
|
>
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</n-button>
|
</n-button>
|
||||||
@@ -24,6 +26,7 @@ const menu = [
|
|||||||
{
|
{
|
||||||
label: "教程",
|
label: "教程",
|
||||||
route: { name: "tutorial", params: { display: step.value } },
|
route: { name: "tutorial", params: { display: step.value } },
|
||||||
|
disabled: true
|
||||||
},
|
},
|
||||||
{ label: "用户", route: { name: "user-manage", params: { page: 1 } } },
|
{ label: "用户", route: { name: "user-manage", params: { page: 1 } } },
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export const alertVariants = [
|
|||||||
export const STORAGE_KEY = {
|
export const STORAGE_KEY = {
|
||||||
LOGIN: "web-isloggedin",
|
LOGIN: "web-isloggedin",
|
||||||
STEP: "web-turtorial-step",
|
STEP: "web-turtorial-step",
|
||||||
|
CONTENT: "web-turtorial-content",
|
||||||
HTML: "web-html",
|
HTML: "web-html",
|
||||||
CSS: "web-css",
|
CSS: "web-css",
|
||||||
JS: "web-js",
|
JS: "web-js",
|
||||||
|
|||||||
Reference in New Issue
Block a user