更新脚手架

This commit is contained in:
Andy Leong
2023-12-31 01:45:02 +08:00
parent c0871a9b1f
commit fab1b96137
12 changed files with 615 additions and 494 deletions

View File

@@ -1,14 +1,41 @@
<template>
<HelloWorld></HelloWorld>
<div class="home">
<Loading v-if="showLoad" @LoadPage="loadFn"></Loading>
<Index v-if="showIndex" @IndexPage="indexFn"></Index>
</div>
</template>
<script setup>
import Loading from "@/components/HelloWorld";
import Loading from "@/components/Loading.vue";
import Index from "@/components/Index.vue";
onMounted(() => {
const showLoad = ref(true);
const loadFn = (item) => {
if (item.action == "hide") {
showLoad.value = false;
showIndex.value = true;
}
};
const showIndex = ref(false);
const indexFn = (item) => {
if (item.action == "hide") {
showIndex.value = false;
}
};
})
onMounted(() => {});
</script>
<style lang="scss" ></style>
<style lang="scss" >
#app {
overflow: hidden;
background-color: rgb(255, 255, 255);
}
.home {
@include box(750px, 100vh);
// position: relative;
overflow: hidden;
margin: 0 auto;
}
</style>

View File

@@ -2,11 +2,9 @@ import { createApp } from 'vue'
import App from './App.vue'
import { createPinia } from "pinia"
import 'vant/lib/index.css';
import h5plugin from '@/plugins/plugin';
import { isMobile } from '@/plugins';
import { wxShare } from '@/plugins/wxshare';
// import VConsole from 'vconsole';
import VConsole from 'vconsole';
const app = createApp(App)
@@ -15,8 +13,10 @@ const app = createApp(App)
app.config.globalProperties.imgUrl = (url) => {
return new URL(`./assets/images/${url}`, import.meta.url).href
}
// 初始化我的方法
app.config.globalProperties.myPlugin = h5plugin
// app.config.globalProperties.myPlugin = h5plugin
// 微信分享配置
wxShare({
@@ -26,7 +26,7 @@ wxShare({
})
// 测试环境开vconsole
if (h5plugin.isMobile()) {
if (isMobile()) {
// const vConsole = new VConsole();
}