feat: 增加使用日期组件
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<UseDateRange v-model:selectedDate="reservationDate"/>
|
||||
|
||||
<!-- 联系方式 -->
|
||||
<view class="bg-white rounded-12 overflow-hidden">
|
||||
<view
|
||||
@@ -26,7 +28,7 @@
|
||||
<view class="font-size-14 font-500 color-525866 mr-12"> 联系手机 </view>
|
||||
<view class="right">
|
||||
<input
|
||||
class="border-box rounded-8 px-4 py-2 font-size-15 color-000 line-height-20"
|
||||
class="border-box px-4 py-2 font-size-15 color-000 line-height-20"
|
||||
v-model.trim="userFormList[0].contactPhone"
|
||||
placeholder="请输入联系手机"
|
||||
maxlength="11"
|
||||
@@ -39,6 +41,7 @@
|
||||
<script setup>
|
||||
import { computed, defineProps } from "vue";
|
||||
import Stepper from "@/components/Stepper/index.vue";
|
||||
import UseDateRange from "@/components/UseDateRange/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
@@ -49,15 +52,25 @@ const props = defineProps({
|
||||
type: Array,
|
||||
default: () => [{ contactPhone: "" }],
|
||||
},
|
||||
reservationDate: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:modelValue"]);
|
||||
const emit = defineEmits(["update:modelValue", "update:reservationDate"]);
|
||||
const count = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => {
|
||||
emit("update:modelValue", val);
|
||||
},
|
||||
});
|
||||
const reservationDate = computed({
|
||||
get: () => props.reservationDate,
|
||||
set: (val) => {
|
||||
emit("update:reservationDate", val);
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
||||
Reference in New Issue
Block a user