import App from './App';

// 全局mixins，用于实现setData等功能，请勿删除！';
// import zpMixins from '@/uni_modules/zp-mixins/index.js';

// 2. 引入组件样式
import 'vant/lib/index.css';
import {
  Button,
  Tab,
  Tabs,
  Empty,
  Loading,
  Icon,
  CellGroup,
  Cell,
  NavBar,
  Popup,
  Picker,
  Rate,
  SwipeCell,
  Search,
  Uploader,
  NoticeBar,
  Checkbox,
  Cascader,
  Grid,
  GridItem,
  Dialog,
  Field,
  TimePicker,
  DatePicker,
  Form,
  CheckboxGroup,
} from 'vant';

import share from '@/utils/share.js'
import tootls from './utils/util.map.js'

// #ifndef VUE3
import Vue from 'vue';

// Vue.prototype.$tootls = tootls


// 导入并挂载全局的分享方法

Vue.config.productionTip = false;
App.mpType = 'app';
const app = new Vue({
  ...App
});
app.$mount();

// #endif

// #ifdef VUE3
import {
  createSSRApp
} from 'vue';
export function createApp() {
  const app = createSSRApp(App);
  app.config.globalProperties.$tootls = tootls;
  app.use(Button);
  app.use(Tab);
  app.use(Tabs);
  app.use(Empty);
  app.use(Loading);
  app.use(Icon);
  app.use(CellGroup);
  app.use(Cell);
  app.use(NavBar);
  app.use(Popup);
  app.use(Picker);
  app.use(Rate);
  app.use(SwipeCell);
  app.use(Search);
  app.use(Uploader);
  app.use(NoticeBar);
  app.use(Checkbox);
  app.use(Cascader);
  app.use(Grid);
  app.use(GridItem);
  app.use(Dialog);
  app.use(Field);
  app.use(TimePicker);
  app.use(DatePicker);
  app.use(Form);
  app.use(CheckboxGroup);
  // app.mixin(zpMixins);
  return {
    app
  };
}
// #endif