tiny-vue_version0/examples/sites/demos/pc/app/date-picker/step-composition-api.vue

41 lines
885 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<p>步长</p>
<br />
<div class="demo-date-picker-wrap">
<tiny-date-picker v-model="value" type="datetime" :step="step"></tiny-date-picker>
</div>
<br />
<p>箭头控制</p>
<br />
<div class="demo-date-picker-wrap">
<tiny-date-picker v-model="value" type="datetime" time-arrow-control></tiny-date-picker>
</div>
<br />
<p>时间输入框不可编辑:</p>
<br />
<div class="demo-date-picker-wrap">
<tiny-date-picker v-model="value" type="datetime" :step="step" :time-editable="false"></tiny-date-picker>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { DatePicker as TinyDatePicker } from '@opentiny/vue'
const step = ref({
hour: 2,
minute: 5
})
const value = ref('')
</script>
<style scoped>
.demo-date-picker-wrap {
width: 280px;
}
</style>