bhd-components 0.6.3 → 0.6.4
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/{a0cd97b9.esm.es5.development.js → 9674e68c.esm.es5.development.js} +1 -1
- package/dist/{e88a10a0.esm.es5.production.js → a57a24b2.esm.es5.production.js} +1 -1
- package/dist/index.esm.es5.development.css +21 -24
- package/dist/index.esm.es5.development.js +16 -19
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/bhdSelect/index.d.ts +0 -3
- package/es2017/bhdSelect/index.js +13 -18
- package/es2017/bhdSelect/index.module.less +5 -4
- package/esm/bhdSelect/index.d.ts +0 -3
- package/esm/bhdSelect/index.js +13 -18
- package/esm/bhdSelect/index.module.less +5 -4
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ const BhdSelect = (props)=>{
|
|
|
26
26
|
const [optionHei, setOptionHei] = useState(0); //option的宽度
|
|
27
27
|
const [filterValue, setFilterValue] = useState(""); //下拉搜索的内容
|
|
28
28
|
const [filterChildren, setfilterChildren] = useState([]);
|
|
29
|
-
const [selectWidth,
|
|
29
|
+
// const [selectWidth,setSelectWidth] = useState(0);//下拉框的宽度
|
|
30
30
|
const renderSuffixIcon = ()=>{
|
|
31
31
|
switch(arrowType){
|
|
32
32
|
case "table":
|
|
@@ -197,11 +197,11 @@ const BhdSelect = (props)=>{
|
|
|
197
197
|
};
|
|
198
198
|
useEffect(()=>{
|
|
199
199
|
// console.log(34343434,props);
|
|
200
|
-
if
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
// console.log(bhdSelectRef.current.getBoundingClientRect(),555555555);
|
|
204
|
-
}
|
|
200
|
+
// if(props.popupMatchSelectWidth){
|
|
201
|
+
// setSelectWidth(props.popupMatchSelectWidth);
|
|
202
|
+
// }else{
|
|
203
|
+
// // console.log(bhdSelectRef.current.getBoundingClientRect(),555555555);
|
|
204
|
+
// }
|
|
205
205
|
filterOption();
|
|
206
206
|
window.addEventListener("resize", initHeight);
|
|
207
207
|
return ()=>{
|
|
@@ -217,11 +217,7 @@ const BhdSelect = (props)=>{
|
|
|
217
217
|
let config = _object_spread_props(_object_spread({}, props), {
|
|
218
218
|
listHeight: optionHei,
|
|
219
219
|
popupClassName: `${styles.bhdSelect_option} ${popupClassName || ""} `,
|
|
220
|
-
suffixIcon: suffixIcon ? suffixIcon : renderSuffixIcon()
|
|
221
|
-
popupMatchSelectWidth: selectWidth,
|
|
222
|
-
dropdownStyle: _object_spread_props(_object_spread({}, props.dropdownStyle), {
|
|
223
|
-
width: selectWidth
|
|
224
|
-
})
|
|
220
|
+
suffixIcon: suffixIcon ? suffixIcon : renderSuffixIcon()
|
|
225
221
|
});
|
|
226
222
|
delete config.mask;
|
|
227
223
|
delete config.className;
|
|
@@ -266,13 +262,12 @@ const BhdSelect = (props)=>{
|
|
|
266
262
|
}
|
|
267
263
|
//表格中使用下拉列表,定义下拉列表宽度
|
|
268
264
|
// console.log(props.dropdownStyle,'sdsddfdfdf');
|
|
269
|
-
if
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
265
|
+
// if(props.dropdownStyle != undefined && props.dropdownStyle.width != undefined){
|
|
266
|
+
// setSelectWidth(props.dropdownStyle.width)
|
|
267
|
+
// }else if( (props.dropdownStyle == undefined || props.dropdownStyle.width == undefined) && useType === 'table'){
|
|
268
|
+
// console.log(bhdSelectRef.current.parentNode.getBoundingClientRect().width-4,33333);
|
|
269
|
+
// setSelectWidth(bhdSelectRef.current.parentNode.getBoundingClientRect().width-4)
|
|
270
|
+
// }
|
|
276
271
|
props.onMouseEnter && props.onMouseEnter(e);
|
|
277
272
|
},
|
|
278
273
|
children: filterChildren
|
|
@@ -105,13 +105,14 @@
|
|
|
105
105
|
width: 14px;
|
|
106
106
|
.bhd-btn {
|
|
107
107
|
border: none;
|
|
108
|
-
height: 16px;
|
|
108
|
+
// height: 16px;
|
|
109
|
+
height: 10px;
|
|
109
110
|
line-height: 16px;
|
|
110
111
|
width: 14px;
|
|
111
112
|
}
|
|
112
|
-
.bhd-btn-default{
|
|
113
|
-
|
|
114
|
-
}
|
|
113
|
+
// .bhd-btn-default{
|
|
114
|
+
// box-shadow: none !important;
|
|
115
|
+
// }
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
}
|
package/esm/bhdSelect/index.d.ts
CHANGED
package/esm/bhdSelect/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var BhdSelect = function(props) {
|
|
|
29
29
|
var _useState1 = _sliced_to_array(useState(0), 2), optionHei = _useState1[0], setOptionHei = _useState1[1]; //option的宽度
|
|
30
30
|
var _useState2 = _sliced_to_array(useState(""), 2), filterValue = _useState2[0], setFilterValue = _useState2[1]; //下拉搜索的内容
|
|
31
31
|
var _useState3 = _sliced_to_array(useState([]), 2), filterChildren = _useState3[0], setfilterChildren = _useState3[1];
|
|
32
|
-
|
|
32
|
+
// const [selectWidth,setSelectWidth] = useState(0);//下拉框的宽度
|
|
33
33
|
var renderSuffixIcon = function() {
|
|
34
34
|
switch(arrowType){
|
|
35
35
|
case "table":
|
|
@@ -201,11 +201,11 @@ var BhdSelect = function(props) {
|
|
|
201
201
|
};
|
|
202
202
|
useEffect(function() {
|
|
203
203
|
// console.log(34343434,props);
|
|
204
|
-
if
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
// console.log(bhdSelectRef.current.getBoundingClientRect(),555555555);
|
|
208
|
-
}
|
|
204
|
+
// if(props.popupMatchSelectWidth){
|
|
205
|
+
// setSelectWidth(props.popupMatchSelectWidth);
|
|
206
|
+
// }else{
|
|
207
|
+
// // console.log(bhdSelectRef.current.getBoundingClientRect(),555555555);
|
|
208
|
+
// }
|
|
209
209
|
filterOption();
|
|
210
210
|
window.addEventListener("resize", initHeight);
|
|
211
211
|
return function() {
|
|
@@ -221,11 +221,7 @@ var BhdSelect = function(props) {
|
|
|
221
221
|
var config = _object_spread_props(_object_spread({}, props), {
|
|
222
222
|
listHeight: optionHei,
|
|
223
223
|
popupClassName: "".concat(styles.bhdSelect_option, " ").concat(popupClassName || "", " "),
|
|
224
|
-
suffixIcon: suffixIcon ? suffixIcon : renderSuffixIcon()
|
|
225
|
-
popupMatchSelectWidth: selectWidth,
|
|
226
|
-
dropdownStyle: _object_spread_props(_object_spread({}, props.dropdownStyle), {
|
|
227
|
-
width: selectWidth
|
|
228
|
-
})
|
|
224
|
+
suffixIcon: suffixIcon ? suffixIcon : renderSuffixIcon()
|
|
229
225
|
});
|
|
230
226
|
delete config.mask;
|
|
231
227
|
delete config.className;
|
|
@@ -270,13 +266,12 @@ var BhdSelect = function(props) {
|
|
|
270
266
|
}
|
|
271
267
|
//表格中使用下拉列表,定义下拉列表宽度
|
|
272
268
|
// console.log(props.dropdownStyle,'sdsddfdfdf');
|
|
273
|
-
if
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
269
|
+
// if(props.dropdownStyle != undefined && props.dropdownStyle.width != undefined){
|
|
270
|
+
// setSelectWidth(props.dropdownStyle.width)
|
|
271
|
+
// }else if( (props.dropdownStyle == undefined || props.dropdownStyle.width == undefined) && useType === 'table'){
|
|
272
|
+
// console.log(bhdSelectRef.current.parentNode.getBoundingClientRect().width-4,33333);
|
|
273
|
+
// setSelectWidth(bhdSelectRef.current.parentNode.getBoundingClientRect().width-4)
|
|
274
|
+
// }
|
|
280
275
|
props.onMouseEnter && props.onMouseEnter(e);
|
|
281
276
|
},
|
|
282
277
|
children: filterChildren
|
|
@@ -105,13 +105,14 @@
|
|
|
105
105
|
width: 14px;
|
|
106
106
|
.bhd-btn {
|
|
107
107
|
border: none;
|
|
108
|
-
height: 16px;
|
|
108
|
+
// height: 16px;
|
|
109
|
+
height: 10px;
|
|
109
110
|
line-height: 16px;
|
|
110
111
|
width: 14px;
|
|
111
112
|
}
|
|
112
|
-
.bhd-btn-default{
|
|
113
|
-
|
|
114
|
-
}
|
|
113
|
+
// .bhd-btn-default{
|
|
114
|
+
// box-shadow: none !important;
|
|
115
|
+
// }
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
}
|