2021-06-21 23:47:23 +08:00

92 lines
2.7 KiB
JavaScript

(window.webpackJsonp = window.webpackJsonp || []).push([
[20],
{
'1exI': function(r, l, e) {
r.exports = e.p + 'static/calend.2ecbca3d.png';
},
KbTK: function(r, l, e) {
r.exports = { calenderWrap: 'calenderWrap___1mYSa' };
},
W3XE: function(r, l, e) {
'use strict';
e.r(l);
var u = e('cYC7'),
B = e.n(u),
P = e('334+'),
O = e.n(P),
s = e('tJVT'),
t = e('q1tI'),
a = e.n(t),
D = e('KbTK'),
R = e.n(D),
v = e('1exI'),
y = e.n(v),
p = Object(t.memo)(_ => {
var o = _.time,
m = _.range,
U = _.color,
E = _.selectedColor,
M = _.round,
f = _.isTpl,
d = m.split('-'),
h = Object(t.useState)([
new Date(''.concat(o, '-').concat(d[0])),
new Date(''.concat(o, '-').concat(d[1])),
]),
i = Object(s.a)(h, 2),
C = i[0],
b = i[1],
T = Object(t.useState)(new Date(''.concat(o, '-01'))),
g = Object(s.a)(T, 1),
x = g[0],
K = Object(t.useState)(new Date(''.concat(o, '-31'))),
W = Object(s.a)(K, 1),
I = W[0],
n = Object(t.useRef)(null);
Object(t.useEffect)(() => {
n.current &&
(n.current.style.setProperty('--color', U),
n.current.style.setProperty('--selectColor', E),
n.current.style.setProperty('--selectBgColor', E));
}, []);
var A = window.location.pathname.indexOf('editor') > -1;
return a.a.createElement(
a.a.Fragment,
null,
f
? a.a.createElement(
'div',
null,
a.a.createElement('img', {
src: y.a,
style: { width: '100%' },
alt: 'h5-dooring日历组件',
}),
)
: a.a.createElement(
'div',
{
className: R.a.calenderWrap,
style: { borderRadius: M + 'px', pointerEvents: A ? 'none' : 'initial' },
ref: n,
},
a.a.createElement(O.a, {
multiple: !!m,
value: C,
min: x,
max: new Date(I),
disabledDate: c => /(0|6)/.test(c.getDay()),
onChange: c => {
b(c);
},
}),
),
);
});
l.default = p;
},
},
]);
//# sourceMappingURL=20.js.map