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 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 17 export const useVxeGrid = (allSchemas, getPageApi) => {
5 18 const gridOptions = reactive<VxeGridProps>({
6 19 loading: false,
  20 + size: currentSize.value,
7 21 height: 800,
8 22 rowConfig: {
9 23 keyField: 'id',
  24 + isCurrent: true,
10 25 isHover: true
11 26 },
12 27 toolbarConfig: {
... ...
yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue
... ... @@ -125,7 +125,7 @@ const handleLogin = async (params) =&gt; {
125 125 redirect.value = '/'
126 126 }
127 127 push({ path: redirect.value || permissionStore.addRouters[0].path })
128   - } finally {
  128 + } catch {
129 129 loginLoading.value = false
130 130 }
131 131 }
... ...