hn_platform_h5/src/main.js

37 lines
873 B
JavaScript

import { createSSRApp } from 'vue'
import App from './App.vue'
import pinia from './stores/index'
import uviewPlus from 'uview-plus'
import './static/index.scss'
import './static/uview-theme.scss'
// 百度地图配置 - 仅在 H5 平台使用
// #ifdef H5
import BaiduMap from 'vue-baidu-map-3x'
// #endif
export function createApp() {
const app = createSSRApp(App)
app.use(pinia)
app.use(uviewPlus, () => {
return {
options: {
config: {
loadFontOnce: false,
// 主题色配置
primary: '#07c160',
},
},
}
})
// #ifdef H5
// 注册百度地图组件,使用 location-map.html 中的 AK
app.use(BaiduMap, {
ak: 'iqyZkSZPurf61MhFV7hesbDukHdMBEEb',
})
// #endif
return {
app,
}
}