feat: 实现发行申请提交
This commit is contained in:
39
src/components/ui/datetime/index.vue
Normal file
39
src/components/ui/datetime/index.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<script lang='ts' setup>
|
||||
import type { FieldBindingObject } from "vee-validate";
|
||||
|
||||
interface Props extends FieldBindingObject {
|
||||
label?: string;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
function handleChange(value: string) {
|
||||
const formattedValue = useDateFormat(value, "YYYY/MM/DD").value;
|
||||
props.onChange(formattedValue);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col items-start">
|
||||
<ion-label class="text-sm font-bold color-(--ion-text-color-secondary) mb-3.5">
|
||||
{{ props.label }}
|
||||
</ion-label>
|
||||
<ion-datetime-button datetime="datetime" color="primary">
|
||||
<div slot="date-target">
|
||||
{{ props.value }}
|
||||
</div>
|
||||
</ion-datetime-button>
|
||||
<ion-modal :keep-contents-mounted="true">
|
||||
<ion-datetime
|
||||
id="datetime"
|
||||
class="ui-datetime"
|
||||
done-text="Done"
|
||||
presentation="date"
|
||||
:show-default-buttons="true"
|
||||
@ion-change="handleChange($event.detail.value as string)"
|
||||
/>
|
||||
</ion-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang='css' scoped></style>
|
||||
Reference in New Issue
Block a user