gxxc-ui 1.0.34 → 1.0.36
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/dist/DateUI/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import zhCN from 'antd/locale/zh_CN';
|
|
|
14
14
|
import dayjs from 'dayjs';
|
|
15
15
|
import 'dayjs/locale/zh-cn';
|
|
16
16
|
import quarterOfYear from 'dayjs/plugin/quarterOfYear';
|
|
17
|
-
import React, { useEffect, useState } from 'react';
|
|
17
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
18
18
|
import "./index.scss";
|
|
19
19
|
dayjs.extend(quarterOfYear);
|
|
20
20
|
dayjs.locale('zh-cn');
|
|
@@ -67,6 +67,7 @@ var DateUI = function DateUI(props) {
|
|
|
67
67
|
_props$textAlign = props.textAlign,
|
|
68
68
|
textAlign = _props$textAlign === void 0 ? 'center' : _props$textAlign,
|
|
69
69
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
70
|
+
var ref = useRef(null);
|
|
70
71
|
var _useState = useState([]),
|
|
71
72
|
_useState2 = _slicedToArray(_useState, 2),
|
|
72
73
|
newPresets = _useState2[0],
|
|
@@ -74,7 +75,8 @@ var DateUI = function DateUI(props) {
|
|
|
74
75
|
|
|
75
76
|
/// 验证 presets 数据
|
|
76
77
|
useEffect(function () {
|
|
77
|
-
|
|
78
|
+
var _ref$current;
|
|
79
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || (_ref$current = _ref$current.nativeElement) === null || _ref$current === void 0 || _ref$current.style.setProperty("--sic-date-text-align", textAlign);
|
|
78
80
|
var list = presets !== null && presets !== void 0 ? presets : DefaultPresets;
|
|
79
81
|
if (props.disabledDate) {
|
|
80
82
|
list = list.filter(function (item) {
|
|
@@ -135,12 +137,14 @@ var DateUI = function DateUI(props) {
|
|
|
135
137
|
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
136
138
|
locale: zhCN
|
|
137
139
|
}, showRange ? /*#__PURE__*/React.createElement(DatePicker.RangePicker, _extends({
|
|
140
|
+
ref: ref,
|
|
138
141
|
className: "sic-dateui ".concat(className !== null && className !== void 0 ? className : ''),
|
|
139
142
|
separator: '至',
|
|
140
143
|
value: realValue,
|
|
141
144
|
onChange: changeDate,
|
|
142
145
|
presets: newPresets
|
|
143
146
|
}, otherProps)) : /*#__PURE__*/React.createElement(DatePicker, _extends({
|
|
147
|
+
ref: ref,
|
|
144
148
|
className: "sic-dateui sic-dateui-one ".concat(className !== null && className !== void 0 ? className : ''),
|
|
145
149
|
value: realValue,
|
|
146
150
|
onChange: changeDate
|
package/dist/FilterUI/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var FilterUI = function FilterUI(props) {
|
|
|
44
44
|
setFilterName = _useState6[1];
|
|
45
45
|
//区分默认展示和更多筛选表单
|
|
46
46
|
var sliceOptions = function sliceOptions() {
|
|
47
|
-
var maxVisibleOptions =
|
|
47
|
+
var maxVisibleOptions = 6;
|
|
48
48
|
var totalOptions = filterOptions.length;
|
|
49
49
|
if (totalOptions <= maxVisibleOptions) {
|
|
50
50
|
setVisibleOptions(filterOptions);
|
package/dist/FilterUI/index.scss
CHANGED