@kdcloudjs/kdesign 1.6.20 → 1.6.21
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/kdesign-complete.less +11 -13
- package/dist/kdesign.css +19 -2
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +107 -86
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +5 -5
- package/dist/kdesign.min.js.map +1 -1
- package/es/checkbox/checkbox.js +1 -1
- package/es/checkbox/group.d.ts +1 -1
- package/es/checkbox/group.js +4 -4
- package/es/menu/style/index.css +18 -1
- package/es/menu/style/index.less +2 -13
- package/es/menu/style/mixin.less +9 -0
- package/es/radio/group.js +5 -6
- package/es/radio/interface.d.ts +2 -2
- package/es/radio/radio.js +24 -22
- package/lib/checkbox/checkbox.js +1 -1
- package/lib/checkbox/group.d.ts +1 -1
- package/lib/checkbox/group.js +4 -4
- package/lib/menu/style/index.css +18 -1
- package/lib/menu/style/index.less +2 -13
- package/lib/menu/style/mixin.less +9 -0
- package/lib/radio/group.js +5 -6
- package/lib/radio/interface.d.ts +2 -2
- package/lib/radio/radio.js +28 -23
- package/package.json +7 -2
package/dist/kdesign.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/kdesign v1.6.
|
|
3
|
+
* @kdcloudjs/kdesign v1.6.20
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -6939,7 +6939,7 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
|
|
|
6939
6939
|
var innerIconClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-inner"), true));
|
|
6940
6940
|
var handleChange = Object(react__WEBPACK_IMPORTED_MODULE_6__["useCallback"])(function (e) {
|
|
6941
6941
|
onChange && onChange(e);
|
|
6942
|
-
(checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange) && (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange(value, e.target.checked));
|
|
6942
|
+
(checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange) && (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange(value, e.target.checked, e));
|
|
6943
6943
|
|
|
6944
6944
|
if (!(checkboxGroup !== null && checkboxGroup !== void 0 && checkboxGroup.isControlled)) {
|
|
6945
6945
|
setSelected(e.target.checked);
|
|
@@ -7114,7 +7114,7 @@ var CheckboxGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.fo
|
|
|
7114
7114
|
return innerValue.current.indexOf(targetValue) > -1 ? innerValue.current : innerValue.current.concat(targetValue);
|
|
7115
7115
|
};
|
|
7116
7116
|
|
|
7117
|
-
var onCheckboxChange = function onCheckboxChange(checkedValue, isChecked) {
|
|
7117
|
+
var onCheckboxChange = function onCheckboxChange(checkedValue, isChecked, e) {
|
|
7118
7118
|
var newVal = [];
|
|
7119
7119
|
|
|
7120
7120
|
if (isChecked) {
|
|
@@ -7127,7 +7127,7 @@ var CheckboxGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.fo
|
|
|
7127
7127
|
innerValue.current = newVal;
|
|
7128
7128
|
}
|
|
7129
7129
|
|
|
7130
|
-
onChange && onChange(newVal);
|
|
7130
|
+
onChange && onChange(e, newVal);
|
|
7131
7131
|
};
|
|
7132
7132
|
|
|
7133
7133
|
var context = {
|
|
@@ -7136,8 +7136,8 @@ var CheckboxGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.fo
|
|
|
7136
7136
|
name: name,
|
|
7137
7137
|
isControlled: isControlled,
|
|
7138
7138
|
checkboxType: checkboxType,
|
|
7139
|
-
onCheckboxGroupChange: function onCheckboxGroupChange(checkedValue, isChecked) {
|
|
7140
|
-
onCheckboxChange(checkedValue, isChecked);
|
|
7139
|
+
onCheckboxGroupChange: function onCheckboxGroupChange(checkedValue, isChecked, e) {
|
|
7140
|
+
onCheckboxChange(checkedValue, isChecked, e);
|
|
7141
7141
|
}
|
|
7142
7142
|
};
|
|
7143
7143
|
|
|
@@ -26502,23 +26502,22 @@ var RadioGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](f
|
|
|
26502
26502
|
|
|
26503
26503
|
|
|
26504
26504
|
react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () {
|
|
26505
|
-
if (props.value) {
|
|
26505
|
+
if (props.value !== undefined) {
|
|
26506
26506
|
setValue(props.value);
|
|
26507
26507
|
}
|
|
26508
26508
|
}, [props.value]);
|
|
26509
26509
|
|
|
26510
|
-
var onRadioChange = function onRadioChange(ev) {
|
|
26510
|
+
var onRadioChange = function onRadioChange(ev, checkedValue) {
|
|
26511
26511
|
var lastValue = value;
|
|
26512
|
-
var val = ev.target.value;
|
|
26513
26512
|
|
|
26514
26513
|
if (!('value' in props)) {
|
|
26515
|
-
setValue(
|
|
26514
|
+
setValue(checkedValue);
|
|
26516
26515
|
}
|
|
26517
26516
|
|
|
26518
26517
|
var onChange = props.onChange;
|
|
26519
26518
|
|
|
26520
|
-
if (onChange &&
|
|
26521
|
-
onChange(ev);
|
|
26519
|
+
if (onChange && checkedValue !== lastValue) {
|
|
26520
|
+
onChange(ev, checkedValue);
|
|
26522
26521
|
}
|
|
26523
26522
|
};
|
|
26524
26523
|
|
|
@@ -26713,56 +26712,38 @@ var RadioButton = function RadioButton(props, ref) {
|
|
|
26713
26712
|
|
|
26714
26713
|
"use strict";
|
|
26715
26714
|
__webpack_require__.r(__webpack_exports__);
|
|
26716
|
-
/* harmony import */ var
|
|
26717
|
-
/* harmony import */ var
|
|
26718
|
-
/* harmony import */ var
|
|
26719
|
-
/* harmony import */ var
|
|
26720
|
-
/* harmony import */ var
|
|
26721
|
-
/* harmony import */ var
|
|
26722
|
-
/* harmony import */ var
|
|
26723
|
-
/* harmony import */ var
|
|
26724
|
-
/* harmony import */ var
|
|
26725
|
-
/* harmony import */ var
|
|
26726
|
-
/* harmony import */ var
|
|
26727
|
-
/* harmony import */ var
|
|
26728
|
-
/* harmony import */ var
|
|
26729
|
-
/* harmony import */ var
|
|
26730
|
-
/* harmony import */ var
|
|
26731
|
-
/* harmony import */ var
|
|
26732
|
-
/* harmony import */ var
|
|
26733
|
-
/* harmony import */ var
|
|
26734
|
-
/* harmony import */ var
|
|
26735
|
-
/* harmony import */ var
|
|
26736
|
-
/* harmony import */ var
|
|
26737
|
-
/* harmony import */ var
|
|
26738
|
-
/* harmony import */ var
|
|
26739
|
-
/* harmony import */ var
|
|
26740
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react */ "react");
|
|
26741
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);
|
|
26742
|
-
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
|
26743
|
-
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_13__);
|
|
26744
|
-
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! lodash/isBoolean */ "./node_modules/lodash/isBoolean.js");
|
|
26745
|
-
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(lodash_isBoolean__WEBPACK_IMPORTED_MODULE_14__);
|
|
26746
|
-
/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
|
|
26747
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
|
|
26748
|
-
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./context */ "./components/radio/context.tsx");
|
|
26749
|
-
|
|
26750
|
-
|
|
26751
|
-
|
|
26752
|
-
|
|
26753
|
-
|
|
26754
|
-
|
|
26755
|
-
|
|
26715
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
|
|
26716
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
|
26717
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
|
|
26718
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);
|
|
26719
|
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
|
|
26720
|
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);
|
|
26721
|
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js");
|
|
26722
|
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__);
|
|
26723
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
26724
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
26725
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react");
|
|
26726
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
|
|
26727
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
|
26728
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);
|
|
26729
|
+
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/isBoolean */ "./node_modules/lodash/isBoolean.js");
|
|
26730
|
+
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_isBoolean__WEBPACK_IMPORTED_MODULE_7__);
|
|
26731
|
+
/* harmony import */ var lodash_isNumber__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/isNumber */ "./node_modules/lodash/isNumber.js");
|
|
26732
|
+
/* harmony import */ var lodash_isNumber__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_isNumber__WEBPACK_IMPORTED_MODULE_8__);
|
|
26733
|
+
/* harmony import */ var lodash_isString__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/isString */ "./node_modules/lodash/isString.js");
|
|
26734
|
+
/* harmony import */ var lodash_isString__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_isString__WEBPACK_IMPORTED_MODULE_9__);
|
|
26735
|
+
/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
|
|
26736
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
|
|
26737
|
+
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./context */ "./components/radio/context.tsx");
|
|
26738
|
+
/* harmony import */ var _utils_devwarning__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../_utils/devwarning */ "./components/_utils/devwarning.ts");
|
|
26756
26739
|
|
|
26757
26740
|
|
|
26758
26741
|
|
|
26759
26742
|
|
|
26760
|
-
var _excluded = ["style", "checked", "children", "className", "radioType", "defaultChecked", "prefixCls"];
|
|
26743
|
+
var _excluded = ["style", "checked", "children", "className", "radioType", "value", "disabled", "defaultChecked", "prefixCls"];
|
|
26761
26744
|
|
|
26762
26745
|
|
|
26763
|
-
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; }
|
|
26764
26746
|
|
|
26765
|
-
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) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(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; }
|
|
26766
26747
|
|
|
26767
26748
|
|
|
26768
26749
|
|
|
@@ -26774,30 +26755,33 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
26774
26755
|
var InternalRadio = function InternalRadio(props, ref) {
|
|
26775
26756
|
var _classNames;
|
|
26776
26757
|
|
|
26777
|
-
var context =
|
|
26758
|
+
var context = react__WEBPACK_IMPORTED_MODULE_5___default.a.useContext(_context__WEBPACK_IMPORTED_MODULE_12__["default"]);
|
|
26778
26759
|
|
|
26779
|
-
var _React$useContext =
|
|
26760
|
+
var _React$useContext = react__WEBPACK_IMPORTED_MODULE_5___default.a.useContext(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_10__["default"]),
|
|
26780
26761
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
26781
26762
|
prefixCls = _React$useContext.prefixCls,
|
|
26782
26763
|
userDefaultProps = _React$useContext.compDefaultProps;
|
|
26783
26764
|
|
|
26784
|
-
var innerRef =
|
|
26765
|
+
var innerRef = react__WEBPACK_IMPORTED_MODULE_5___default.a.useRef();
|
|
26785
26766
|
var mergedRef = ref || innerRef;
|
|
26786
26767
|
|
|
26787
|
-
var _getCompProps = Object(
|
|
26768
|
+
var _getCompProps = Object(_utils__WEBPACK_IMPORTED_MODULE_11__["getCompProps"])('Radio', userDefaultProps, props),
|
|
26788
26769
|
style = _getCompProps.style,
|
|
26789
26770
|
checked = _getCompProps.checked,
|
|
26790
26771
|
children = _getCompProps.children,
|
|
26791
26772
|
className = _getCompProps.className,
|
|
26792
26773
|
radioType = _getCompProps.radioType,
|
|
26774
|
+
value = _getCompProps.value,
|
|
26775
|
+
disabled = _getCompProps.disabled,
|
|
26793
26776
|
defaultChecked = _getCompProps.defaultChecked,
|
|
26794
26777
|
customPrefixcls = _getCompProps.prefixCls,
|
|
26795
|
-
restProps =
|
|
26778
|
+
restProps = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3___default()(_getCompProps, _excluded); // 属性需要合并一遍用户定义的默认属性
|
|
26796
26779
|
|
|
26797
26780
|
|
|
26798
|
-
|
|
26799
|
-
|
|
26800
|
-
|
|
26781
|
+
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_13__["default"])(!(lodash_isNumber__WEBPACK_IMPORTED_MODULE_8___default()(value) || lodash_isString__WEBPACK_IMPORTED_MODULE_9___default()(value)) && value !== '', 'radio', 'radio `value` type must string or number ');
|
|
26782
|
+
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_13__["default"])(value === '', 'radio', 'radio value type is not empty string ');
|
|
26783
|
+
var mergedDisabled = (context === null || context === void 0 ? void 0 : context.disabled) || restProps.disabled;
|
|
26784
|
+
var initValue = context ? value === context.value : lodash_isBoolean__WEBPACK_IMPORTED_MODULE_7___default()(checked) ? checked : defaultChecked;
|
|
26801
26785
|
|
|
26802
26786
|
var getPrefix = function getPrefix(radioType) {
|
|
26803
26787
|
return "radio".concat(radioType === 'square' ? "-".concat(radioType) : '');
|
|
@@ -26805,16 +26789,15 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
26805
26789
|
|
|
26806
26790
|
var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, getPrefix(radioType), customPrefixcls); // 样式前缀
|
|
26807
26791
|
|
|
26808
|
-
var _React$useState =
|
|
26809
|
-
_React$useState2 =
|
|
26792
|
+
var _React$useState = react__WEBPACK_IMPORTED_MODULE_5___default.a.useState(initValue),
|
|
26793
|
+
_React$useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_React$useState, 2),
|
|
26810
26794
|
isChecked = _React$useState2[0],
|
|
26811
26795
|
setIsChecked = _React$useState2[1];
|
|
26812
26796
|
|
|
26813
|
-
|
|
26814
|
-
|
|
26815
|
-
|
|
26816
|
-
|
|
26817
|
-
var radioProps = _objectSpread({}, restProps);
|
|
26797
|
+
react__WEBPACK_IMPORTED_MODULE_5___default.a.useEffect(function () {
|
|
26798
|
+
var checkedValue = context ? value === context.value : lodash_isBoolean__WEBPACK_IMPORTED_MODULE_7___default()(checked) ? checked : defaultChecked;
|
|
26799
|
+
setIsChecked(checkedValue);
|
|
26800
|
+
}, [checked, defaultChecked, context === null || context === void 0 ? void 0 : context.value]);
|
|
26818
26801
|
|
|
26819
26802
|
var onChange = function onChange(e) {
|
|
26820
26803
|
setIsChecked(e.target.checked);
|
|
@@ -26824,21 +26807,13 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
26824
26807
|
}
|
|
26825
26808
|
|
|
26826
26809
|
if (context !== null && context !== void 0 && context.onChange) {
|
|
26827
|
-
context.onChange(e);
|
|
26810
|
+
context.onChange(e, value);
|
|
26828
26811
|
}
|
|
26829
26812
|
};
|
|
26830
26813
|
|
|
26831
|
-
|
|
26814
|
+
var classString = classnames__WEBPACK_IMPORTED_MODULE_6___default()((_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(radioPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(radioPrefixCls, "-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(radioPrefixCls, "-checked"), isChecked), _classNames), className); // 单选包裹元素class名称
|
|
26832
26815
|
|
|
26833
|
-
|
|
26834
|
-
radioProps.name = context.name;
|
|
26835
|
-
radioProps.checked = String(props.value) === String(context.value);
|
|
26836
|
-
radioProps.disabled = props.disabled || context.disabled;
|
|
26837
|
-
}
|
|
26838
|
-
|
|
26839
|
-
var classString = classnames__WEBPACK_IMPORTED_MODULE_13___default()((_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_classNames, "".concat(radioPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_classNames, "".concat(radioPrefixCls, "-disabled"), radioProps.disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_classNames, "".concat(radioPrefixCls, "-checked"), context ? radioProps.checked : isChecked), _classNames), className); // 单选包裹元素class名称
|
|
26840
|
-
|
|
26841
|
-
Object(react__WEBPACK_IMPORTED_MODULE_12__["useEffect"])(function () {
|
|
26816
|
+
Object(react__WEBPACK_IMPORTED_MODULE_5__["useEffect"])(function () {
|
|
26842
26817
|
var _radioRef$current;
|
|
26843
26818
|
|
|
26844
26819
|
var handleRepeatClick = function handleRepeatClick(e) {
|
|
@@ -26861,20 +26836,25 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
26861
26836
|
return (
|
|
26862
26837
|
/*#__PURE__*/
|
|
26863
26838
|
// eslint-disable-next-line
|
|
26864
|
-
|
|
26839
|
+
react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("label", {
|
|
26865
26840
|
className: classString,
|
|
26866
26841
|
style: style,
|
|
26867
26842
|
ref: mergedRef
|
|
26868
|
-
}, /*#__PURE__*/
|
|
26843
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("input", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
26869
26844
|
type: "radio",
|
|
26870
|
-
className: "".concat(radioPrefixCls, "-input")
|
|
26871
|
-
|
|
26845
|
+
className: "".concat(radioPrefixCls, "-input"),
|
|
26846
|
+
checked: isChecked,
|
|
26847
|
+
onChange: onChange,
|
|
26848
|
+
value: value,
|
|
26849
|
+
name: context === null || context === void 0 ? void 0 : context.name,
|
|
26850
|
+
disabled: mergedDisabled
|
|
26851
|
+
}, restProps)), children !== undefined ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", {
|
|
26872
26852
|
className: "".concat(radioPrefixCls, "-text")
|
|
26873
26853
|
}, children) : null)
|
|
26874
26854
|
);
|
|
26875
26855
|
};
|
|
26876
26856
|
|
|
26877
|
-
var Radio = /*#__PURE__*/
|
|
26857
|
+
var Radio = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.forwardRef(InternalRadio);
|
|
26878
26858
|
Radio.displayName = 'Radio';
|
|
26879
26859
|
/* harmony default export */ __webpack_exports__["default"] = (Radio);
|
|
26880
26860
|
|
|
@@ -105245,6 +105225,47 @@ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
|
105245
105225
|
module.exports = isSet;
|
|
105246
105226
|
|
|
105247
105227
|
|
|
105228
|
+
/***/ }),
|
|
105229
|
+
|
|
105230
|
+
/***/ "./node_modules/lodash/isString.js":
|
|
105231
|
+
/*!*****************************************!*\
|
|
105232
|
+
!*** ./node_modules/lodash/isString.js ***!
|
|
105233
|
+
\*****************************************/
|
|
105234
|
+
/*! no static exports found */
|
|
105235
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
105236
|
+
|
|
105237
|
+
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
|
|
105238
|
+
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
|
|
105239
|
+
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
|
|
105240
|
+
|
|
105241
|
+
/** `Object#toString` result references. */
|
|
105242
|
+
var stringTag = '[object String]';
|
|
105243
|
+
|
|
105244
|
+
/**
|
|
105245
|
+
* Checks if `value` is classified as a `String` primitive or object.
|
|
105246
|
+
*
|
|
105247
|
+
* @static
|
|
105248
|
+
* @since 0.1.0
|
|
105249
|
+
* @memberOf _
|
|
105250
|
+
* @category Lang
|
|
105251
|
+
* @param {*} value The value to check.
|
|
105252
|
+
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
|
105253
|
+
* @example
|
|
105254
|
+
*
|
|
105255
|
+
* _.isString('abc');
|
|
105256
|
+
* // => true
|
|
105257
|
+
*
|
|
105258
|
+
* _.isString(1);
|
|
105259
|
+
* // => false
|
|
105260
|
+
*/
|
|
105261
|
+
function isString(value) {
|
|
105262
|
+
return typeof value == 'string' ||
|
|
105263
|
+
(!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
|
|
105264
|
+
}
|
|
105265
|
+
|
|
105266
|
+
module.exports = isString;
|
|
105267
|
+
|
|
105268
|
+
|
|
105248
105269
|
/***/ }),
|
|
105249
105270
|
|
|
105250
105271
|
/***/ "./node_modules/lodash/isSymbol.js":
|