All files / src/components/u-date-picker.vue wrap.js

100% Statements 3/3
50% Branches 1/2
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39                                  80x 80x                         7x              
import Single from './index.vue';
import Range from './range.vue';
 
export default {
    name: 'u-date-picker-wrap',
    inheritAttrs: false,
    components: {
        Single,
        Range,
    },
    props: {
        range: {
            type: Boolean,
            default: false,
        },
    },
    render(createElement) {
        const component = this.range ? Range : Single;
        return createElement(component, {
            props: this.$attrs,
            attrs: {
                'vusion-node-tag': this.$attrs['vusion-node-tag'],
                'vusion-node-path': this.$attrs['vusion-node-path'],
            },
            on: this.$listeners,
            slots: this.$slots,
            scopedSlots: this.$scopedSlots,
        });
    },
};
 
export const formatterOptions = {
    date: ['YYYY年M月D日', 'YYYY-MM-DD', 'M/D/YYYY', 'D/M/YYYY'],
    month: ['YYYY年M月', 'YYYY-MM', 'M/YYYY'],
    quarter: ['YYYY年第Q季度', 'YYYY年QQ', 'YYYY-QQ'],
    year: ['YYYY年', 'YYYY'],
    week: ['GGGG-W周', 'GGGG年第W周', 'GGGG-WWWW'],
};