修复文件选择器只有1个tab时默认选中错误的bug

This commit is contained in:
阿辉
2024-11-15 18:54:15 +08:00
parent 98413bf125
commit ed3e3f12e0

View File

@@ -87,7 +87,7 @@ const props = defineProps({
valueKey: { type: String, default: 'id' }, valueKey: { type: String, default: 'id' },
} as any); } as any);
const selectVisiable = ref<boolean>(false); const selectVisiable = ref<boolean>(false);
const tabsActived = ref<number>(0); const tabsActived = ref<number>([3, 2, 1, 0][((props.tabsShow & (props.tabsShow - 1)) === 0) ? Math.log2(props.tabsShow) : 3]);
const fileApiPrefix = '/api/system/file/'; const fileApiPrefix = '/api/system/file/';
const fileApi = { const fileApi = {
GetList: (query: UserPageQuery) => request({ url: fileApiPrefix, method: 'get', params: query }), GetList: (query: UserPageQuery) => request({ url: fileApiPrefix, method: 'get', params: query }),