32 lines
608 B
Vue
32 lines
608 B
Vue
<script setup>
|
|
import { computed } from "vue";
|
|
|
|
const props = defineProps({
|
|
modelValue: String,
|
|
disabled: Boolean,
|
|
// dataField: {
|
|
// type: String,
|
|
// default: '',
|
|
// },
|
|
});
|
|
|
|
const emit = defineEmits(["update:modelValue", "change"]);
|
|
|
|
const innerValue = computed({
|
|
get: () => props.modelValue,
|
|
set: (val) => emit("update:modelValue", val),
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<el-date-picker
|
|
v-model="innerValue"
|
|
type="datetime"
|
|
format="YYYY-MM-DD HH:mm:ss"
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
style="width: 100%"
|
|
size="small"
|
|
:disabled="disabled"
|
|
/>
|
|
</template>
|