vxe-table 3.6.12-beta.9 → 3.6.12

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/lib/index.umd.js CHANGED
@@ -16994,17 +16994,24 @@ var Methods = {
16994
16994
  var column = handleFieldOrColumn(this, fieldOrColumn);
16995
16995
  if (column) {
16996
16996
  var colWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(width);
16997
+ var rdWidth = colWidth;
16997
16998
  if (dom.isScale(width)) {
16998
16999
  var tableBody = this.$refs.tableBody;
16999
17000
  var tableBodyElem = tableBody ? tableBody.$el : null;
17000
17001
  var bodyWidth = tableBodyElem ? tableBodyElem.clientWidth - 1 : 0;
17001
- column.renderWidth = Math.floor(colWidth * bodyWidth);
17002
- } else {
17003
- column.renderWidth = colWidth;
17002
+ rdWidth = Math.floor(colWidth * bodyWidth);
17004
17003
  }
17004
+ column.renderWidth = rdWidth;
17005
17005
  }
17006
17006
  return this.$nextTick();
17007
17007
  },
17008
+ getColumnWidth: function getColumnWidth(fieldOrColumn) {
17009
+ var column = handleFieldOrColumn(this, fieldOrColumn);
17010
+ if (column) {
17011
+ return column.renderWidth;
17012
+ }
17013
+ return 0;
17014
+ },
17008
17015
  /**
17009
17016
  * 手动重置列的显示隐藏、列宽拖动的状态;
17010
17017
  * 如果为 true 则重置所有状态