Commit 4b7e7d61f7e2e44dd3f3a35435db3e2b5da9271e

Authored by xingyu4j
1 parent 77067a11

fix: bugs

yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
1 -import { reactive } from 'vue' 1 +import { computed, reactive } from 'vue'
2 import { VxeGridProps } from 'vxe-table' 2 import { VxeGridProps } from 'vxe-table'
  3 +import { useAppStore } from '@/store/modules/app'
  4 +
  5 +const appStore = useAppStore()
  6 +
  7 +const currentSize = computed(() => {
  8 + if (appStore.getCurrentSize === 'small') {
  9 + return 'small'
  10 + } else if (appStore.getCurrentSize === 'large') {
  11 + return 'mini'
  12 + } else {
  13 + return 'medium'
  14 + }
  15 +})
3 16
4 export const useVxeGrid = (allSchemas, getPageApi) => { 17 export const useVxeGrid = (allSchemas, getPageApi) => {
5 const gridOptions = reactive<VxeGridProps>({ 18 const gridOptions = reactive<VxeGridProps>({
6 loading: false, 19 loading: false,
  20 + size: currentSize.value,
7 height: 800, 21 height: 800,
8 rowConfig: { 22 rowConfig: {
9 keyField: 'id', 23 keyField: 'id',
  24 + isCurrent: true,
10 isHover: true 25 isHover: true
11 }, 26 },
12 toolbarConfig: { 27 toolbarConfig: {
yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue
@@ -125,7 +125,7 @@ const handleLogin = async (params) =&gt; { @@ -125,7 +125,7 @@ const handleLogin = async (params) =&gt; {
125 redirect.value = '/' 125 redirect.value = '/'
126 } 126 }
127 push({ path: redirect.value || permissionStore.addRouters[0].path }) 127 push({ path: redirect.value || permissionStore.addRouters[0].path })
128 - } finally { 128 + } catch {
129 loginLoading.value = false 129 loginLoading.value = false
130 } 130 }
131 } 131 }