提交 feadf64e 编写于 作者: V vben

fix: Icon加载问题

上级 553ee9c7
...@@ -31,13 +31,6 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) { ...@@ -31,13 +31,6 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) {
const pathResolve = (pathname: string) => resolve(root, '.', pathname); const pathResolve = (pathname: string) => resolve(root, '.', pathname);
const applicationConfig: UserConfig = { const applicationConfig: UserConfig = {
optimizeDeps: {
include: [
'@iconify/iconify',
'ant-design-vue/es/locale/zh_CN',
'ant-design-vue/es/locale/en_US',
],
},
resolve: { resolve: {
alias: [ alias: [
{ {
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
import { computed, unref, ref, watch, nextTick } from 'vue'; import { computed, unref, ref, watch, nextTick } from 'vue';
import { SearchOutlined } from '@ant-design/icons-vue'; import { SearchOutlined } from '@ant-design/icons-vue';
import AppSearchFooter from './AppSearchFooter.vue'; import AppSearchFooter from './AppSearchFooter.vue';
import Icon from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
// @ts-ignore // @ts-ignore
import vClickOutside from '/@/directives/clickOutside'; import vClickOutside from '/@/directives/clickOutside';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import type { ContextMenuItem, ItemContentProps, Axis } from './typing'; import type { ContextMenuItem, ItemContentProps, Axis } from './typing';
import type { FunctionalComponent, CSSProperties, PropType } from 'vue'; import type { FunctionalComponent, CSSProperties, PropType } from 'vue';
import { defineComponent, nextTick, onMounted, computed, ref, unref, onUnmounted } from 'vue'; import { defineComponent, nextTick, onMounted, computed, ref, unref, onUnmounted } from 'vue';
import Icon from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import { Menu, Divider } from 'ant-design-vue'; import { Menu, Divider } from 'ant-design-vue';
const prefixCls = 'context-menu'; const prefixCls = 'context-menu';
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import type { ButtonProps } from '/@/components/Button'; import type { ButtonProps } from '/@/components/Button';
import Icon from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
const props = { const props = {
width: { type: [String, Number], default: '200px' }, width: { type: [String, Number], default: '200px' },
......
...@@ -3,5 +3,3 @@ import SvgIcon from './src/SvgIcon.vue'; ...@@ -3,5 +3,3 @@ import SvgIcon from './src/SvgIcon.vue';
import IconPicker from './src/IconPicker.vue'; import IconPicker from './src/IconPicker.vue';
export { Icon, IconPicker, SvgIcon }; export { Icon, IconPicker, SvgIcon };
export default Icon;
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<script lang="ts"> <script lang="ts">
import { computed, defineComponent } from 'vue'; import { computed, defineComponent } from 'vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import { contentProps } from '../props'; import { contentProps } from '../props';
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
import { defineComponent, computed } from 'vue'; import { defineComponent, computed } from 'vue';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import MenuItem from './components/MenuItem.vue'; import MenuItem from './components/MenuItem.vue';
import SubMenu from './components/SubMenuItem.vue'; import SubMenu from './components/SubMenuItem.vue';
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
import { useMenuItem } from './useMenu'; import { useMenuItem } from './useMenu';
import { useSimpleRootMenuContext } from './useSimpleMenuContext'; import { useSimpleRootMenuContext } from './useSimpleMenuContext';
import { CollapseTransition } from '/@/components/Transition'; import { CollapseTransition } from '/@/components/Transition';
import Icon from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import { Popover } from 'ant-design-vue'; import { Popover } from 'ant-design-vue';
import { isBoolean, isObject } from '/@/utils/is'; import { isBoolean, isObject } from '/@/utils/is';
import { mitt } from '/@/utils/mitt'; import { mitt } from '/@/utils/mitt';
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
import { defineComponent, PropType, computed, toRaw, unref } from 'vue'; import { defineComponent, PropType, computed, toRaw, unref } from 'vue';
import { MoreOutlined } from '@ant-design/icons-vue'; import { MoreOutlined } from '@ant-design/icons-vue';
import { Divider, Tooltip, TooltipProps } from 'ant-design-vue'; import { Divider, Tooltip, TooltipProps } from 'ant-design-vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import { ActionItem, TableActionType } from '/@/components/Table'; import { ActionItem, TableActionType } from '/@/components/Table';
import { PopConfirmButton } from '/@/components/Button'; import { PopConfirmButton } from '/@/components/Button';
import { Dropdown } from '/@/components/Dropdown'; import { Dropdown } from '/@/components/Dropdown';
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
import { defineComponent, ref, watchEffect } from 'vue'; import { defineComponent, ref, watchEffect } from 'vue';
import { Breadcrumb } from 'ant-design-vue'; import { Breadcrumb } from 'ant-design-vue';
import Icon from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import { useRootSetting } from '/@/hooks/setting/useRootSetting'; import { useRootSetting } from '/@/hooks/setting/useRootSetting';
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, computed } from 'vue'; import { defineComponent, computed } from 'vue';
import { Tooltip, Badge } from 'ant-design-vue'; import { Tooltip, Badge } from 'ant-design-vue';
import Icon from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { useErrorLogStore } from '/@/store/modules/errorLog'; import { useErrorLogStore } from '/@/store/modules/errorLog';
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
import { computed, defineComponent, getCurrentInstance } from 'vue'; import { computed, defineComponent, getCurrentInstance } from 'vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import { propTypes } from '/@/utils/propTypes'; import { propTypes } from '/@/utils/propTypes';
export default defineComponent({ export default defineComponent({
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import SettingDrawer from './SettingDrawer'; import SettingDrawer from './SettingDrawer';
import Icon from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import { useDrawer } from '/@/components/Drawer'; import { useDrawer } from '/@/components/Drawer';
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { List, Card, Row, Col } from 'ant-design-vue'; import { List, Card, Row, Col } from 'ant-design-vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import { applicationList } from './data'; import { applicationList } from './data';
export default defineComponent({ export default defineComponent({
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { List, Tag } from 'ant-design-vue'; import { List, Tag } from 'ant-design-vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import { actions, articleList } from './data'; import { actions, articleList } from './data';
export default defineComponent({ export default defineComponent({
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
import { Tag, Tabs, Row, Col } from 'ant-design-vue'; import { Tag, Tabs, Row, Col } from 'ant-design-vue';
import { defineComponent, computed } from 'vue'; import { defineComponent, computed } from 'vue';
import { CollapseContainer } from '/@/components/Container/index'; import { CollapseContainer } from '/@/components/Container/index';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import Article from './Article.vue'; import Article from './Article.vue';
import Application from './Application.vue'; import Application from './Application.vue';
import Project from './Project.vue'; import Project from './Project.vue';
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
import { List } from 'ant-design-vue'; import { List } from 'ant-design-vue';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { CollapseContainer } from '/@/components/Container/index'; import { CollapseContainer } from '/@/components/Container/index';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import { accountBindList } from './data'; import { accountBindList } from './data';
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<script lang="ts"> <script lang="ts">
import { Progress, Row, Col, List } from 'ant-design-vue'; import { Progress, Row, Col, List } from 'ant-design-vue';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import { cardList } from './data'; import { cardList } from './data';
import { PageWrapper } from '/@/components/Page'; import { PageWrapper } from '/@/components/Page';
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import { cardList } from './data'; import { cardList } from './data';
import { PageWrapper } from '/@/components/Page'; import { PageWrapper } from '/@/components/Page';
import { Card, Row, Col, List } from 'ant-design-vue'; import { Card, Row, Col, List } from 'ant-design-vue';
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<script lang="ts"> <script lang="ts">
import { Tag, List } from 'ant-design-vue'; import { Tag, List } from 'ant-design-vue';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
import { BasicForm } from '/@/components/Form/index'; import { BasicForm } from '/@/components/Form/index';
import { actions, searchList, schemas } from './data'; import { actions, searchList, schemas } from './data';
import { PageWrapper } from '/@/components/Page'; import { PageWrapper } from '/@/components/Page';
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import { IVFormComponent } from '../../../typings/v-form-component'; import { IVFormComponent } from '../../../typings/v-form-component';
import { remove } from '../../../utils'; import { remove } from '../../../utils';
import { useFormDesignState } from '../../../hooks/useFormDesignState'; import { useFormDesignState } from '../../../hooks/useFormDesignState';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
export default defineComponent({ export default defineComponent({
name: 'FormNodeOperate', name: 'FormNodeOperate',
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
import { remove } from '../../../utils'; import { remove } from '../../../utils';
import message from '../../../utils/message'; import message from '../../../utils/message';
import { Input } from 'ant-design-vue'; import { Input } from 'ant-design-vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
export default defineComponent({ export default defineComponent({
name: 'FormOptions', name: 'FormOptions',
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
import { useFormDesignState } from '../../../hooks/useFormDesignState'; import { useFormDesignState } from '../../../hooks/useFormDesignState';
import { isArray } from 'lodash-es'; import { isArray } from 'lodash-es';
import { Form, FormItem, AutoComplete, Input } from 'ant-design-vue'; import { Form, FormItem, AutoComplete, Input } from 'ant-design-vue';
import Icon from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
export default defineComponent({ export default defineComponent({
name: 'RuleProps', name: 'RuleProps',
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
import { UseRefHistoryReturn } from '@vueuse/core'; import { UseRefHistoryReturn } from '@vueuse/core';
import { IFormConfig } from '../../../typings/v-form-component'; import { IFormConfig } from '../../../typings/v-form-component';
import { Tooltip, Divider } from 'ant-design-vue'; import { Tooltip, Divider } from 'ant-design-vue';
import Icon from '/@/components/Icon/index'; import { Icon } from '/@/components/Icon/index';
interface IToolbarsConfig { interface IToolbarsConfig {
type: string; type: string;
......
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
</Col> </Col>
</template> </template>
<script lang="ts"> <script lang="ts">
import { type Recordable } from '@vben/types';
import { defineComponent, reactive, toRefs, computed, PropType, unref } from 'vue'; import { defineComponent, reactive, toRefs, computed, PropType, unref } from 'vue';
import { componentMap } from '../../core/formItemConfig'; import { componentMap } from '../../core/formItemConfig';
import { IVFormComponent, IFormConfig } from '../../typings/v-form-component'; import { IVFormComponent, IFormConfig } from '../../typings/v-form-component';
import { asyncComputed } from '@vueuse/core'; import { asyncComputed } from '@vueuse/core';
import { handleAsyncOptions } from '../../utils'; import { handleAsyncOptions } from '../../utils';
import { omit } from 'lodash-es'; import { omit } from 'lodash-es';
import { type Recordable } from '@vben/types';
import { Tooltip, FormItem, Divider, Col } from 'ant-design-vue'; import { Tooltip, FormItem, Divider, Col } from 'ant-design-vue';
import { Icon } from '/@/components/Icon'; import { Icon } from '/@/components/Icon';
import { useFormModelState } from '../../hooks/useFormDesignState'; import { useFormModelState } from '../../hooks/useFormDesignState';
......
...@@ -2,6 +2,18 @@ import { defineApplicationConfig } from '@vben/vite-config'; ...@@ -2,6 +2,18 @@ import { defineApplicationConfig } from '@vben/vite-config';
export default defineApplicationConfig({ export default defineApplicationConfig({
overrides: { overrides: {
optimizeDeps: {
include: [
'echarts/core',
'echarts/charts',
'echarts/components',
'echarts/renderers',
'qrcode',
'@iconify/iconify',
'ant-design-vue/es/locale/zh_CN',
'ant-design-vue/es/locale/en_US',
],
},
server: { server: {
proxy: { proxy: {
'/basic-api': { '/basic-api': {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册