fix:样式下调:where选择器
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { ConfigProvider } from 'ant-design-vue';
|
import { ConfigProvider, StyleProvider } from 'ant-design-vue'; // 添加 StyleProvider
|
||||||
import { useAppStore } from './store/modules/app';
|
import { useAppStore } from './store/modules/app';
|
||||||
import { useThemeStore } from './store/modules/theme';
|
import { useThemeStore } from './store/modules/theme';
|
||||||
import { antdLocales } from './locales/antd';
|
import { antdLocales } from './locales/antd';
|
||||||
@@ -20,9 +20,11 @@ const antdLocale = computed(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ConfigProvider :theme="themeStore.antdTheme" :locale="antdLocale">
|
<ConfigProvider :theme="themeStore.antdTheme" :locale="antdLocale">
|
||||||
|
<StyleProvider hash-priority="high">
|
||||||
<AppProvider>
|
<AppProvider>
|
||||||
<RouterView class="bg-layout" />
|
<RouterView class="bg-layout" />
|
||||||
</AppProvider>
|
</AppProvider>
|
||||||
|
</StyleProvider>
|
||||||
</ConfigProvider>
|
</ConfigProvider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,23 @@ import { useRouterPush } from '@/hooks/common/router';
|
|||||||
import { useAntdForm, useFormRules } from '@/hooks/common/form';
|
import { useAntdForm, useFormRules } from '@/hooks/common/form';
|
||||||
import { useAuthStore } from '@/store/modules/auth';
|
import { useAuthStore } from '@/store/modules/auth';
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { sessionStg } from '@/utils/storage';
|
||||||
|
|
||||||
// Add interface for check code response
|
// Add interface for check code response
|
||||||
interface CheckCodeResponse {
|
interface CheckCodeResponse {
|
||||||
uuid: string;
|
uuid: string;
|
||||||
img: string;
|
img: string;
|
||||||
text?: string; // Make text optional since it might not always be present
|
text?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add interface for LoginForm
|
||||||
|
interface LoginForm {
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
code: string;
|
||||||
|
uuid: string;
|
||||||
|
authType: string;
|
||||||
|
wanfiRedirectParams: Record<string, any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -26,7 +37,7 @@ const codeImg = ref('');
|
|||||||
|
|
||||||
getCheckCode();
|
getCheckCode();
|
||||||
|
|
||||||
const model = reactive({
|
const model = reactive<LoginForm>({
|
||||||
username: '123456',
|
username: '123456',
|
||||||
password: '123456',
|
password: '123456',
|
||||||
code: '',
|
code: '',
|
||||||
@@ -41,12 +52,14 @@ const rules = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
await validate();//验证表单内容
|
await validate();
|
||||||
model.wanfiRedirectParams = sessionStg.get('wanfiRedirectParams');
|
const redirectParams = sessionStg.get('wanfiRedirectParams');
|
||||||
|
model.wanfiRedirectParams = redirectParams ? JSON.parse(redirectParams) : {};
|
||||||
|
|
||||||
await authStore.login({
|
await authStore.login({
|
||||||
loginForm: model, //发送表单的数据
|
loginForm: model,
|
||||||
onError() {
|
onError() {
|
||||||
getCheckCode();//重新获取验证码
|
getCheckCode();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user