UNPKG

ll-package

Version:

2 lines (1 loc) 876 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../../@babel/runtime/helpers/esm/objectSpread2.js"),n=require("vue"),v=require("../Header.js"),C=require("../../PanelContext.js"),P=require("../../utils/dateUtil.js"),b=require("../../hooks/useMergeProps.js");function e(u){const r=b.default(u),{prefixCls:t,generateConfig:l,locale:a,viewDate:s,onNextYear:i,onPrevYear:c,onYearClick:d}=r,{hideHeader:f}=C.useInjectPanel();if(f.value)return null;const p=`${t}-header`;return n.createVNode(v.default,o.default(o.default({},r),{},{prefixCls:p,onSuperPrev:c,onSuperNext:i}),{default:()=>[n.createVNode("button",{type:"button",onClick:d,class:`${t}-year-btn`},[P.formatValue(s,{locale:a,format:a.yearFormat,generateConfig:l})])]})}e.displayName="QuarterHeader";e.inheritAttrs=!1;exports.default=e;