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