mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-04-29 13:01:26 +08:00
fix: lint
This commit is contained in:
@@ -50,8 +50,15 @@ import { extendsDefaultFormatter } from './extends';
|
||||
// 是否加载过
|
||||
let isInit = false;
|
||||
|
||||
// eslint-disable-next-line import/no-mutable-exports
|
||||
export let useTableForm: typeof useVbenForm;
|
||||
let tableFormFactory: typeof useVbenForm | undefined;
|
||||
|
||||
export const useTableForm: typeof useVbenForm = ((...args) => {
|
||||
if (!tableFormFactory) {
|
||||
throw new Error('useTableForm is not initialized');
|
||||
}
|
||||
|
||||
return tableFormFactory(...args);
|
||||
}) as typeof useVbenForm;
|
||||
|
||||
// 部分组件,如果没注册,vxe-table 会报错,这里实际没用组件,只是为了不报错,同时可以减少打包体积
|
||||
const createVirtualComponent = (name = '') => {
|
||||
@@ -104,7 +111,7 @@ export function setupVbenVxeTable(setupOptions: SetupVxeTable) {
|
||||
const { configVxeTable, useVbenForm } = setupOptions;
|
||||
|
||||
initVxeTable();
|
||||
useTableForm = useVbenForm;
|
||||
tableFormFactory = useVbenForm;
|
||||
|
||||
const { isDark, locale } = usePreferences();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user