centaline-data-driven 1.4.72 → 1.4.73
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
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</el-table-column>
|
|
44
44
|
|
|
45
45
|
<!--操作列-->
|
|
46
|
-
<el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0">
|
|
46
|
+
<el-table-column label="操作" v-if="model.rows[0].edit || model.rows[0].delete || model.buttons.length > 0" :render-header="renderHeader" :min-width="tableColumnWith">
|
|
47
47
|
<template slot-scope="scope">
|
|
48
48
|
<span v-if="scope.row.edit || scope.row.isSet" class="el-tag el-tag--info el-tag--mini" style="cursor: pointer;" @click="saveRow(scope.row,scope.$index,true)">
|
|
49
49
|
{{scope.row.isSet?'保存':"修改"}}
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
},
|
|
131
131
|
//添加账号
|
|
132
132
|
addRow() {
|
|
133
|
-
|
|
133
|
+
var app = this;
|
|
134
134
|
if (app.model.dialogEdit) {
|
|
135
135
|
app.model.addRow(() => {
|
|
136
136
|
app.$forceUpdate();
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
app.model.currentRow.isSet = false;
|
|
205
205
|
app.itemKey = Math.random();
|
|
206
206
|
this.model.change = this.model.formListChange;
|
|
207
|
-
app.$emit('change');
|
|
207
|
+
app.$emit('change');
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
}
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
app.model.currentRow.isSet = true;
|
|
216
216
|
row.isSet = true;
|
|
217
217
|
app.itemKey = Math.random();
|
|
218
|
-
}
|
|
218
|
+
}
|
|
219
219
|
},
|
|
220
220
|
//删除
|
|
221
221
|
deleteRow(index, sourceIndex) {
|
|
@@ -410,8 +410,8 @@
|
|
|
410
410
|
span.style.width = 'auto';
|
|
411
411
|
// 临时插入 document
|
|
412
412
|
document.body.appendChild(span);
|
|
413
|
-
// 重点:获取 span 最小宽度,设置当前列,注意这里加了
|
|
414
|
-
column.minWidth = span.getBoundingClientRect().width +
|
|
413
|
+
// 重点:获取 span 最小宽度,设置当前列,注意这里加了 35,字段较多时还是有挤压,且渲染后的 div 内左右 padding 都是 5,所以 +10 ,另外25是为了公布工号列不被遮挡。(可能还有边距/边框等值,需要根据实际情况加上)
|
|
414
|
+
column.minWidth = span.getBoundingClientRect().width + 35;
|
|
415
415
|
this.tableColumnWith = column.minWidth
|
|
416
416
|
// 移除 document 中临时的 span
|
|
417
417
|
document.body.removeChild(span);
|