From 334627804d52b5b63b2638ce98b8cb39bdbab872 Mon Sep 17 00:00:00 2001
From: wf <2547096351@qq.com>
Date: Wed, 20 Nov 2024 15:42:42 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E9=AA=8C=E8=AF=81=E7=A0=81=E8=B0=83?=
=?UTF-8?q?=E6=95=B4=EF=BC=8C=E6=95=B0=E5=AD=97=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components.d.ts | 26 +++++++++++------------
src/components/verify-code/index.vue | 6 +++---
src/views/login/components/login-form.vue | 2 +-
src/vite-env.d.ts | 2 ++
4 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/src/components.d.ts b/src/components.d.ts
index 0b4f673..d6d698e 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -5,19 +5,19 @@
// Read more: https://github.com/vuejs/core/pull/3399
export {}
-declare module 'vue' {
+declare module "vue" {
export interface GlobalComponents {
- CodeView: typeof import('./components/code-view/index.vue')['default']
- ExternalLinkPage: typeof import('./components/external-link-page/index.vue')['default']
- FillPage: typeof import('./components/fill-page/index.vue')['default']
- InternalLinkPage: typeof import('./components/internal-link-page/index.vue')['default']
- LangProvider: typeof import('./components/lang-provider/index.vue')['default']
- MainTransition: typeof import('./components/main-transition/index.vue')['default']
- RouterLink: typeof import('vue-router')['RouterLink']
- RouterView: typeof import('vue-router')['RouterView']
- SelectIcon: typeof import('./components/select-icon/index.vue')['default']
- SvgAndIcon: typeof import('./components/svg-and-icon/index.vue')['default']
- SvgIcon: typeof import('./components/svg-icon/index.vue')['default']
- VerifyCode: typeof import('./components/verify-code/index.vue')['default']
+ CodeView: (typeof import("./components/code-view/index.vue"))["default"];
+ ExternalLinkPage: (typeof import("./components/external-link-page/index.vue"))["default"];
+ FillPage: (typeof import("./components/fill-page/index.vue"))["default"];
+ InternalLinkPage: (typeof import("./components/internal-link-page/index.vue"))["default"];
+ LangProvider: (typeof import("./components/lang-provider/index.vue"))["default"];
+ MainTransition: (typeof import("./components/main-transition/index.vue"))["default"];
+ RouterLink: (typeof import("vue-router"))["RouterLink"];
+ RouterView: (typeof import("vue-router"))["RouterView"];
+ SelectIcon: (typeof import("./components/select-icon/index.vue"))["default"];
+ SvgAndIcon: (typeof import("./components/svg-and-icon/index.vue"))["default"];
+ SvgIcon: (typeof import("./components/svg-icon/index.vue"))["default"];
+ VerifyCode: (typeof import("./components/verify-code/index.vue"))["default"];
}
}
diff --git a/src/components/verify-code/index.vue b/src/components/verify-code/index.vue
index 71e9851..88f640e 100644
--- a/src/components/verify-code/index.vue
+++ b/src/components/verify-code/index.vue
@@ -11,7 +11,7 @@ const props = defineProps({
identifyCodes: {
//验证码从该字段中抽取生成
type: String,
- default: "1234567890abcdefghijklmnopqrstuvwxyz"
+ default: "1234567890"
},
fontSizeMin: {
// 字体最小值
@@ -93,8 +93,8 @@ const drawPic = () => {
const drawText = (ctx: any, txt: any, i: any) => {
ctx.fillStyle = randomColor(50, 160); //随机生成字体颜色
ctx.font = randomNum(props.fontSizeMin, props.fontSizeMax) + "px SimHei"; //随机生成字体大小
- let x = (i + 1) * (props.contentWidth / (identifyCode.value.length + 1));
- let y = randomNum(props.fontSizeMax, props.contentHeight - 5);
+ let x = (i + 1) * (props.contentWidth / (identifyCode.value.length + 1)); // x轴
+ let y = randomNum(props.fontSizeMax, props.contentHeight); // y轴
let deg = randomNum(-30, 30);
// 修改坐标原点和旋转角度
ctx.translate(x, y);
diff --git a/src/views/login/components/login-form.vue b/src/views/login/components/login-form.vue
index 2fb5939..d873235 100644
--- a/src/views/login/components/login-form.vue
+++ b/src/views/login/components/login-form.vue
@@ -19,7 +19,7 @@
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts
index 1e1d65b..b15930c 100644
--- a/src/vite-env.d.ts
+++ b/src/vite-env.d.ts
@@ -18,3 +18,5 @@ declare module "@wangeditor/editor-for-vue";
declare module "@/directives/modules/custom";
declare module "mockjs";
declare module "@/store/modules/route-config";
+declare module "@arco-design/*";
+declare module "vue-router";