fangxiaoting_branch
parent
39951be00e
commit
b7d8754406
@ -1,117 +0,0 @@
|
||||
<template>
|
||||
<div class="home-container">
|
||||
<h1>首页</h1>
|
||||
|
||||
<div class="search-container">
|
||||
<input type="text" class="search-input" placeholder="世界这么大出去看看吧">
|
||||
<button class="search-button" @click="gotoSearchPage()">搜索</button>
|
||||
</div>
|
||||
|
||||
<div class="image-container">
|
||||
<img src="../../photos/background.png" alt="图片描述" class="search-image">
|
||||
</div>
|
||||
|
||||
<div class="footer-nav">
|
||||
<button>首页</button>
|
||||
<button @click="gotomessage()">消息</button>
|
||||
<button @click="gotomine()">我的</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
/* 添加样式以定义图片的大小和位置 */
|
||||
.image-container {
|
||||
text-align: center; /* 或者根据你的需求来设置 */
|
||||
margin-top: 20px; /* 你可以根据需要调整这个值 */
|
||||
}
|
||||
|
||||
.home-container {
|
||||
/* 添加你的样式 */
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
/* 可能需要为内容添加一些底部空间以容纳底部导航 */
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
/* 定义搜索框容器的样式 */
|
||||
text-align: center;
|
||||
margin-bottom: 20px; /* 根据需要添加一些底部间距 */
|
||||
display: flex;
|
||||
align-items: center; /* 垂直居中 */
|
||||
justify-content: center; /* 水平居中(如果不需要完全居中,可以去掉这个)*/
|
||||
}
|
||||
|
||||
.search-input {
|
||||
/* 定义搜索框的样式 */
|
||||
flex: 1; /* 占据剩余空间 */
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.search-button {
|
||||
/* 定义搜索按钮的样式 */
|
||||
margin-left: 10px; /* 与搜索框之间的间距 */
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
background-color: #ccc;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search-button:hover {
|
||||
/* 搜索按钮点击时的样式 */
|
||||
background-color: #bbb;
|
||||
}
|
||||
|
||||
.footer-nav {
|
||||
/* 定义底部导航的样式 */
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 10px;
|
||||
background-color: #f5f5f5; /* 示例背景色 */
|
||||
}
|
||||
|
||||
.footer-nav button {
|
||||
/* 定义按钮的样式 */
|
||||
flex: 1;
|
||||
border: none;
|
||||
padding: 10px;
|
||||
background-color: #ccc;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footer-nav button:hover {
|
||||
/* 按钮点击时的样式 */
|
||||
background-color: #bbb;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Home',
|
||||
methods: {
|
||||
gotohome() {
|
||||
this.$router.push('/home');
|
||||
},
|
||||
gotomessage() {
|
||||
this.$router.push('/message');
|
||||
},
|
||||
gotomine() {
|
||||
this.$router.push('/mine');
|
||||
},
|
||||
gotoSearchPage() {
|
||||
this.$router.push('/searchPage');
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,11 +0,0 @@
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -1,67 +0,0 @@
|
||||
<template>
|
||||
<div class="home-container">
|
||||
<h1>消息页面</h1>
|
||||
|
||||
<!-- 在这里添加你的主页内容 -->
|
||||
|
||||
<div class="footer-nav">
|
||||
<button @click="gotohome()">首页</button>
|
||||
<button @click="gotomessage()">消息</button>
|
||||
<button @click="gotomine()">我的</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.home-container {
|
||||
/* 添加你的样式 */
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
/* 可能需要为内容添加一些底部空间以容纳底部导航 */
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
.footer-nav {
|
||||
/* 定义底部导航的样式 */
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 10px;
|
||||
background-color: #f5f5f5; /* 示例背景色 */
|
||||
}
|
||||
|
||||
.footer-nav button {
|
||||
/* 定义按钮的样式 */
|
||||
flex: 1;
|
||||
border: none;
|
||||
padding: 10px;
|
||||
background-color: #ccc;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footer-nav button:hover {
|
||||
/* 按钮点击时的样式 */
|
||||
background-color: #bbb;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Message',
|
||||
methods: {
|
||||
gotohome() {
|
||||
this.$router.push('/home');
|
||||
},
|
||||
gotomessage() {
|
||||
this.$router.push('/message');
|
||||
},
|
||||
gotomine() {
|
||||
this.$router.push('/mine');
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,45 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watchEffect } from 'vue'
|
||||
import { format } from 'date-fns'
|
||||
const startDateValue = ref(format(new Date(), 'yyyy-MM-dd'))
|
||||
const endDateValue = ref(format(new Date(), 'yyyy-MM-dd'))
|
||||
watchEffect(() => {
|
||||
console.log('startDateValue:', startDateValue.value)
|
||||
console.log('endDateValue:', endDateValue.value)
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<VueDatePicker
|
||||
placeholder="请选择预计出发日期"
|
||||
:min-date="new Date()"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="startDateValue" />
|
||||
<VueDatePicker
|
||||
placeholder="请选择预计返回日期"
|
||||
:min-date="new Date()"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="endDateValue" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watchEffect } from 'vue'
|
||||
import { format } from 'date-fns'
|
||||
const startDateValue = ref(format(new Date(), 'yyyy-MM-dd'))
|
||||
const endDateValue = ref(format(new Date(), 'yyyy-MM-dd'))
|
||||
watchEffect(() => {
|
||||
console.log('startDateValue:', startDateValue.value)
|
||||
console.log('endDateValue:', endDateValue.value)
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<VueDatePicker
|
||||
placeholder="请选择预计出发日期"
|
||||
:min-date="new Date()"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="startDateValue" />
|
||||
<VueDatePicker
|
||||
placeholder="请选择预计返回日期"
|
||||
:min-date="new Date()"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="endDateValue" />
|
||||
</template>
|
Loading…
Reference in new issue