更新脚手架
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import { createPinia } from "pinia"
|
||||
import h5plugin from '@/plugins/plugin';
|
||||
// import h5plugin from '@/plugins';
|
||||
import { wxShare } from '@/plugins/wxshare';
|
||||
const app = createApp(App)
|
||||
|
||||
@@ -10,7 +10,7 @@ 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({
|
||||
|
||||
Reference in New Issue
Block a user