// #ifndef VUE3 import Vue from 'vue' import App from './App' import cuCustom from 'colorui/components/cu-custom.vue' import Data from './data.js' Vue.component('cu-custom',cuCustom) const data = type=>{ //模拟异步请求数据 return new Promise(resolve=>{ setTimeout(()=>{ resolve(Data[type]); }, 0) }) } Vue.prototype.$api = {data} Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ ...App }) app.$mount() // #endif // #ifdef VUE3 import { createSSRApp } from 'vue' import App from './App.vue' export function createApp() { const app = createSSRApp(App) return { app } } // #endif