refactor: 将示例页面收拢到 demo 目录

This commit is contained in:
pany 2024-11-27 14:04:17 +08:00
parent b0e93f6184
commit 9a02f69692
16 changed files with 12 additions and 12 deletions

View File

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { getSelectDataApi } from "@/http/apis/composable-demo/use-fetch-select"
import { useFetchSelect } from "@@/composables/useFetchSelect" import { useFetchSelect } from "@@/composables/useFetchSelect"
import { getSelectDataApi } from "./apis/use-fetch-select"
const { loading, options, value } = useFetchSelect({ const { loading, options, value } = useFetchSelect({
api: getSelectDataApi api: getSelectDataApi

View File

@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { getErrorApi, getSuccessApi } from "@/http/apis/composable-demo/use-fullscreen-loading"
import { useFullscreenLoading } from "@@/composables/useFullscreenLoading" import { useFullscreenLoading } from "@@/composables/useFullscreenLoading"
import { ElMessage } from "element-plus" import { ElMessage } from "element-plus"
import { getErrorApi, getSuccessApi } from "./apis/use-fullscreen-loading"
const svg = ` const svg = `
<path class="path" d=" <path class="path" d="

View File

@ -70,7 +70,7 @@ export const constantRoutes: RouteRecordRaw[] = [
children: [ children: [
{ {
path: "index", path: "index",
component: () => import("@/pages/unocss/index.vue"), component: () => import("@/pages/demo/unocss/index.vue"),
name: "UnoCSS", name: "UnoCSS",
meta: { meta: {
title: "UnoCSS", title: "UnoCSS",
@ -116,7 +116,7 @@ export const constantRoutes: RouteRecordRaw[] = [
children: [ children: [
{ {
path: "element-plus", path: "element-plus",
component: () => import("@/pages/table/element-plus/index.vue"), component: () => import("@/pages/demo/table/element-plus/index.vue"),
name: "ElementPlus", name: "ElementPlus",
meta: { meta: {
title: "Element Plus", title: "Element Plus",
@ -125,7 +125,7 @@ export const constantRoutes: RouteRecordRaw[] = [
}, },
{ {
path: "vxe-table", path: "vxe-table",
component: () => import("@/pages/table/vxe-table/index.vue"), component: () => import("@/pages/demo/table/vxe-table/index.vue"),
name: "VxeTable", name: "VxeTable",
meta: { meta: {
title: "Vxe Table", title: "Vxe Table",
@ -146,7 +146,7 @@ export const constantRoutes: RouteRecordRaw[] = [
children: [ children: [
{ {
path: "level2", path: "level2",
component: () => import("@/pages/level1/level2/index.vue"), component: () => import("@/pages/demo/level1/level2/index.vue"),
redirect: "/level1/level2/level3", redirect: "/level1/level2/level3",
name: "Level2", name: "Level2",
meta: { meta: {
@ -156,7 +156,7 @@ export const constantRoutes: RouteRecordRaw[] = [
children: [ children: [
{ {
path: "level3", path: "level3",
component: () => import("@/pages/level1/level2/level3/index.vue"), component: () => import("@/pages/demo/level1/level2/level3/index.vue"),
name: "Level3", name: "Level3",
meta: { meta: {
title: "三级路由", title: "三级路由",
@ -179,7 +179,7 @@ export const constantRoutes: RouteRecordRaw[] = [
children: [ children: [
{ {
path: "use-fetch-select", path: "use-fetch-select",
component: () => import("@/pages/composable-demo/use-fetch-select.vue"), component: () => import("@/pages/demo/composable-demo/use-fetch-select.vue"),
name: "UseFetchSelect", name: "UseFetchSelect",
meta: { meta: {
title: "useFetchSelect" title: "useFetchSelect"
@ -187,7 +187,7 @@ export const constantRoutes: RouteRecordRaw[] = [
}, },
{ {
path: "use-fullscreen-loading", path: "use-fullscreen-loading",
component: () => import("@/pages/composable-demo/use-fullscreen-loading.vue"), component: () => import("@/pages/demo/composable-demo/use-fullscreen-loading.vue"),
name: "UseFullscreenLoading", name: "UseFullscreenLoading",
meta: { meta: {
title: "useFullscreenLoading" title: "useFullscreenLoading"
@ -195,7 +195,7 @@ export const constantRoutes: RouteRecordRaw[] = [
}, },
{ {
path: "use-watermark", path: "use-watermark",
component: () => import("@/pages/composable-demo/use-watermark.vue"), component: () => import("@/pages/demo/composable-demo/use-watermark.vue"),
name: "UseWatermark", name: "UseWatermark",
meta: { meta: {
title: "useWatermark" title: "useWatermark"
@ -225,7 +225,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [
children: [ children: [
{ {
path: "page", path: "page",
component: () => import("@/pages/permission/page.vue"), component: () => import("@/pages/demo/permission/page.vue"),
name: "PagePermission", name: "PagePermission",
meta: { meta: {
title: "页面级", title: "页面级",
@ -234,7 +234,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [
}, },
{ {
path: "directive", path: "directive",
component: () => import("@/pages/permission/directive.vue"), component: () => import("@/pages/demo/permission/directive.vue"),
name: "DirectivePermission", name: "DirectivePermission",
meta: { meta: {
title: "按钮级" // 如果未设置角色,则表示:该页面不需要权限,但会继承根路由的角色 title: "按钮级" // 如果未设置角色,则表示:该页面不需要权限,但会继承根路由的角色