diff --git a/package.json b/package.json index 7c9e096..3549410 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kne/column-split", - "version": "1.0.0", + "version": "1.0.1", "description": "通过拖动分隔条分配元素占比", "syntax": { "esmodules": true diff --git a/src/index.js b/src/index.js index 5eba095..de7baaf 100644 --- a/src/index.js +++ b/src/index.js @@ -35,7 +35,7 @@ const ColumnSplit = ({ columns = [], className, readOnly, disabled, ...props }) {} ); //修正value最后一个值; - value[last.name] = 1 - otherValue; + value[last.name] = Math.round(100 * (1 - otherValue)) / 100; onChange(value); }} >