feat: 调整项目结构
This commit is contained in:
67
src/pages/goods/components/DateSelector/index.vue
Normal file
67
src/pages/goods/components/DateSelector/index.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<view class="date-selector" @click="showCalendar">
|
||||
<view class="date-item">
|
||||
<view class="date-label">入住日期</view>
|
||||
<view class="date-box">
|
||||
<view class="date-content">
|
||||
<text class="date-text">{{ checkInDate }}</text>
|
||||
<text class="day-text">{{ checkInDay }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="nights-info">
|
||||
<text class="nights-text">{{ nights }}晚</text>
|
||||
</view>
|
||||
|
||||
<view class="date-item">
|
||||
<view class="date-label">退房日期</view>
|
||||
<view class="date-box">
|
||||
<view class="date-content">
|
||||
<text class="date-text">{{ checkOutDate }}</text>
|
||||
<text class="day-text">{{ checkOutDay }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps, defineEmits } from "vue";
|
||||
|
||||
// 定义事件
|
||||
const emit = defineEmits(["showCalendar"]);
|
||||
|
||||
// 定义方法
|
||||
const showCalendar = () => {
|
||||
emit("showCalendar");
|
||||
};
|
||||
|
||||
// Props定义
|
||||
const props = defineProps({
|
||||
checkInDate: {
|
||||
type: String,
|
||||
default: "08月25日",
|
||||
},
|
||||
checkOutDate: {
|
||||
type: String,
|
||||
default: "08月25日",
|
||||
},
|
||||
checkInDay: {
|
||||
type: String,
|
||||
default: "周一",
|
||||
},
|
||||
checkOutDay: {
|
||||
type: String,
|
||||
default: "周一",
|
||||
},
|
||||
nights: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "./styles/index.scss";
|
||||
</style>
|
||||
Reference in New Issue
Block a user