import { FormConfig } from "/@/components/PageSearch";
import dayjs from "dayjs";

const now = dayjs(new Date()).subtract(1, "month").format("YYYY-MM");

const searchFormConfig: FormConfig = {
  formItems: [
    {
      field: "year_month",
      type: "date_picker",
      defaultValue: now,
      placeholder: "明细月份",
      trigger: "change",
      otherOptions: {
        editable: false,
        clearable: false,
        type: "month",
        format: "YYYY-MM",
        valueFormat: "YYYY-MM"
      }
    }
  ]
};

export default searchFormConfig;
