import App from './App' // 引入 Vant 组件 import { ActionSheet, Cell, Search } from 'vant' // 引入 Vant 样式 import 'vant/lib/index.css' // #ifndef VUE3 import Vue from 'vue' import './uni.promisify.adaptor' Vue.config.productionTip = false App.mpType = 'app' // Vue2 环境下注册 Vant 组件 Vue.use(ActionSheet) Vue.use(Cell) const app = new Vue({ ...App }) app.$mount() // #endif // #ifdef VUE3 import { createSSRApp } from 'vue' export function createApp() { const app = createSSRApp(App) // Vue3 环境下注册 Vant 组件 app.use(ActionSheet) app.use(Cell) app.use(Search) return { app } } // #endif