mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
chore: ios 的 DragEvent 报错修复挪到 core 模块下 (#7154)
* chore: ios 的 DragEvent 报错修复挪到主项目中 * chore: ios 的 DragEvent 报错修复挪到 core 模块下
This commit is contained in:
parent
85810fea45
commit
a4f877587c
@ -18,10 +18,3 @@ import 'core-js/es/symbol';
|
||||
import './cloest';
|
||||
// @ts-ignore
|
||||
import './classList';
|
||||
|
||||
// ios 没有这个会报错
|
||||
if (!('DragEvent' in window)) {
|
||||
Object.defineProperty(window, 'DragEvent', {
|
||||
value: class DragEvent {}
|
||||
});
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import {
|
||||
extendDefaultEnv
|
||||
} from './factory';
|
||||
import type {RenderOptions, RendererConfig, RendererProps} from './factory';
|
||||
import './polyfills';
|
||||
import './renderers/builtin';
|
||||
import './renderers/register';
|
||||
export * from './utils/index';
|
||||
|
10
packages/amis-core/src/polyfills.ts
Normal file
10
packages/amis-core/src/polyfills.ts
Normal file
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 用于放一些关键的 polyfill
|
||||
*/
|
||||
|
||||
// ios 老版本没有这个会报错
|
||||
if (!('DragEvent' in window)) {
|
||||
Object.defineProperty(window, 'DragEvent', {
|
||||
value: class DragEvent {}
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user