palc-newyear2024/src/page/Home/main.js
2024-01-11 16:10:51 +08:00

36 lines
801 B
JavaScript

import { createApp } from 'vue'
import App from './App.vue'
import { createPinia } from "pinia"
import 'vant/lib/index.css';
import { isMobile } from '@/plugins';
import { wxShare } from '@/plugins/wxshare';
import VConsole from 'vconsole';
const app = createApp(App)
// 定义引入图片地址的全局方法
app.config.globalProperties.imgUrl = (url) => {
return new URL(`./assets/images/${url}`, import.meta.url).href
}
// 初始化我的方法
// app.config.globalProperties.myPlugin = h5plugin
// 微信分享配置
wxShare({
title: '分享标题',
desc: '分享描述',
link: '/index.html'
})
// 测试环境开vconsole
if (isMobile()) {
// const vConsole = new VConsole();
}
app.use(createPinia())
app.mount('#app')
console.log('Mode:', import.meta.env.VITE_MODE);