All files / src/datepicker/_example MonthPickerExample.jsx

66.67% Statements 2/3
100% Branches 0/0
50% Functions 1/2
66.67% Lines 2/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        1x     1x                        
import React from "react";
import moment from "moment";
import { DatePicker } from "@tencent/tea-component/lib/datepicker";
 
const { MonthPicker } = DatePicker;
 
export default () => {
  return (
    <>
      <section>
        <h3>月份选择</h3>
        <MonthPicker
          defaultValue={moment("2019-02")}
          onChange={value => console.log(value.format())}
        />
      </section>
    </>
  );
};