@lemon-fe/components 0.1.75 → 0.1.76
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/Popup/index.d.ts +6 -1
- package/es/Popup/index.js +3 -2
- package/package.json +2 -2
package/es/Popup/index.d.ts
CHANGED
|
@@ -23,10 +23,15 @@ export interface PopupProps<ValueType> extends ModalProps {
|
|
|
23
23
|
disabledTip?: string;
|
|
24
24
|
bordered?: boolean;
|
|
25
25
|
onClick?: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* @description 清空后的值
|
|
28
|
+
*/
|
|
29
|
+
emptyValue?: ValueType;
|
|
26
30
|
}
|
|
27
|
-
interface ValuedPopupProps<ValueType> extends Omit<PopupProps<ValueType>, 'value' | 'onChange' | '
|
|
31
|
+
interface ValuedPopupProps<ValueType> extends Omit<PopupProps<ValueType>, 'value' | 'onChange' | 'emptyValue'> {
|
|
28
32
|
value: ValueType;
|
|
29
33
|
onChange?: (value: ValueType) => void;
|
|
34
|
+
emptyValue: ValueType;
|
|
30
35
|
}
|
|
31
36
|
declare function Popup<ValueType>(props: ValuedPopupProps<ValueType>): JSX.Element;
|
|
32
37
|
declare function Popup<ValueType>(props: PopupProps<ValueType>): JSX.Element;
|
package/es/Popup/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["value", "onChange", "component", "children", "formatLabel", "disabled", "allowClear", "autoFocus", "showLabel", "beforeOk", "placeholder", "onClick", "disabledTip", "bordered"];
|
|
1
|
+
var _excluded = ["value", "onChange", "component", "children", "formatLabel", "disabled", "allowClear", "autoFocus", "showLabel", "beforeOk", "placeholder", "onClick", "disabledTip", "bordered", "emptyValue"];
|
|
2
2
|
|
|
3
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; }
|
|
4
4
|
|
|
@@ -51,6 +51,7 @@ function Popup(props) {
|
|
|
51
51
|
disabledTip = props.disabledTip,
|
|
52
52
|
_props$bordered = props.bordered,
|
|
53
53
|
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
54
|
+
emptyValue = props.emptyValue,
|
|
54
55
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
55
56
|
|
|
56
57
|
var prefixCls = "".concat(PREFIX_CLS, "-popup");
|
|
@@ -144,7 +145,7 @@ function Popup(props) {
|
|
|
144
145
|
e.stopPropagation();
|
|
145
146
|
|
|
146
147
|
if (onChange) {
|
|
147
|
-
onChange(
|
|
148
|
+
onChange(emptyValue);
|
|
148
149
|
}
|
|
149
150
|
};
|
|
150
151
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.76",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "鲁盛杰 <lusj@cnlemon.net>",
|
|
6
6
|
"homepage": "",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"react": "^17.0.2",
|
|
42
42
|
"react-dom": "^17.0.2"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "9a65df6bf44689cbfd8079b3d905e912a761280b"
|
|
45
45
|
}
|