vue2-excel-grid 2.6.6 → 2.6.7
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/package.json
CHANGED
|
@@ -1273,13 +1273,13 @@ const ExcelGridComponent = {
|
|
|
1273
1273
|
* shrinking columns illegibly thin.
|
|
1274
1274
|
*
|
|
1275
1275
|
* Highest-priority width control: overrides `col.width` as an absolute
|
|
1276
|
-
* value
|
|
1277
|
-
*
|
|
1278
|
-
* a
|
|
1279
|
-
*
|
|
1280
|
-
*
|
|
1281
|
-
*
|
|
1282
|
-
*
|
|
1276
|
+
* value and `autoWidth`. Manual column resize (drag handle) and
|
|
1277
|
+
* double-click auto-fit ARE both allowed — either one turns that column
|
|
1278
|
+
* into a fixed px width, excluded from the fit; the rest keep scaling
|
|
1279
|
+
* proportionally to fill what's left, which can reintroduce horizontal
|
|
1280
|
+
* scroll if the fixed column(s) alone exceed the viewport. Pinned
|
|
1281
|
+
* columns count toward the fit too — the goal is the whole row fitting,
|
|
1282
|
+
* regardless of pin state.
|
|
1283
1283
|
* @type {Boolean}
|
|
1284
1284
|
* @default false
|
|
1285
1285
|
* @example
|
|
@@ -6036,8 +6036,12 @@ const ExcelGridComponent = {
|
|
|
6036
6036
|
this.resizing.active = false
|
|
6037
6037
|
},
|
|
6038
6038
|
|
|
6039
|
+
// Double-click-the-header "AutoFit column width" — same idea as Excel/Sheets'
|
|
6040
|
+
// double-click-the-border shortcut. Under fitColumns, same override
|
|
6041
|
+
// treatment as a manual drag-resize (see commitResize/_applyFitColumns):
|
|
6042
|
+
// this column becomes a fixed px width excluded from the proportional
|
|
6043
|
+
// fit, the rest keep scaling in what's left.
|
|
6039
6044
|
autoFitColumn(ci) {
|
|
6040
|
-
if (this.fitColumns) return
|
|
6041
6045
|
const col = this.leafCols[ci]
|
|
6042
6046
|
if (!col) return
|
|
6043
6047
|
let maxLen = (col.title || '').length
|
|
@@ -6049,6 +6053,10 @@ const ExcelGridComponent = {
|
|
|
6049
6053
|
this.$set(this.colWidths, ci, newWidth)
|
|
6050
6054
|
this.$delete(this.relativeColSpecs, ci)
|
|
6051
6055
|
this._cellStyleCache = Object.create(null)
|
|
6056
|
+
if (this.fitColumns) {
|
|
6057
|
+
this.$set(this.fitColumnsOverrides, col.key, true)
|
|
6058
|
+
this._applyFitColumns()
|
|
6059
|
+
}
|
|
6052
6060
|
this.$emit('column-resize', { index: ci, newSize: newWidth })
|
|
6053
6061
|
},
|
|
6054
6062
|
|