29 lines
641 B
TypeScript
29 lines
641 B
TypeScript
import { createSSRApp } from 'vue'
|
|
import { createPinia } from 'pinia'
|
|
import App from './App.vue'
|
|
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
const pinia = createPinia()
|
|
app.use(pinia)
|
|
|
|
// #ifdef MP-WEIXIN
|
|
// 全局分享配置,页面可通过定义 onShareAppMessage/onShareTimeline 覆盖
|
|
app.mixin({
|
|
onShareAppMessage() {
|
|
return {
|
|
title: '小菜记账 — 轻松记账,快乐生活',
|
|
path: '/pages/index/index'
|
|
}
|
|
},
|
|
onShareTimeline() {
|
|
return {
|
|
title: '小菜记账 — 轻松记账,快乐生活'
|
|
}
|
|
}
|
|
})
|
|
// #endif
|
|
|
|
return { app }
|
|
}
|