@hw-component/form 1.10.96 → 1.10.97
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/Input/SelectInput.js +1 -0
- package/es/Select/index.js +5 -0
- package/lib/Input/SelectInput.js +1 -0
- package/lib/Select/index.js +5 -0
- package/package.json +1 -1
- package/src/components/Input/SelectInput.tsx +1 -0
- package/src/components/Select/index.tsx +5 -0
- package/src/pages/Form/index.tsx +1 -19
- package/src/pages/Select/index.tsx +1 -1
package/es/Input/SelectInput.js
CHANGED
|
@@ -27,6 +27,7 @@ var Index = function Index(_ref) {
|
|
|
27
27
|
addFormat = _ref.addFormat;
|
|
28
28
|
_ref.addDispatchListener;
|
|
29
29
|
var props = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
+
console.log(props, "ppppppp");
|
|
30
31
|
var _valueName$input = valueName.input,
|
|
31
32
|
input = _valueName$input === void 0 ? "" : _valueName$input,
|
|
32
33
|
_valueName$select = valueName.select,
|
package/es/Select/index.js
CHANGED
|
@@ -145,6 +145,11 @@ var Index = function Index(_ref) {
|
|
|
145
145
|
optionFilterProp: optionFilterProp,
|
|
146
146
|
filterOption: selfFilterOption,
|
|
147
147
|
showSearch: mathShowSearch,
|
|
148
|
+
onBlur: function onBlur() {
|
|
149
|
+
if (serviceSearch && onSearch) {
|
|
150
|
+
onSearch("");
|
|
151
|
+
}
|
|
152
|
+
},
|
|
148
153
|
labelInValue: true,
|
|
149
154
|
onPopupScroll: propsOnPopupScroll || onPopupScroll,
|
|
150
155
|
getPopupContainer: selfPopupContainer ? function () {
|
package/lib/Input/SelectInput.js
CHANGED
|
@@ -30,6 +30,7 @@ var Index = function Index(_ref) {
|
|
|
30
30
|
addFormat = _ref.addFormat;
|
|
31
31
|
_ref.addDispatchListener;
|
|
32
32
|
var props = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
+
console.log(props, "ppppppp");
|
|
33
34
|
var _valueName$input = valueName.input,
|
|
34
35
|
input = _valueName$input === void 0 ? "" : _valueName$input,
|
|
35
36
|
_valueName$select = valueName.select,
|
package/lib/Select/index.js
CHANGED
|
@@ -148,6 +148,11 @@ var Index = function Index(_ref) {
|
|
|
148
148
|
optionFilterProp: optionFilterProp,
|
|
149
149
|
filterOption: selfFilterOption,
|
|
150
150
|
showSearch: mathShowSearch,
|
|
151
|
+
onBlur: function onBlur() {
|
|
152
|
+
if (serviceSearch && onSearch) {
|
|
153
|
+
onSearch("");
|
|
154
|
+
}
|
|
155
|
+
},
|
|
151
156
|
labelInValue: true,
|
|
152
157
|
onPopupScroll: propsOnPopupScroll || onPopupScroll,
|
|
153
158
|
getPopupContainer: selfPopupContainer ? function () {
|
package/package.json
CHANGED
|
@@ -130,6 +130,11 @@ const Index: React.FC<HSelectProps> = ({
|
|
|
130
130
|
optionFilterProp={optionFilterProp}
|
|
131
131
|
filterOption={selfFilterOption}
|
|
132
132
|
showSearch={mathShowSearch}
|
|
133
|
+
onBlur={()=>{
|
|
134
|
+
if (serviceSearch&&onSearch){
|
|
135
|
+
onSearch("");
|
|
136
|
+
}
|
|
137
|
+
}}
|
|
133
138
|
labelInValue={true}
|
|
134
139
|
onPopupScroll={propsOnPopupScroll || onPopupScroll}
|
|
135
140
|
getPopupContainer={
|
package/src/pages/Form/index.tsx
CHANGED
|
@@ -236,26 +236,8 @@ export default () => {
|
|
|
236
236
|
{
|
|
237
237
|
name: "num1",
|
|
238
238
|
label: "必填",
|
|
239
|
+
type:"selectInput",
|
|
239
240
|
dependencies: ["num"],
|
|
240
|
-
// hidden: () => {
|
|
241
|
-
// return !form.getFieldValue("num");
|
|
242
|
-
// },
|
|
243
|
-
rules: [
|
|
244
|
-
{
|
|
245
|
-
required: true,
|
|
246
|
-
message: "Please confirm your password!",
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
validator(_, value) {
|
|
250
|
-
console.log("ffff");
|
|
251
|
-
return Promise.reject(
|
|
252
|
-
new Error(
|
|
253
|
-
"The two passwords that you entered do not match!"
|
|
254
|
-
)
|
|
255
|
-
);
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
],
|
|
259
241
|
},
|
|
260
242
|
]}
|
|
261
243
|
dismissOnPressEnter={false}
|