assui 3.1.43 → 3.1.44
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.
|
@@ -5,6 +5,7 @@ export declare enum InputTypeEnum {
|
|
|
5
5
|
CONDITION_INPUT = "conditionInput",
|
|
6
6
|
SELECT = "select"
|
|
7
7
|
}
|
|
8
|
+
declare type ChangeSelectType = typeof InputTypeEnum[keyof typeof InputTypeEnum];
|
|
8
9
|
declare type SelectOptionsType = {
|
|
9
10
|
value: number;
|
|
10
11
|
label: string;
|
|
@@ -27,6 +28,7 @@ export interface LabelConditionSelectInputProps {
|
|
|
27
28
|
conditionInputProps?: LabelConditionInputProps;
|
|
28
29
|
/** 联动selectProps */
|
|
29
30
|
conditionSelectProps?: LabelSelectProps;
|
|
31
|
+
onChangeSelectType?: (changeSelectType: ChangeSelectType, value?: ValueType) => void;
|
|
30
32
|
/** onChange */
|
|
31
33
|
onChange?: (value: ValueType) => void;
|
|
32
34
|
/** onBlur */
|
|
@@ -66,6 +66,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
66
66
|
inputType = _b === void 0 ? InputTypeEnum.CONDITION_INPUT : _b,
|
|
67
67
|
_c = props.optionsList,
|
|
68
68
|
optionsList = _c === void 0 ? [] : _c,
|
|
69
|
+
onChangeSelectType = props.onChangeSelectType,
|
|
69
70
|
label = props.label,
|
|
70
71
|
className = props.className,
|
|
71
72
|
onBlur = props.onBlur;
|
|
@@ -102,6 +103,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
setSelectInputValue(finalSelectInputValue);
|
|
106
|
+
onChangeSelectType === null || onChangeSelectType === void 0 ? void 0 : onChangeSelectType(InputTypeEnum.SELECT, finalSelectInputValue);
|
|
105
107
|
if (isInput || isNil(selectValue)) {
|
|
106
108
|
setSubSelectOptions([]);
|
|
107
109
|
return;
|
|
@@ -115,10 +117,12 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
115
117
|
}
|
|
116
118
|
};
|
|
117
119
|
var onInputChange = function onInputChange(inputValue) {
|
|
118
|
-
|
|
120
|
+
var finalValue = {
|
|
119
121
|
selectValue: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
|
|
120
122
|
inputValue: inputValue
|
|
121
|
-
}
|
|
123
|
+
};
|
|
124
|
+
setSelectInputValue(finalValue);
|
|
125
|
+
onChangeSelectType === null || onChangeSelectType === void 0 ? void 0 : onChangeSelectType(InputTypeEnum.SELECT, finalValue);
|
|
122
126
|
};
|
|
123
127
|
var onTypeSelectChange = function onTypeSelectChange(inputValue) {
|
|
124
128
|
var finalSelectInputValue = {
|
|
@@ -131,6 +135,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
131
135
|
});
|
|
132
136
|
}
|
|
133
137
|
setSelectInputValue(finalSelectInputValue);
|
|
138
|
+
onChangeSelectType === null || onChangeSelectType === void 0 ? void 0 : onChangeSelectType(InputTypeEnum.CONDITION_INPUT, finalSelectInputValue);
|
|
134
139
|
};
|
|
135
140
|
/** 联级选择框失去焦点 */
|
|
136
141
|
var onLabelConditionSelectInputBlur = function onLabelConditionSelectInputBlur() {
|
|
@@ -5,6 +5,7 @@ export declare enum InputTypeEnum {
|
|
|
5
5
|
CONDITION_INPUT = "conditionInput",
|
|
6
6
|
SELECT = "select"
|
|
7
7
|
}
|
|
8
|
+
declare type ChangeSelectType = typeof InputTypeEnum[keyof typeof InputTypeEnum];
|
|
8
9
|
declare type SelectOptionsType = {
|
|
9
10
|
value: number;
|
|
10
11
|
label: string;
|
|
@@ -27,6 +28,7 @@ export interface LabelConditionSelectInputProps {
|
|
|
27
28
|
conditionInputProps?: LabelConditionInputProps;
|
|
28
29
|
/** 联动selectProps */
|
|
29
30
|
conditionSelectProps?: LabelSelectProps;
|
|
31
|
+
onChangeSelectType?: (changeSelectType: ChangeSelectType, value?: ValueType) => void;
|
|
30
32
|
/** onChange */
|
|
31
33
|
onChange?: (value: ValueType) => void;
|
|
32
34
|
/** onBlur */
|
|
@@ -110,6 +110,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
110
110
|
inputType = _b === void 0 ? InputTypeEnum.CONDITION_INPUT : _b,
|
|
111
111
|
_c = props.optionsList,
|
|
112
112
|
optionsList = _c === void 0 ? [] : _c,
|
|
113
|
+
onChangeSelectType = props.onChangeSelectType,
|
|
113
114
|
label = props.label,
|
|
114
115
|
className = props.className,
|
|
115
116
|
onBlur = props.onBlur;
|
|
@@ -146,6 +147,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
146
147
|
});
|
|
147
148
|
}
|
|
148
149
|
setSelectInputValue(finalSelectInputValue);
|
|
150
|
+
onChangeSelectType === null || onChangeSelectType === void 0 ? void 0 : onChangeSelectType(InputTypeEnum.SELECT, finalSelectInputValue);
|
|
149
151
|
if (isInput || (0, isNil_1["default"])(selectValue)) {
|
|
150
152
|
setSubSelectOptions([]);
|
|
151
153
|
return;
|
|
@@ -159,10 +161,12 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
159
161
|
}
|
|
160
162
|
};
|
|
161
163
|
var onInputChange = function onInputChange(inputValue) {
|
|
162
|
-
|
|
164
|
+
var finalValue = {
|
|
163
165
|
selectValue: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
|
|
164
166
|
inputValue: inputValue
|
|
165
|
-
}
|
|
167
|
+
};
|
|
168
|
+
setSelectInputValue(finalValue);
|
|
169
|
+
onChangeSelectType === null || onChangeSelectType === void 0 ? void 0 : onChangeSelectType(InputTypeEnum.SELECT, finalValue);
|
|
166
170
|
};
|
|
167
171
|
var onTypeSelectChange = function onTypeSelectChange(inputValue) {
|
|
168
172
|
var finalSelectInputValue = {
|
|
@@ -175,6 +179,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
175
179
|
});
|
|
176
180
|
}
|
|
177
181
|
setSelectInputValue(finalSelectInputValue);
|
|
182
|
+
onChangeSelectType === null || onChangeSelectType === void 0 ? void 0 : onChangeSelectType(InputTypeEnum.CONDITION_INPUT, finalSelectInputValue);
|
|
178
183
|
};
|
|
179
184
|
/** 联级选择框失去焦点 */
|
|
180
185
|
var onLabelConditionSelectInputBlur = function onLabelConditionSelectInputBlur() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.44",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"node": ">=10.0.0"
|
|
81
81
|
},
|
|
82
82
|
"license": "MIT",
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "120c2d44fc5d61e94615369b3c4c948e0b4eae7c"
|
|
84
84
|
}
|