myprint-design
Version:
操作简单,组件丰富的一站式打印解决方案打印设计器
1 lines • 3.4 kB
Source Map (JSON)
{"version":3,"file":"install.mjs","sources":["../../../src/install.ts"],"sourcesContent":["import { App } from 'vue-demi';\nimport 'vue3-colorpicker/style.css';\n\nimport { mittKey } from './constants/keys';\n\nimport { createPinia } from 'pinia';\nimport piniaPluginPersistedstate from 'pinia-plugin-persistedstate';\nimport Vue3ColorPicker from 'vue3-colorpicker';\nimport VueCropper from 'vue-cropper';\nimport 'vue-cropper/dist/index.css';\n// import i18n from \"./locales\";\nimport { useSocket } from './stores/socket';\nimport { mitt } from './utils/utils';\nimport { useConfigStore } from './stores/config';\nimport { installPrinter, myPrintOptions } from './printer';\nimport { initDisplayRatio } from './utils/devicePixelRatio';\nimport { installMessage } from './components/my/message/my-message';\n\nconst install = {\n install(app: App<any>): any {\n // 插件逻辑\n // comps.map((component:any)=>{\n // Vue.component(component.__name as string, component);\n // })\n // console.log('~~~MyPrint 初始化~~~');\n // console.log(app)\n\n if (app.config.globalProperties.$pinia) {\n // Pinia 插件已安装\n } else {\n const pinia = createPinia();\n pinia.use(piniaPluginPersistedstate);\n // @ts-ignore\n app.use(pinia);\n }\n app\n // .use(i18n)\n .use(VueCropper)\n // @ts-ignore\n .use(Vue3ColorPicker);\n app.provide(mittKey, mitt);\n if (!myPrintOptions.disabledClient) {\n useSocket().INIT_SOCKET();\n }\n useConfigStore().initConfig();\n\n installPrinter(app);\n installMessage(app);\n\n initDisplayRatio();\n\n const container = document.createElement('div');\n container.classList.add('my-popover_container');\n document.body.appendChild(container);\n }\n};\nexport { install };\n\n\n// export * from './index'\n// function loadFonts() {\n\n\n// let style = document.createElement('style');\n// style.type = \"text/css\";\n// let text = ` @font-face {\n// font-family:'AlimamaShuHeiTi-Bold';\n// src:url('./src/assets/fonts/AlimamaShuHeiTi-Bold.ttf')\n// }`\n// console.log(text)\n// style.innerText = text;\n// document.head.appendChild(style)\n\n\n// const fontStyles = document.createElement('link');\n// fontStyles.href = '/fonts.css';\n// fontStyles.rel = 'stylesheet';\n// document.head.appendChild(fontStyles);\n// }\n"],"names":["piniaPluginPersistedstate"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,OAAU,GAAA;AAAA,EACZ,QAAQ,GAAoB,EAAA;AAQxB,IAAI,IAAA,GAAA,CAAI,MAAO,CAAA,gBAAA,CAAiB,MAAQ,EAAA;AAAA,KAEjC,MAAA;AACH,MAAA,MAAM,QAAQ,WAAY,EAAA,CAAA;AAC1B,MAAA,KAAA,CAAM,IAAIA,WAAyB,CAAA,CAAA;AAEnC,MAAA,GAAA,CAAI,IAAI,KAAK,CAAA,CAAA;AAAA,KACjB;AACA,IAAA,GAAA,CAEK,GAAI,CAAA,UAAU,CAEd,CAAA,GAAA,CAAI,eAAe,CAAA,CAAA;AACxB,IAAI,GAAA,CAAA,OAAA,CAAQ,SAAS,IAAI,CAAA,CAAA;AACzB,IAAI,IAAA,CAAC,eAAe,cAAgB,EAAA;AAChC,MAAA,SAAA,GAAY,WAAY,EAAA,CAAA;AAAA,KAC5B;AACA,IAAA,cAAA,GAAiB,UAAW,EAAA,CAAA;AAE5B,IAAA,cAAA,CAAe,GAAG,CAAA,CAAA;AAClB,IAAA,cAAA,CAAe,GAAG,CAAA,CAAA;AAElB,IAAiB,gBAAA,EAAA,CAAA;AAEjB,IAAM,MAAA,SAAA,GAAY,QAAS,CAAA,aAAA,CAAc,KAAK,CAAA,CAAA;AAC9C,IAAU,SAAA,CAAA,SAAA,CAAU,IAAI,sBAAsB,CAAA,CAAA;AAC9C,IAAS,QAAA,CAAA,IAAA,CAAK,YAAY,SAAS,CAAA,CAAA;AAAA,GACvC;AACJ;;;;"}