mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:前端webpack版本
This commit is contained in:
@@ -31,6 +31,7 @@ import * as olineDicgt from '@/common/staticDict/online';
|
||||
import * as flowDict from '@/common/staticDict/flow';
|
||||
|
||||
import { ANY_OBJECT } from '@/types/generic';
|
||||
import { debounce } from 'lodash';
|
||||
|
||||
function useTable(app: ANY_OBJECT) {
|
||||
app.use(VxeTable).use(VxeColumn).use(Edit);
|
||||
@@ -41,6 +42,15 @@ function useStaticDict(app: ANY_OBJECT, staticDict: ANY_OBJECT) {
|
||||
});
|
||||
}
|
||||
|
||||
// webpack需要重写ResizeObserver,否则会报错
|
||||
const resizeObserver = window.ResizeObserver;
|
||||
window.ResizeObserver = class ResizeObserver extends resizeObserver {
|
||||
constructor(callback) {
|
||||
callback = debounce(callback, 10);
|
||||
super(callback);
|
||||
}
|
||||
};
|
||||
|
||||
const app = createApp(App);
|
||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component);
|
||||
|
||||
Reference in New Issue
Block a user