mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
parent
e97b9c972a
commit
8d766dc80c
@ -42,6 +42,7 @@ export default defineComponent({
|
||||
default: 'date',
|
||||
},
|
||||
},
|
||||
emits: ['update:modelValue'],
|
||||
setup(props, ctx) {
|
||||
const format = DEFAULT_FORMATS_DATEPICKER[props.type] || DEFAULT_FORMATS_DATE
|
||||
return () => h(CommonPicker, {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import { nextTick } from 'vue'
|
||||
import { rAF } from '@element-plus/test-utils/tick'
|
||||
import { sleep } from '@element-plus/test-utils'
|
||||
|
||||
import Menu from '../src/menu.vue'
|
||||
|
@ -18,6 +18,7 @@ export default defineComponent({
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['update:modelValue'],
|
||||
setup(props, ctx) {
|
||||
const type = props.isRange ? 'timerange' : 'time'
|
||||
const panel = props.isRange ? TimeRangePanel : TimePickPanel
|
||||
|
@ -31,7 +31,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, computed, watch } from 'vue'
|
||||
import { defineComponent, ref, computed } from 'vue'
|
||||
import ElSelect from '@element-plus/select'
|
||||
import ElOption from '@element-plus/option'
|
||||
interface Time {
|
||||
|
@ -55,7 +55,7 @@ DateTimePicker is derived from DatePicker and TimePicker. For a more detailed ex
|
||||
return date
|
||||
})(),
|
||||
}, {
|
||||
text: 'Yesterday',
|
||||
text: 'A week ago',
|
||||
value: (() => {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||
@ -93,7 +93,7 @@ DateTimePicker is derived from DatePicker and TimePicker. For a more detailed ex
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="datetimerange"
|
||||
:shortcuts="shortcuts""
|
||||
:shortcuts="shortcuts"
|
||||
range-separator="To"
|
||||
start-placeholder="Start date"
|
||||
end-placeholder="End date"
|
||||
|
@ -56,7 +56,7 @@ DateTimePicker se deriva de DatePicker y TimePicker. Por una explicación más d
|
||||
return date
|
||||
})(),
|
||||
}, {
|
||||
text: 'Yesterday',
|
||||
text: 'A week ago',
|
||||
value: (() => {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||
@ -94,7 +94,7 @@ DateTimePicker se deriva de DatePicker y TimePicker. Por una explicación más d
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="datetimerange"
|
||||
:shortcuts="shortcuts""
|
||||
:shortcuts="shortcuts"
|
||||
range-separator="To"
|
||||
start-placeholder="Start date"
|
||||
end-placeholder="End date"
|
||||
|
@ -55,7 +55,7 @@ DateTimePickerはDatePickerとTimePickerから派生したものです。`picker
|
||||
return date
|
||||
})(),
|
||||
}, {
|
||||
text: 'Yesterday',
|
||||
text: 'A week ago',
|
||||
value: (() => {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||
|
Loading…
Reference in New Issue
Block a user