|
@@ -1,32 +1,33 @@
|
|
|
-import { createApp } from "vue";
|
|
|
-import App from "./App.vue";
|
|
|
-import router from "./router";
|
|
|
-import { store } from "./store";
|
|
|
+import { createApp } from 'vue'
|
|
|
+import App from './App.vue'
|
|
|
+import router from './router'
|
|
|
+import { store } from './store'
|
|
|
// import 'amfe-flexible' // rem 布局适配
|
|
|
// import 'amfe-flexible/index.js'
|
|
|
-import "@/utils/flexible.js";
|
|
|
-import "@/styles/index.scss";
|
|
|
-import { Toast, Icon, Tab, Tabs, Loading, Popup } from "vant";
|
|
|
-import "@/permission";
|
|
|
-import "default-passive-events";
|
|
|
+import '@/permission'
|
|
|
+import '@/styles/index.scss'
|
|
|
+import '@/utils/flexible.js'
|
|
|
+import 'default-passive-events'
|
|
|
+import { Icon, Loading, Popup, Tab, Tabs, Toast } from 'vant'
|
|
|
+import 'vant/lib/index.css'
|
|
|
|
|
|
-const app = createApp(App);
|
|
|
+const app = createApp(App)
|
|
|
|
|
|
// Toast.setDefaultOptions()
|
|
|
const loadingStart = (duration: any = 0) => {
|
|
|
Toast.loading({
|
|
|
duration: duration, // 持续展示 toast
|
|
|
forbidClick: true
|
|
|
- });
|
|
|
-};
|
|
|
+ })
|
|
|
+}
|
|
|
const loadinngEnd = () => {
|
|
|
- Toast.clear();
|
|
|
-};
|
|
|
-app.config.globalProperties.$imgUrl = `http://api.sagacloud.cn/dp-auxiliary/image-service/common/image_get?systemId=dataPlatform`;
|
|
|
-app.config.globalProperties.$fileUrl = `http://api.sagacloud.cn/dp-auxiliary/image-service/common/file_get?systemId=dataPlatform`;
|
|
|
-app.config.globalProperties.$toast = Toast;
|
|
|
-app.config.globalProperties.$loadingStart = loadingStart;
|
|
|
-app.config.globalProperties.$loadinngEnd = loadinngEnd;
|
|
|
+ Toast.clear()
|
|
|
+}
|
|
|
+app.config.globalProperties.$imgUrl = 'http://api.sagacloud.cn/dp-auxiliary/image-service/common/image_get?systemId=dataPlatform'
|
|
|
+app.config.globalProperties.$fileUrl = 'http://api.sagacloud.cn/dp-auxiliary/image-service/common/file_get?systemId=dataPlatform'
|
|
|
+app.config.globalProperties.$toast = Toast
|
|
|
+app.config.globalProperties.$loadingStart = loadingStart
|
|
|
+app.config.globalProperties.$loadinngEnd = loadinngEnd
|
|
|
app
|
|
|
.use(Toast)
|
|
|
.use(Icon)
|
|
@@ -36,4 +37,4 @@ app
|
|
|
.use(Popup)
|
|
|
.use(store)
|
|
|
.use(router)
|
|
|
- .mount("#app");
|
|
|
+ .mount('#app')
|