|
|
@@ -1,15 +1,25 @@
|
|
|
-import { createApp } from 'vue'
|
|
|
+import {
|
|
|
+ createApp
|
|
|
+} from 'vue'
|
|
|
import App from './App.vue'
|
|
|
import router from './router'
|
|
|
-import { setup } from '@/utils/componentHelper'
|
|
|
+import {
|
|
|
+ setup
|
|
|
+} from '@/utils/componentHelper'
|
|
|
import http from '@/api/http.js'
|
|
|
-import Dialog, { Toast, Alert,Loading, DialogContent } from '@/plugin/dialog/index.js'
|
|
|
+import Dialog, {
|
|
|
+ Toast,
|
|
|
+ Alert,
|
|
|
+ Loading,
|
|
|
+ DialogContent
|
|
|
+} from '@/plugin/dialog/index.js'
|
|
|
import '@/plugin/dialog/dialog.scss'
|
|
|
import 'vant/lib/index.css';
|
|
|
|
|
|
|
|
|
+
|
|
|
const components = setup(
|
|
|
- Dialog, Toast, Alert, DialogContent,Loading
|
|
|
+ Dialog, Toast, Alert, DialogContent, Loading
|
|
|
)
|
|
|
|
|
|
|
|
|
@@ -18,7 +28,18 @@ const CompoentsPlugin = (app) => {
|
|
|
}
|
|
|
|
|
|
const app = createApp(App)
|
|
|
+
|
|
|
+// 图片懒加载
|
|
|
+import {
|
|
|
+ Lazyload
|
|
|
+} from 'vant';
|
|
|
+app.use(Lazyload, {
|
|
|
+ loading: 'https://culture.4dage.com/hn_museum_game/images/default.png',
|
|
|
+ error: 'https://culture.4dage.com/hn_museum_game/images/default.png',
|
|
|
+ attempt: 1
|
|
|
+});
|
|
|
+
|
|
|
app.config.globalProperties.config = config
|
|
|
app.config.globalProperties.$Dialog = Dialog
|
|
|
app.config.globalProperties.$http = http
|
|
|
-app.use(router).use(CompoentsPlugin).mount('#app');
|
|
|
+app.use(router).use(CompoentsPlugin).mount('#app');
|