| import { createApp } from 'vue' | 
| import mitt from 'mitt' | 
| // import VConsole from 'vconsole' | 
| import App from './App.vue' | 
| import router from './router' | 
| import store from './store' | 
| // @ts-ignore | 
| // import QrcodeReaderVue3 from 'qrcode-reader-vue3' | 
| import Vant from 'vant' | 
| import * as dd from 'dingtalk-jsapi' | 
| import 'vant/lib/index.css' | 
| import 'lib-flexible/flexible.js' | 
| import { auth } from '@/utils/utils' | 
| // const vConsole = new VConsole() | 
| import ScanCode from '@/components/common/ScanCode.vue' | 
| import Search from '@/components/common/Search.vue' | 
|   | 
| const app = createApp(App) | 
|   | 
| app.config.globalProperties.$Bus = mitt() | 
|   | 
| app.config.globalProperties.$onWait = new Promise((resolve) => { | 
|     app.config.globalProperties.$reslove = resolve | 
| }) | 
|   | 
| app.config.globalProperties.$dd = dd    // 全局挂载钉钉 | 
|   | 
| app.config.globalProperties.$auth = auth    // 全局挂载权限验证方法 | 
|   | 
| if (dd.env.platform !== 'notInDingTalk') {      // 顶顶段禁止IOS回弹效果 | 
|     // @ts-ignore | 
|     dd.ui.webViewBounce.disable() | 
| } | 
|   | 
| app.component('v-ScanCode', ScanCode)     // 挂载全局扫码组件 | 
|   | 
| app.component('v-Search', Search)     // 挂载全局搜索组件 | 
|   | 
| app.directive('preventReClick', {    // 防止按钮重复提交 | 
|     mounted(el, bindings, vnode, preVnode) { | 
|         el.addEventListener('click', () => { | 
|             if (!el.disabled) { | 
|                 el.disabled = true | 
|                 setTimeout(() => { | 
|                     el.disabled = false | 
|                 },bindings.value || 2000) | 
|             } | 
|         }) | 
|     } | 
| }) | 
|   | 
| app.use(store) | 
|    .use(router) | 
|    .use(Vant) | 
|     // @ts-ignore | 
| //    .use(vConsole) | 
| app.mount('#app') |