fix(comp): fix the memory overflow problem of component containing keywords

This commit is contained in:
vben
2020-12-12 00:15:36 +08:00
parent 0434030f27
commit 6b3195b4ca
33 changed files with 155 additions and 90 deletions

View File

@@ -1,5 +1,7 @@
import './index.less';
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
import type { PropType } from 'vue';
import {
defineComponent,
@@ -14,7 +16,7 @@ import {
import Iconify from '@purge-icons/generated';
import { isString } from '/@/utils/is';
import { propTypes } from '/@/utils/propTypes';
export default defineComponent({
const Icon = defineComponent({
name: 'GIcon',
props: {
// icon name
@@ -81,3 +83,9 @@ export default defineComponent({
);
},
});
export default createAsyncComponent(() => {
return new Promise((resolve) => {
resolve(Icon);
});
});