mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-30 11:11:55 +08:00
fix: bugs
This commit is contained in:
parent
77067a11bb
commit
4b7e7d61f7
@ -1,12 +1,27 @@
|
|||||||
import { reactive } from 'vue'
|
import { computed, reactive } from 'vue'
|
||||||
import { VxeGridProps } from 'vxe-table'
|
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) => {
|
export const useVxeGrid = (allSchemas, getPageApi) => {
|
||||||
const gridOptions = reactive<VxeGridProps>({
|
const gridOptions = reactive<VxeGridProps>({
|
||||||
loading: false,
|
loading: false,
|
||||||
|
size: currentSize.value,
|
||||||
height: 800,
|
height: 800,
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
|
isCurrent: true,
|
||||||
isHover: true
|
isHover: true
|
||||||
},
|
},
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
|
@ -125,7 +125,7 @@ const handleLogin = async (params) => {
|
|||||||
redirect.value = '/'
|
redirect.value = '/'
|
||||||
}
|
}
|
||||||
push({ path: redirect.value || permissionStore.addRouters[0].path })
|
push({ path: redirect.value || permissionStore.addRouters[0].path })
|
||||||
} finally {
|
} catch {
|
||||||
loginLoading.value = false
|
loginLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user