diff --git a/src/components/XdTable/index.vue b/src/components/XdTable/index.vue index 1afab844..42cc9562 100644 --- a/src/components/XdTable/index.vue +++ b/src/components/XdTable/index.vue @@ -95,8 +95,8 @@
- - + +
@@ -1028,7 +1028,13 @@ export default { arr.splice(newIndex-1, 0, currCol); that.storageList = arr; - that.updateTable(); + + console.log("====>setHeaderSortable===>",that.storageList) + this.storeTplToLocal(that.storageList) + this.initStorage() + this.updateTable() + this.initSort(); + // that.updateTable(); // this.refreshKeyId=Math.random().toString(36).substring(3,10); // const currCol = vnode.context.storageList.splice(oldIndex-1, 1)[0]; @@ -1175,10 +1181,11 @@ export default { list = storage[this.saveStorageName] ? storage[this.saveStorageName] : [] } + // || node.componentOptions.propsData.type // 不管是否初次还是要做一下处理,万一页面有修改,做一下更新,以最新的node节点数组为准 this.$vnode.componentOptions.children.forEach(node => { // 以prop为准,因为可能会改文本 - if (!(!node.componentOptions || node.componentOptions.propsData.type) && list.findIndex(i => i.prop === node.componentOptions.propsData.prop) < 0) { + if (!(!node.componentOptions ) && list.findIndex(i => i.prop === node.componentOptions.propsData.prop) < 0) { // 非插槽且 不是特殊类型的 找不到就加上 const propsData = JSON.parse(JSON.stringify(node.componentOptions.propsData)) if (propsData.fixed === undefined || propsData.fixed === false) { @@ -1225,10 +1232,10 @@ export default { if (item.show) { const node = this.$vnode.componentOptions.children.find(n => n.componentOptions && n.componentOptions.propsData.prop === item.prop) if (node) { - // let nodeItem=node.componentOptions.propsData; - // if(item.label != nodeItem.label){ - // item.label=nodeItem.label; - // } + let nodeItem=node.componentOptions.propsData; + if(item.label != nodeItem.label){ + item.label=nodeItem.label; + } node.componentOptions.propsData.fixed = item.fixed childrenNodes.push(node) } diff --git a/src/views/emis/emisSettleBill/panel/ChargeBillMoneyPanel.vue b/src/views/emis/emisSettleBill/panel/ChargeBillMoneyPanel.vue index e1d90294..cbc0c40b 100644 --- a/src/views/emis/emisSettleBill/panel/ChargeBillMoneyPanel.vue +++ b/src/views/emis/emisSettleBill/panel/ChargeBillMoneyPanel.vue @@ -170,7 +170,7 @@