File tree Expand file tree Collapse file tree 4 files changed +174
-21
lines changed Expand file tree Collapse file tree 4 files changed +174
-21
lines changed Original file line number Diff line number Diff line change 54
54
},
55
55
"devDependencies" : {
56
56
"@babel/generator" : " ^7.11.6" ,
57
+ "@rollup/plugin-dynamic-import-vars" : " ^1.4.1" ,
57
58
"@vue/cli-plugin-babel" : " ^4.2.0" ,
58
59
"@vue/cli-plugin-eslint" : " ^4.2.0" ,
59
60
"@vue/cli-plugin-pwa" : " ^4.2.0" ,
63
64
"eslint" : " ^6.7.2" ,
64
65
"eslint-plugin-import" : " ^2.20.1" ,
65
66
"eslint-plugin-vue" : " ^6.1.2" ,
67
+ "is-obj" : " ^3.0.0" ,
68
+ "is-regexp" : " ^3.0.0" ,
66
69
"lint-staged" : " ^9.5.0" ,
67
70
"sass" : " ^1.25.0" ,
68
- "sass-loader" : " ^8.0.2" ,
69
- "is-obj" : " ^3.0.0" ,
70
- "is-regexp" : " ^3.0.0"
71
+ "sass-loader" : " ^8.0.2"
71
72
},
72
73
"eslintConfig" : {
73
74
"root" : true ,
Original file line number Diff line number Diff line change
1
+ // 其它UI组件库应该在这里集成
2
+ function loadVant ( ) {
3
+ const vantLoadPromise = ( ( ) => import ( "vant" ) ) ( ) ;
4
+ ( ( ) => import ( "vant/lib/index.css" ) ) ( ) ;
5
+ vantLoadPromise . then ( ( vantModule ) => {
6
+ self . globalApp . use ( vantModule ) ;
7
+ } ) ;
8
+ }
9
+
10
+ function loadAntD ( ) {
11
+ const vantLoadPromise = ( ( ) => import ( "ant-design-vue" ) ) ( ) ;
12
+ ( ( ) => import ( "ant-design-vue/dist/antd.css" ) ) ( ) ;
13
+ vantLoadPromise . then ( ( vantModule ) => {
14
+ self . globalApp . use ( vantModule ) ;
15
+ } ) ;
16
+ }
17
+
18
+ loadAntD ( ) ;
19
+ loadVant ( ) ;
Original file line number Diff line number Diff line change @@ -8,17 +8,13 @@ import {
8
8
Refresh ,
9
9
Minus ,
10
10
} from "@element-plus/icons" ;
11
-
12
11
import "element-plus/dist/index.css" ;
13
- import APP from "./App.vue" ;
14
12
15
- import Antd from 'ant-design-vue' ;
16
- import 'ant-design-vue/dist/antd.css' ;
13
+ import APP from "./App.vue" ;
17
14
18
15
function createBaseApp ( renderComponent = { } ) {
19
16
const app = createApp ( renderComponent ) ;
20
17
app . use ( ElementPlus ) ;
21
- app . use ( Antd ) ;
22
18
23
19
app . component ( "question-filled" , QuestionFilled ) ;
24
20
app . component ( "circle-plus" , CirclePlus ) ;
@@ -38,13 +34,4 @@ self.createBaseApp = createBaseApp;
38
34
self . globalApp = globalApp ; // 内部需要使用Vuex
39
35
40
36
import ( "@/libs/store.js" ) ;
41
-
42
- function loadVant ( ) {
43
- const vantLoadPromise = ( ( ) => import ( "vant" ) ) ( ) ;
44
- ( ( ) => import ( "vant/lib/index.css" ) ) ( ) ;
45
- vantLoadPromise . then ( ( vantModule ) => {
46
- self . globalApp . use ( vantModule ) ;
47
- } ) ;
48
- }
49
-
50
- loadVant ( ) ;
37
+ import ( "@/libs/UIComponentInit.js" ) ;
You can’t perform that action at this time.
0 commit comments