mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 20:27:44 +08:00
e9666db99a
* docs(components): fix 'date-picker' attribute type description * docs(components): revert 'date-picker' attribute description * docs(components): fix 'datetime-picker' attribute type description * docs(components): fix 'time-picker' attribute type description * docs(components): format * docs(components): fix type, optimization description
42 lines
834 B
Vue
42 lines
834 B
Vue
<template>
|
||
<div class="demo-date-picker">
|
||
<div class="block">
|
||
<p>Component value:{{ value }}</p>
|
||
<el-date-picker
|
||
v-model="value"
|
||
type="daterange"
|
||
start-placeholder="Start date"
|
||
end-placeholder="End date"
|
||
:default-time="defaultTime"
|
||
/>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script lang="ts" setup>
|
||
import { ref } from 'vue'
|
||
|
||
const value = ref('')
|
||
const defaultTime = ref<[Date, Date]>([
|
||
new Date(2000, 1, 1, 0, 0, 0),
|
||
new Date(2000, 2, 1, 23, 59, 59),
|
||
])
|
||
</script>
|
||
<style scoped>
|
||
.demo-date-picker {
|
||
display: flex;
|
||
width: 100%;
|
||
padding: 0;
|
||
flex-wrap: wrap;
|
||
}
|
||
.demo-date-picker .block {
|
||
padding: 30px 0;
|
||
text-align: center;
|
||
border-right: solid 1px var(--el-border-color);
|
||
flex: 1;
|
||
}
|
||
.demo-date-picker .block:last-child {
|
||
border-right: none;
|
||
}
|
||
</style>
|