Merge branch 'feat/mock' of gitee.com:wang_fan_w/SnowAdmin into feat/mock

This commit is contained in:
WANGFAN\wangf 2024-12-02 13:23:34 +08:00
commit 1fffd30b59
3 changed files with 6 additions and 4 deletions

View File

@ -11,7 +11,7 @@ const props = defineProps({
identifyCodes: { identifyCodes: {
// //
type: String, type: String,
default: "1234567890abcdefghijklmnopqrstuvwxyz" default: "1234567890"
}, },
fontSizeMin: { fontSizeMin: {
// //
@ -93,8 +93,8 @@ const drawPic = () => {
const drawText = (ctx: any, txt: any, i: any) => { const drawText = (ctx: any, txt: any, i: any) => {
ctx.fillStyle = randomColor(50, 160); // ctx.fillStyle = randomColor(50, 160); //
ctx.font = randomNum(props.fontSizeMin, props.fontSizeMax) + "px SimHei"; // ctx.font = randomNum(props.fontSizeMin, props.fontSizeMax) + "px SimHei"; //
let x = (i + 1) * (props.contentWidth / (identifyCode.value.length + 1)); let x = (i + 1) * (props.contentWidth / (identifyCode.value.length + 1)); // x
let y = randomNum(props.fontSizeMax, props.contentHeight - 5); let y = randomNum(props.fontSizeMax, props.contentHeight); // y
let deg = randomNum(-30, 30); let deg = randomNum(-30, 30);
// //
ctx.translate(x, y); ctx.translate(x, y);

View File

@ -19,7 +19,7 @@
<a-form-item field="verifyCode" :hide-asterisk="true"> <a-form-item field="verifyCode" :hide-asterisk="true">
<div class="verifyCode"> <div class="verifyCode">
<a-input style="width: 160px" v-model="form.verifyCode" allow-clear placeholder="请输入验证码" /> <a-input style="width: 160px" v-model="form.verifyCode" allow-clear placeholder="请输入验证码" />
<VerifyCode :content-height="30" :content-width="100" @verify-code-change="verifyCodeChange" /> <VerifyCode :content-height="30" :font-size-max="30" :content-width="110" @verify-code-change="verifyCodeChange" />
</div> </div>
</a-form-item> </a-form-item>
<a-form-item field="remember"> <a-form-item field="remember">

2
src/vite-env.d.ts vendored
View File

@ -18,3 +18,5 @@ declare module "@wangeditor/editor-for-vue";
declare module "@/directives/modules/custom"; declare module "@/directives/modules/custom";
declare module "mockjs"; declare module "mockjs";
declare module "@/store/modules/route-config"; declare module "@/store/modules/route-config";
declare module "@arco-design/*";
declare module "vue-router";