This commit is contained in:
2025-05-21 15:45:10 +08:00
parent f6ed5b04de
commit 5d96054c0c
44 changed files with 2460 additions and 2126 deletions

View File

@@ -4,6 +4,7 @@ import {ref} from "vue";
const modalValue = defineModel();
const DateTimeRef = ref();
const emits = defineEmits(['success']);
const {placeholder, fields, type} = defineProps({
placeholder: {
type: String,
@@ -25,12 +26,13 @@ const open = () => {
const success = ({result}) => {
modalValue.value = result;
emits('success');
}
</script>
<template>
<view :class="[!$slots.default ? 'x-date-input' : '']">
<view v-if="!$slots.default" class="!flex items-center justify-center gap-[20rpx]" @click="open">
<view :class="[!$slots.default ? 'x-date-input' : '']" @click="open">
<view v-if="!$slots.default" class="!flex items-center justify-center gap-[20rpx]">
<image class="!size-[24rpx]" :src="timeIcon"></image>
<text v-if="!modalValue" class="text-[#666]">{{ placeholder }}</text>
<text class="test-24r" v-else>{{ modalValue }}</text>
@@ -42,6 +44,11 @@ const success = ({result}) => {
</template>
<style lang="scss" scoped>
.x-date-input-picker {
flex-grow: 1;
border-radius: 4rpx;
}
.x-date-input {
background-color: #F2F3F5;
padding: 14rpx 0;