plus-ui/src/components/RexDatePicker/index.vue
2024-09-22 13:58:03 +08:00

24 lines
498 B
Vue

<template>
<el-col :span="colSpan">
<el-form-item :label="label" :prop="prop">
<el-date-picker v-bind="$attrs">
<template v-for="(_, name) in $slots" #[name]="slotProps">
<slot :name="name" v-bind="slotProps"></slot>
</template>
</el-date-picker>
</el-form-item>
</el-col>
</template>
<script lang="ts" setup>
interface Props {
label?: string
prop?: string
colSpan?: number
}
withDefaults(defineProps<Props>(), {
colSpan: 24
})
</script>