import App from "./App";
import * as Pinia from "pinia";
import uviewPlus from "@/uni_modules/uview-plus";

import { createSSRApp } from "vue";
export function createApp() {
  const app = createSSRApp(App);
  app.use(Pinia.createPinia());

  app.use(uviewPlus, () => {
    return {
      options: {
        // 修改$u.config对象的属性
        config: {
          // 修改默认单位为rpx，相当于执行 uni.$u.config.unit = 'rpx'
          unit: "rpx",
		  interceptor: {
		    navbarLeftClick: () => {
		      console.log("全局拦截");
		    },
		  },
          // customIcon: {
          // family: 'iconfont',
          // url: '//at.alicdn.com/t/c/font_4946742_e8oa3t01rkk.css'
          // }
        },
      },
    };
  });

  return {
    app,
  };
}
