bhd-components 0.7.31 → 0.7.32

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,7 +5,7 @@ import { CloseOutlined } from "@ant-design/icons";
5
5
  import { CustomDuihao } from "../icons/index";
6
6
  import "react-image-crop/dist/ReactCrop.css";
7
7
  import styles from "./index.module.less";
8
- const ScreenshotTool = /*#__PURE__*/ forwardRef((props)=>{
8
+ const ScreenshotTool = /*#__PURE__*/ forwardRef((props, ref)=>{
9
9
  let { imgBese64 , saveScreenshotBese64 , cancelScreenshot } = props;
10
10
  const [crop, setCrop] = useState();
11
11
  const [completedCrop, setCompletedCrop] = useState();
@@ -81,6 +81,8 @@ const Table = (props)=>{
81
81
  let minWidth = 0; //最小宽度
82
82
  let scrollWidth = 0; //出现滚动条时 滚动宽度
83
83
  columns = columns.map((item)=>{
84
+ // 克隆columns里的每项 保证每次拿到width都是唯一的
85
+ item = _object_spread({}, item);
84
86
  item.width = item.width || "auto";
85
87
  // item.width=parseFloat(item.width)
86
88
  if (widthPercentage.test(item.width)) {
@@ -6,7 +6,7 @@ import { CloseOutlined } from "@ant-design/icons";
6
6
  import { CustomDuihao } from "../icons/index";
7
7
  import "react-image-crop/dist/ReactCrop.css";
8
8
  import styles from "./index.module.less";
9
- var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props) {
9
+ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
10
10
  var centerAspectCrop = function centerAspectCrop(mediaWidth, mediaHeight, aspect) {
11
11
  return centerCrop(makeAspectCrop({
12
12
  unit: "%",
@@ -82,6 +82,8 @@ var Table = function(props) {
82
82
  var minWidth = 0; //最小宽度
83
83
  var scrollWidth = 0; //出现滚动条时 滚动宽度
84
84
  columns = columns.map(function(item) {
85
+ // 克隆columns里的每项 保证每次拿到width都是唯一的
86
+ item = _object_spread({}, item);
85
87
  item.width = item.width || "auto";
86
88
  // item.width=parseFloat(item.width)
87
89
  if (widthPercentage.test(item.width)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.7.31",
3
+ "version": "0.7.32",
4
4
  "description": "组件功能描述",
5
5
  "files": [
6
6
  "esm",