更新脚手架!
This commit is contained in:
14
src/page/Home/App.vue
Normal file
14
src/page/Home/App.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<HelloWorld></HelloWorld>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Loading from "@/components/HelloWorld";
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" ></style>
|
||||
36
src/page/Home/main.js
Normal file
36
src/page/Home/main.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import { createPinia } from "pinia"
|
||||
import 'vant/lib/index.css';
|
||||
import h5plugin from '@/plugins/plugin';
|
||||
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 (h5plugin.isMobile()) {
|
||||
// const vConsole = new VConsole();
|
||||
|
||||
}
|
||||
|
||||
app.use(createPinia())
|
||||
app.mount('#app')
|
||||
console.log('Mode:', import.meta.env.VITE_MODE);
|
||||
13
src/page/Share/App.vue
Normal file
13
src/page/Share/App.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div class="SharePage">share</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.SharePage {
|
||||
@include fixed();
|
||||
@include flexCen();
|
||||
}
|
||||
</style>
|
||||
24
src/page/Share/main.js
Normal file
24
src/page/Share/main.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import { createPinia } from "pinia"
|
||||
import h5plugin from '@/plugins/plugin';
|
||||
import { wxShare } from '@/plugins/wxshare';
|
||||
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',
|
||||
})
|
||||
|
||||
app.use(createPinia())
|
||||
app.mount('#app')
|
||||
console.log('Mode:', import.meta.env.VITE_MODE);
|
||||
Reference in New Issue
Block a user