From 187c26832c7ff7b99c7e7f4f896b15e18392bb6a Mon Sep 17 00:00:00 2001 From: JuneOY <75666139+JuneOY@users.noreply.github.com> Date: Sun, 28 Apr 2024 10:03:47 +0800 Subject: [PATCH] fix: typo (#12) * updata plugin fetch layout * fix:typo --- src/router/guard.ts | 4 +- src/router/routes.static.ts | 2 +- src/service/api/test.ts | 6 +- src/typings/route.d.ts | 2 +- src/views/demo/QRCode/index.vue | 2 +- src/views/demo/fetch/components/Get.vue | 4 +- .../demo/fetch/components/UseRequest.vue | 8 +- src/views/plugin/fetch/index.vue | 249 ++++++++++++++++++ .../setting/menu/components/TableModal.vue | 8 +- 9 files changed, 267 insertions(+), 18 deletions(-) create mode 100644 src/views/plugin/fetch/index.vue diff --git a/src/router/guard.ts b/src/router/guard.ts index 9314fca..30cfcb4 100644 --- a/src/router/guard.ts +++ b/src/router/guard.ts @@ -11,8 +11,8 @@ export function setupRouterGuard(router: Router) { router.beforeEach(async (to, from, next) => { // 判断是否是外链,如果是直接打开网页并拦截跳转 - if (to.meta.herf) { - window.open(to.meta.herf) + if (to.meta.href) { + window.open(to.meta.href) return false } // 开始 loadingBar diff --git a/src/router/routes.static.ts b/src/router/routes.static.ts index b406b5f..2aaca6d 100644 --- a/src/router/routes.static.ts +++ b/src/router/routes.static.ts @@ -260,7 +260,7 @@ export const staticRoutes: AppRoute.RowRoute[] = [ 'meta.title': 'VueUse(外链)', 'meta.requiresAuth': true, 'meta.icon': 'logos:vueuse', - 'meta.herf': 'https://vueuse.org/guide/', + 'meta.href': 'https://vueuse.org/guide/', 'componentPath': 'null', 'id': 27, 'pid': 24, diff --git a/src/service/api/test.ts b/src/service/api/test.ts index c224885..0d76658 100644 --- a/src/service/api/test.ts +++ b/src/service/api/test.ts @@ -1,7 +1,7 @@ import { blankInstance, request } from '../http' /* get方法测试 */ -export function fetachGet(params?: any) { +export function fetchGet(params?: any) { return request.Get('/getAPI', { params }) } @@ -53,7 +53,7 @@ export function dictData() { export function getBlob(url: string) { const methodInstance = blankInstance.Get(url) methodInstance.meta = { - // 标识为bolb数据 + // 标识为blob数据 isBlob: true, } return methodInstance @@ -66,7 +66,7 @@ export function downloadFile(url: string) { enableDownload: true, }) methodInstance.meta = { - // 标识为bolb数据 + // 标识为blob数据 isBlob: true, } return methodInstance diff --git a/src/typings/route.d.ts b/src/typings/route.d.ts index e2046dc..d2de6e4 100644 --- a/src/typings/route.d.ts +++ b/src/typings/route.d.ts @@ -18,7 +18,7 @@ declare namespace AppRoute { /* 菜单排序。 */ order?: number /* 嵌套外链 */ - herf?: string + href?: string /** 当前路由不在左侧菜单显示,但需要高亮某个菜单的情况 */ activeMenu?: string /** 当前路由是否会被添加到Tab中 */ diff --git a/src/views/demo/QRCode/index.vue b/src/views/demo/QRCode/index.vue index c78d1f4..16a19a3 100644 --- a/src/views/demo/QRCode/index.vue +++ b/src/views/demo/QRCode/index.vue @@ -5,7 +5,7 @@ const text = ref('nova-admin') - + - +