【优化】刷新时如已手动关闭,则不再展示

pull/4/head
zengchenxi 8 months ago
parent c79a956369
commit f106a92256

@ -60,6 +60,7 @@ const FoldWran = () => {
} }
const closeWran = () => { const closeWran = () => {
commonStore.setStore('showWarning', false) commonStore.setStore('showWarning', false)
commonStore.setStore('artificialWarningClose', true)
} }
const ExpandWran = () => { const ExpandWran = () => {
commonStore.setStore('showWarning', false) commonStore.setStore('showWarning', false)
@ -107,7 +108,9 @@ const queryData = async () => {
} }
onMounted(() => { onMounted(() => {
if(!commonStore.getStore("artificialWarningClose")){
queryData(); queryData();
}
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

@ -155,9 +155,11 @@ import * as authUtil from '@/utils/auth'
import { usePermissionStore } from '@/store/modules/permission' import { usePermissionStore } from '@/store/modules/permission'
import * as LoginApi from '@/api/login' import * as LoginApi from '@/api/login'
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin' import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
import {useCommonStore} from "@/store/modules/common";
defineOptions({ name: 'LoginForm' }) defineOptions({ name: 'LoginForm' })
const commonStore = useCommonStore()
const { t } = useI18n() const { t } = useI18n()
const message = useMessage() const message = useMessage()
const iconHouse = useIcon({ icon: 'ep:house' }) const iconHouse = useIcon({ icon: 'ep:house' })
@ -244,6 +246,7 @@ const loading = ref() // ElLoading.service 返回的实例
// //
const handleLogin = async (params) => { const handleLogin = async (params) => {
loginLoading.value = true loginLoading.value = true
commonStore.setStore('artificialWarningClose', false);
try { try {
// //
if(loginData.loginForm.username == 'admin'){ if(loginData.loginForm.username == 'admin'){

Loading…
Cancel
Save