@lemon-fe/components 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/DurationPicker/index.js +11 -3
- package/es/Icons/More.js +1 -1
- package/es/Layout/index.less +8 -21
- package/package.json +2 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["prefixCls", "types", "options", "value", "dateFormat", "onChange"];
|
|
2
|
+
|
|
1
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
4
|
|
|
3
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -16,6 +18,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
16
18
|
|
|
17
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
20
|
|
|
21
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
22
|
+
|
|
23
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
24
|
+
|
|
19
25
|
import React, { useMemo, useState, useEffect } from 'react';
|
|
20
26
|
import { DatePicker, Dropdown, Menu } from 'antd';
|
|
21
27
|
import moment from 'moment';
|
|
@@ -106,7 +112,9 @@ export default function DurationPicker(props) {
|
|
|
106
112
|
valueProp = props.value,
|
|
107
113
|
_props$dateFormat = props.dateFormat,
|
|
108
114
|
dateFormat = _props$dateFormat === void 0 ? 'YYYY-MM-DD' : _props$dateFormat,
|
|
109
|
-
onChange = props.onChange
|
|
115
|
+
onChange = props.onChange,
|
|
116
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
117
|
+
|
|
110
118
|
var defaultValue = useMemo(function () {
|
|
111
119
|
if (valueProp === undefined) {
|
|
112
120
|
var _options$0$value, _options$;
|
|
@@ -218,9 +226,9 @@ export default function DurationPicker(props) {
|
|
|
218
226
|
}))
|
|
219
227
|
}, /*#__PURE__*/React.createElement("div", {
|
|
220
228
|
className: "".concat(prefixCls, "-duration-option")
|
|
221
|
-
}, (_result$option = result.option) === null || _result$option === void 0 ? void 0 : _result$option.label, /*#__PURE__*/React.createElement(Down, null))), /*#__PURE__*/React.createElement(DatePicker.RangePicker, {
|
|
229
|
+
}, (_result$option = result.option) === null || _result$option === void 0 ? void 0 : _result$option.label, /*#__PURE__*/React.createElement(Down, null))), /*#__PURE__*/React.createElement(DatePicker.RangePicker, _objectSpread({
|
|
222
230
|
value: result.dates,
|
|
223
231
|
onChange: handleChangeDates,
|
|
224
232
|
disabled: ((_result$option2 = result.option) === null || _result$option2 === void 0 ? void 0 : _result$option2.value) !== null
|
|
225
|
-
})));
|
|
233
|
+
}, restProps))));
|
|
226
234
|
}
|
package/es/Icons/More.js
CHANGED
|
@@ -15,7 +15,7 @@ var MoreSvg = function MoreSvg(props) {
|
|
|
15
15
|
xmlns: "http://www.w3.org/2000/svg"
|
|
16
16
|
}, props), /*#__PURE__*/React.createElement("g", {
|
|
17
17
|
fill: "currentColor",
|
|
18
|
-
|
|
18
|
+
fillRule: "evenodd"
|
|
19
19
|
}, /*#__PURE__*/React.createElement("circle", {
|
|
20
20
|
opacity: ".7",
|
|
21
21
|
cx: "15",
|
package/es/Layout/index.less
CHANGED
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
|
|
5
|
+
height: 100%;
|
|
6
6
|
padding: 0 @space;
|
|
7
7
|
background: #f2f2f2;
|
|
8
8
|
|
|
9
9
|
&-header {
|
|
10
10
|
padding: @space 0;
|
|
11
|
+
background-color: #f2f2f2;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
&-content {
|
|
14
15
|
display: flex;
|
|
15
16
|
flex: 1;
|
|
17
|
+
min-height: 0;
|
|
18
|
+
overflow: hidden;
|
|
16
19
|
background-color: #fff;
|
|
17
|
-
background-clip: content-box;
|
|
18
20
|
border-top-left-radius: 8px;
|
|
19
21
|
border-top-right-radius: 8px;
|
|
20
22
|
|
|
@@ -87,19 +89,18 @@
|
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
&-main {
|
|
92
|
+
display: flex;
|
|
90
93
|
flex: 1;
|
|
94
|
+
flex-direction: column;
|
|
91
95
|
min-width: 0;
|
|
96
|
+
overflow: auto;
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
&-footer {
|
|
95
|
-
position: sticky;
|
|
96
|
-
bottom: 0;
|
|
97
|
-
z-index: 10;
|
|
98
100
|
display: flex;
|
|
99
101
|
align-items: center;
|
|
100
|
-
justify-content:
|
|
102
|
+
justify-content: center;
|
|
101
103
|
box-sizing: border-box;
|
|
102
|
-
width: 100%;
|
|
103
104
|
height: 65px;
|
|
104
105
|
padding: @space;
|
|
105
106
|
background: #fff;
|
|
@@ -118,17 +119,3 @@
|
|
|
118
119
|
background-color: rgba(255, 255, 255, 0.5);
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
|
-
|
|
122
|
-
.@{prefixCls}-layout.@{prefixCls}-layout-full {
|
|
123
|
-
height: 100%;
|
|
124
|
-
min-height: 0;
|
|
125
|
-
|
|
126
|
-
.@{prefixCls}-layout-content {
|
|
127
|
-
min-height: 0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.@{prefixCls}-layout-main {
|
|
131
|
-
display: flex;
|
|
132
|
-
flex-direction: column;
|
|
133
|
-
}
|
|
134
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "鲁盛杰 <lusj@cnlemon.net>",
|
|
6
6
|
"homepage": "",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@types/lodash": "^4.14.179",
|
|
40
40
|
"@types/react-resizable": "^1.7.4"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "03156b8418da16a062304610592219d40df9e313"
|
|
43
43
|
}
|