| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import { createSSRApp } from "vue";
- import App from "./App";
- import store from "./store"; // store
- import plugins from "./plugins"; // plugins
- // import "./permission"; // permission
- // 引入json导出组件
- import JsonExcel from "vue-json-excel";
- // 引入UI组件
- import uviewPlus from "@/uni_modules/uview-plus";
- import oaCalendar from "@/components/oa-calendar/uni-calendar";
- import oaTabbar from "@/components/oa-tabbar/index";
- import oaUpload from "@/components/oa-upload/index"
- import oaScroll from "@/components/oa-scroll/index"
- import oaDropdown from "@/components/oa-dropdown/index"
- import oaUpgrade from "@/components/oa-upgrade/index"
- import oaWeather from "@/components/oa-weather/index"
- import oaSteps from "@/components/oa-steps/index"
- // import hideHead from "./utils/hideHead.js";
- export function createApp() {
- const app = createSSRApp(App);
- // app.mixin(hideHead);// 隐藏头部双重标题
- //挂载全局组件
- app.component('oa-calendar', oaCalendar)
- app.component('oa-tabbar', oaTabbar)
- app.component('oa-upload', oaUpload)
- app.component('oa-scroll', oaScroll)
- app.component('oa-dropdown', oaDropdown)
- app.component('oa-upgrade', oaUpgrade)
- app.component('oa-weather', oaWeather)
- app.component('oa-steps', oaSteps)
- // 挂载全局json导出
- app.component("downloadExcel", JsonExcel);
- // 添加全局变量
- app.provide("$store", store);
- app.config.globalProperties.$store = store;
- app
- .use(uviewPlus)
- .use(store)
- .use(plugins);
- return {
- app,
- };
- }
|