@@ -1,4 +1,10 @@
import { createApp } from 'vue'
import App from '@/view/home.vue'
-createApp(App).mount('#app')
+const app = createApp(App)
+
+// 引入路由对象实例
+import router from '@/router/popup.js'
+app.use(router)
+console.log(router)
+app.mount('#app')
@@ -1,6 +1,5 @@
/* eslint-disable */
import { createRouter, createWebHashHistory, createWebHistory } from "vue-router"
-
import Home from '@/view/popup/popup.vue'
import Withdraw from '@/view/popup/withdraw/index.vue'
import WithdrawInfo from '@/view/popup/withdraw/info.vue'
@@ -9,8 +9,7 @@
<script setup>
import { onMounted, ref } from "vue";
-import popup from './popup/popup.vue'
+import popup from './popup/index.vue'
let contentStyle = ref({});
@@ -39,6 +38,7 @@ onMounted(() => {
box-sizing: border-box;
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.2);
border-radius: 15px;
+ position: relative;
}
/deep/ .page-wrapper {
@@ -111,7 +111,7 @@ function clickItem(path) {
.option {
position: absolute;
top: 43px;
- left: 120px;
+ right: 15px;
background: #fff;
filter: drop-shadow(0px 3px 20px rgba(0, 0, 0, 0.2));
width: 240px;
@@ -1,19 +1,32 @@
<template>
+ <div class="home_content" :class="{ popup_content: state.popup }">
<router-view></router-view>
+ </div>
</template>
-<script>
-export default {
- name: 'popup-home',
-}
+<script setup>
+import { reactive, onMounted } from 'vue'
+let state = reactive({
+ popup: true
+})
+onMounted(() => {
+ if (window.location.href.indexOf('home.html') > 0) {
+ state.popup = false
+ }
</script>
<style>
-#app{
- width: 375px;
- height: 600px;
- box-sizing: border-box;
- overflow-y: auto;
+.home_content{
+ width: 100%;
+ height: 100%;
+}
+.popup_content {
+ width: 375px;
+ height: 600px;
+ box-sizing: border-box;
+ overflow-y: auto;
</style>