Skip to content

fpi-el-year-range-picker 季度选择组件 beta

TIP

当前组件正在 beta 测试阶段

基础使用

通过时间设置当前选择季度

<template>
    <div class="rolling-test">
        <FpiElYearRangePicker v-model="date" size="large" />
        <br>
        <h4>所选时间</h4>
        <div>{{ showData.start }}</div>
        <div>{{ showData.end }}</div>
    </div>
</template>

<script lang="ts" setup>
import dayjs from 'dayjs'
import { computed, ref } from 'vue'


const date = ref([new Date(), new Date()])
const showData = computed(() => {
    return {
        start: date.value[0] ? dayjs(date.value[0]).format('YYYY') : '',
        end: date.value[1] ? dayjs(date.value[1]).format('YYYY') : ''
    }
})
</script>
显示代码

属性

typescript

事件

typescript

方法

typescript

贡献者:

大气-李国帝

fpi-component