mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-28 05:39:34 +08:00
fix(comp): fix the memory overflow problem of component containing keywords
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user