mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 09:20:51 +08:00
06f6844509
* refactor(theme-chalk): rewrite palette & remove -base suffix * refactor(theme-chalk): container as default bg-color * refactor(theme-chalk): add fill-color-blank * fix(docs): fill-color-light for code-bg
57 lines
1.2 KiB
Vue
57 lines
1.2 KiB
Vue
<template>
|
|
<div class="block">
|
|
<span class="demonstration">Start date time 12:00:00</span>
|
|
<el-date-picker
|
|
v-model="value1"
|
|
type="datetimerange"
|
|
start-placeholder="Start Date"
|
|
end-placeholder="End Date"
|
|
:default-time="defaultTime1"
|
|
>
|
|
</el-date-picker>
|
|
</div>
|
|
<div class="block">
|
|
<span class="demonstration"
|
|
>Start date time 12:00:00, end date time 08:00:00</span
|
|
>
|
|
<el-date-picker
|
|
v-model="value2"
|
|
type="datetimerange"
|
|
start-placeholder="Start Date"
|
|
end-placeholder="End Date"
|
|
:default-time="defaultTime2"
|
|
>
|
|
</el-date-picker>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
|
|
const value1 = ref('')
|
|
const value2 = ref('')
|
|
|
|
const defaultTime1 = [new Date(2000, 1, 1, 12, 0, 0)] // '12:00:00'
|
|
const defaultTime2 = [
|
|
new Date(2000, 1, 1, 12, 0, 0),
|
|
new Date(2000, 2, 1, 8, 0, 0),
|
|
] // '12:00:00', '08:00:00'
|
|
</script>
|
|
<style scoped>
|
|
.block {
|
|
padding: 30px 0;
|
|
text-align: center;
|
|
border-right: solid 1px getCssVar('border-color');
|
|
flex: 1;
|
|
}
|
|
.block:last-child {
|
|
border-right: none;
|
|
}
|
|
.block .demonstration {
|
|
display: block;
|
|
color: var(--el-text-color-secondary);
|
|
font-size: 14px;
|
|
margin-bottom: 20px;
|
|
}
|
|
</style>
|