【修改】修复筛选列头后,操作列不见的问题
This commit is contained in:
@@ -128,10 +128,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 存储当前列表的用户存储信息
|
||||
key: "customer_cloumns_" + this.$route.path,
|
||||
// 内部使用的 slots ,不再处理
|
||||
usedSlots: [],
|
||||
key: "customer_cloumns_" + this.$route.path, // 存储当前列表的用户存储信息
|
||||
defaultOperationKey: "action", // 操作列dataIndex=action不作相关处理,默认去除
|
||||
usedSlots: [], // 内部使用的 slots ,不再处理
|
||||
needTotalList: [],
|
||||
selectedRows: [],
|
||||
selectedRowKeys: [],
|
||||
@@ -217,7 +216,6 @@ export default {
|
||||
methods: {
|
||||
// 用户可自行筛选列头显示的字段
|
||||
onChange(e) {
|
||||
debugger
|
||||
// 只剩一个时候,最后一个多选按钮禁用
|
||||
if (this.checkedList.length === 1) {
|
||||
this.plainOptions.forEach((item) => {
|
||||
@@ -263,8 +261,13 @@ export default {
|
||||
},
|
||||
// 比较两个数组之间的不同,生成新数组
|
||||
getArrDifference(arr1, arr2) {
|
||||
let that = this;
|
||||
return arr1.concat(arr2).filter(function (v, i, arr) {
|
||||
return arr.indexOf(v) === arr.lastIndexOf(v)
|
||||
if (v !== that.defaultOperationKey){
|
||||
return arr.indexOf(v) === arr.lastIndexOf(v)
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
fixedChange(e, dataIndex) {
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
ref="jTable"
|
||||
size="default"
|
||||
:columns="columns"
|
||||
:isCheck="false"
|
||||
:dataSource="dataSource"
|
||||
>
|
||||
<div
|
||||
@@ -134,9 +133,6 @@
|
||||
width: '150px',
|
||||
dataIndex: 'action',
|
||||
scopedSlots: { customRender: 'action' },
|
||||
slots: {
|
||||
fixedValue: 2,
|
||||
}
|
||||
}
|
||||
],
|
||||
dataSource:[],
|
||||
|
||||
Reference in New Issue
Block a user