@ccs-ui/rc-pro 2.3.6-alpha-3 → 2.3.6-alpha-4
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/date-picker/index.js +20 -0
- package/es/ellipsis/index.js +4 -2
- package/package.json +1 -1
package/es/date-picker/index.js
CHANGED
|
@@ -12,6 +12,25 @@ import { DatePicker } from 'antd';
|
|
|
12
12
|
import dayjs from 'dayjs';
|
|
13
13
|
import _isArray from 'lodash.isarray';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
var rangePresets = [{
|
|
16
|
+
label: '今天',
|
|
17
|
+
value: [dayjs().startOf('day'), dayjs().endOf('day')]
|
|
18
|
+
}, {
|
|
19
|
+
label: '最近3天',
|
|
20
|
+
value: [dayjs().add(-3, 'd'), dayjs()]
|
|
21
|
+
}, {
|
|
22
|
+
label: '最近7天',
|
|
23
|
+
value: [dayjs().add(-7, 'd'), dayjs()]
|
|
24
|
+
}, {
|
|
25
|
+
label: '最近14天',
|
|
26
|
+
value: [dayjs().add(-14, 'd'), dayjs()]
|
|
27
|
+
}, {
|
|
28
|
+
label: '最近30天',
|
|
29
|
+
value: [dayjs().add(-30, 'd'), dayjs()]
|
|
30
|
+
}, {
|
|
31
|
+
label: '最近90天',
|
|
32
|
+
value: [dayjs().add(-90, 'd'), dayjs()]
|
|
33
|
+
}];
|
|
15
34
|
function CcsDatePicker(_ref) {
|
|
16
35
|
var value = _ref.value,
|
|
17
36
|
onChange = _ref.onChange,
|
|
@@ -41,6 +60,7 @@ function RangePicker(_ref2) {
|
|
|
41
60
|
if (onChange) onChange(dateString || undefined);
|
|
42
61
|
};
|
|
43
62
|
return /*#__PURE__*/_jsx(DatePicker.RangePicker, _objectSpread({
|
|
63
|
+
presets: restProps.picker === 'date' || !restProps.picker ? rangePresets : undefined,
|
|
44
64
|
value: getDateValue(),
|
|
45
65
|
onChange: handleOnChange
|
|
46
66
|
}, restProps));
|
package/es/ellipsis/index.js
CHANGED
|
@@ -114,8 +114,10 @@ var Ellipsis = function Ellipsis(p) {
|
|
|
114
114
|
},
|
|
115
115
|
placement: "bottomLeft",
|
|
116
116
|
destroyTooltipOnHide: true,
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
styles: {
|
|
118
|
+
body: {
|
|
119
|
+
whiteSpace: 'normal'
|
|
120
|
+
}
|
|
119
121
|
},
|
|
120
122
|
children: renderNode
|
|
121
123
|
});
|