TestEShopDist/dist/pages/codeList/sub-common/10be9483d931f2f7524154caf50433db.js
2023-05-12 11:43:37 +08:00

2 lines
3.1 KiB
JavaScript

/*! For license information please see 10be9483d931f2f7524154caf50433db.js.LICENSE.txt */
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["sub-common/10be9483d931f2f7524154caf50433db"],{"./src/components/calendar/ui/date-list/index.tsx":function(e,t,l){l.d(t,{default:function(){return h}});var s,n=l("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),a=l("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=l("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"),r=l("./node_modules/@babel/runtime/helpers/esm/inherits.js"),c=l("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),d=l("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=l("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),m=l("./node_modules/classnames/index.js"),u=l.n(m),_=l("./node_modules/react/cjs/react.production.min.js"),f=l("./src/components/calendar/common/constant.ts"),p=l("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),x=(s={},(0,d.default)(s,f.TYPE_PRE_MONTH,"pre"),(0,d.default)(s,f.TYPE_NOW_MONTH,"now"),(0,d.default)(s,f.TYPE_NEXT_MONTH,"next"),s),h=function(e){(0,r.default)(AtCalendarList,e);var t=(0,c.default)(AtCalendarList);function AtCalendarList(){var e;(0,n.default)(this,AtCalendarList);for(var l=arguments.length,s=new Array(l),a=0;a<l;a++)s[a]=arguments[a];return e=t.call.apply(t,[this].concat(s)),(0,d.default)((0,i.default)(e),"handleClick",(function(t){"function"==typeof e.props.onClick&&e.props.onClick(t)})),(0,d.default)((0,i.default)(e),"handleLongClick",(function(t){"function"==typeof e.props.onLongClick&&e.props.onLongClick(t)})),e}return(0,a.default)(AtCalendarList,[{key:"render",value:function render(){var e=this,t=this.props.list;if(!t||0===t.length)return null;var l=0;return(0,p.jsx)(o.View,{className:"at-calendar__list flex",children:t.map((function(t,s){var n=f.DAY_LIST.length*l===s,a=(s+1)%f.DAY_LIST.length==0;return n&&l++,(0,p.jsx)(o.View,{onClick:e.handleClick.bind(e,t),onLongPress:e.handleLongClick.bind(e,t),className:u()("flex__item","flex__item--".concat(x[t.type]),{"flex__item--today":t.isToday,"flex__item--active":t.isActive,"flex__item--selected":t.isSelected,"flex__item--selected-row-end":t.isSelected&&a,"flex__item--selected-row-start":t.isSelected&&n,"flex__item--selected-head":t.isSelectedHead,"flex__item--selected-tail":t.isSelectedTail,"flex__item--blur":t.isDisabled||t.type===f.TYPE_PRE_MONTH||t.type===f.TYPE_NEXT_MONTH}),children:(0,p.jsxs)(o.View,{className:u()({"flex__item--selected-head-cover":t.isSelectedHead,"flex__item--selected-tail-cover":t.isSelectedTail}),children:[(0,p.jsx)(o.View,{className:"flex__item-container",children:(0,p.jsx)(o.View,{className:"container-text",children:t.text})}),(0,p.jsxs)(o.View,{className:"flex__item-extra extra",children:[t.isToday?(0,p.jsx)(o.View,{className:"today-mark",children:"今天"}):null,t.marks&&t.marks.length>0?(0,p.jsx)(o.View,{className:"extra-marks",children:t.marks.map((function(e,t){return(0,p.jsx)(o.Text,{className:"mark",children:e.value},t)}))}):null]})]})},"list-item-".concat(t.value))}))})}}]),AtCalendarList}(_.Component)}}]);