UNPKG

ll-package

Version:

2 lines (1 loc) 836 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../../../../../@babel/runtime/helpers/esm/objectSpread2.js"),o=require("vue"),p=require("../Header.js"),e=require("./index.js"),E=require("../../PanelContext.js"),x=require("../../hooks/useMergeProps.js");function r(s){const t=x.default(s),{prefixCls:u,generateConfig:d,viewDate:c,onPrevDecades:i,onNextDecades:l}=t,{hideHeader:f}=E.useInjectPanel();if(f)return null;const C=`${u}-header`,D=d.getYear(c),a=Math.floor(D/e.DECADE_DISTANCE_COUNT)*e.DECADE_DISTANCE_COUNT,N=a+e.DECADE_DISTANCE_COUNT-1;return o.createVNode(p.default,n.default(n.default({},t),{},{prefixCls:C,onSuperPrev:i,onSuperNext:l}),{default:()=>[a,o.createTextVNode("-"),N]})}r.displayName="DecadeHeader";r.inheritAttrs=!1;exports.default=r;