tiny-vue/examples/docs/resources/pc/demo/date-picker/about-clear.vue

36 lines
819 B
Vue
Raw 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>
<tiny-layout>
<tiny-row>
<tiny-col :span="6">
<label>不可清除</label>
<tiny-date-picker v-model="value1" :clearable="false"></tiny-date-picker>
</tiny-col>
<tiny-col :span="6">
<label>自定义清除图标</label>
<tiny-date-picker v-model="value2" :clear-icon="IconMinus"></tiny-date-picker>
</tiny-col>
</tiny-row>
</tiny-layout>
</template>
<script lang="jsx">
import { Layout, Row, Col, DatePicker } from '@opentiny/vue'
import { IconMinus } from '@opentiny/vue-icon'
export default {
components: {
TinyLayout: Layout,
TinyRow: Row,
TinyCol: Col,
TinyDatePicker: DatePicker
},
data() {
return {
value1: new Date(),
value2: new Date(),
IconMinus: IconMinus()
}
}
}
</script>