bhd-components 0.6.3 → 0.6.5
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/README.md +1 -1
- package/dist/{e88a10a0.esm.es5.production.js → 8bda9e2e.esm.es5.production.js} +1 -1
- package/dist/{a0cd97b9.esm.es5.development.js → d4259367.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.js +16 -5
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/bhdSelect/index.js +14 -3
- package/esm/bhdSelect/index.js +14 -3
- package/package.json +1 -1
|
@@ -265,12 +265,23 @@ const BhdSelect = (props)=>{
|
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
//表格中使用下拉列表,定义下拉列表宽度
|
|
268
|
-
|
|
268
|
+
//表格中使用下拉列表,定义下拉列表宽度
|
|
269
269
|
if (props.dropdownStyle != undefined && props.dropdownStyle.width != undefined) {
|
|
270
270
|
setSelectWidth(props.dropdownStyle.width);
|
|
271
|
-
} else if (
|
|
271
|
+
} else if (useType === "table") {
|
|
272
272
|
try {
|
|
273
|
-
|
|
273
|
+
let width = bhdSelectRef.current.parentNode.getBoundingClientRect().width + 14;
|
|
274
|
+
let minWidth = props.popupMatchSelectWidth;
|
|
275
|
+
//设置了最小宽度
|
|
276
|
+
if (minWidth != undefined && minWidth >= width) {
|
|
277
|
+
setSelectWidth(minWidth);
|
|
278
|
+
} else if (minWidth != undefined && minWidth < width) {
|
|
279
|
+
setSelectWidth(width);
|
|
280
|
+
} else if (minWidth == undefined && width < 60) {
|
|
281
|
+
setSelectWidth(60);
|
|
282
|
+
} else {
|
|
283
|
+
setSelectWidth(width);
|
|
284
|
+
}
|
|
274
285
|
} catch (error) {}
|
|
275
286
|
}
|
|
276
287
|
props.onMouseEnter && props.onMouseEnter(e);
|
package/esm/bhdSelect/index.js
CHANGED
|
@@ -269,12 +269,23 @@ var BhdSelect = function(props) {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
//表格中使用下拉列表,定义下拉列表宽度
|
|
272
|
-
|
|
272
|
+
//表格中使用下拉列表,定义下拉列表宽度
|
|
273
273
|
if (props.dropdownStyle != undefined && props.dropdownStyle.width != undefined) {
|
|
274
274
|
setSelectWidth(props.dropdownStyle.width);
|
|
275
|
-
} else if (
|
|
275
|
+
} else if (useType === "table") {
|
|
276
276
|
try {
|
|
277
|
-
|
|
277
|
+
var width = bhdSelectRef.current.parentNode.getBoundingClientRect().width + 14;
|
|
278
|
+
var minWidth = props.popupMatchSelectWidth;
|
|
279
|
+
//设置了最小宽度
|
|
280
|
+
if (minWidth != undefined && minWidth >= width) {
|
|
281
|
+
setSelectWidth(minWidth);
|
|
282
|
+
} else if (minWidth != undefined && minWidth < width) {
|
|
283
|
+
setSelectWidth(width);
|
|
284
|
+
} else if (minWidth == undefined && width < 60) {
|
|
285
|
+
setSelectWidth(60);
|
|
286
|
+
} else {
|
|
287
|
+
setSelectWidth(width);
|
|
288
|
+
}
|
|
278
289
|
} catch (error) {}
|
|
279
290
|
}
|
|
280
291
|
props.onMouseEnter && props.onMouseEnter(e);
|