diff --git a/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts b/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts index 0469a2207..1366965bc 100644 --- a/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts +++ b/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts @@ -1,12 +1,27 @@ -import { reactive } from 'vue' +import { computed, reactive } from 'vue' import { VxeGridProps } from 'vxe-table' +import { useAppStore } from '@/store/modules/app' + +const appStore = useAppStore() + +const currentSize = computed(() => { + if (appStore.getCurrentSize === 'small') { + return 'small' + } else if (appStore.getCurrentSize === 'large') { + return 'mini' + } else { + return 'medium' + } +}) export const useVxeGrid = (allSchemas, getPageApi) => { const gridOptions = reactive({ loading: false, + size: currentSize.value, height: 800, rowConfig: { keyField: 'id', + isCurrent: true, isHover: true }, toolbarConfig: { diff --git a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue index 94d7d40cc..963cf37f5 100644 --- a/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue +++ b/yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue @@ -125,7 +125,7 @@ const handleLogin = async (params) => { redirect.value = '/' } push({ path: redirect.value || permissionStore.addRouters[0].path }) - } finally { + } catch { loginLoading.value = false } }