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.
@@ -22,9 +22,6 @@ interface BhdSelectProps extends SelectProps {
22
22
  useType?: string;
23
23
  listHeight?: number;
24
24
  popupMatchSelectWidth?: number;
25
- dropdownStyle?: {
26
- width: number;
27
- };
28
25
  }
29
26
  declare const BhdSelect: {
30
27
  (props: BhdSelectProps): React.JSX.Element;
@@ -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, setSelectWidth] = useState(0); //下拉框的宽度
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 (props.popupMatchSelectWidth) {
201
- setSelectWidth(props.popupMatchSelectWidth);
202
- } else {
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 (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
- try {
273
- setSelectWidth(bhdSelectRef.current.parentNode.getBoundingClientRect().width + 14);
274
- } catch (error) {}
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
- box-shadow: none !important;
114
- }
113
+ // .bhd-btn-default{
114
+ // box-shadow: none !important;
115
+ // }
115
116
  }
116
117
 
117
118
  }
@@ -22,9 +22,6 @@ interface BhdSelectProps extends SelectProps {
22
22
  useType?: string;
23
23
  listHeight?: number;
24
24
  popupMatchSelectWidth?: number;
25
- dropdownStyle?: {
26
- width: number;
27
- };
28
25
  }
29
26
  declare const BhdSelect: {
30
27
  (props: BhdSelectProps): React.JSX.Element;
@@ -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
- var _useState4 = _sliced_to_array(useState(0), 2), selectWidth = _useState4[0], setSelectWidth = _useState4[1]; //下拉框的宽度
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 (props.popupMatchSelectWidth) {
205
- setSelectWidth(props.popupMatchSelectWidth);
206
- } else {
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 (props.dropdownStyle != undefined && props.dropdownStyle.width != undefined) {
274
- setSelectWidth(props.dropdownStyle.width);
275
- } else if ((props.dropdownStyle == undefined || props.dropdownStyle.width == undefined) && useType === "table") {
276
- try {
277
- setSelectWidth(bhdSelectRef.current.parentNode.getBoundingClientRect().width + 14);
278
- } catch (error) {}
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
- box-shadow: none !important;
114
- }
113
+ // .bhd-btn-default{
114
+ // box-shadow: none !important;
115
+ // }
115
116
  }
116
117
 
117
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "组件功能描述",
5
5
  "files": [
6
6
  "esm",