diff --git a/src/components/jero/JTable.vue b/src/components/jero/JTable.vue index 52d95ac8..4500025d 100644 --- a/src/components/jero/JTable.vue +++ b/src/components/jero/JTable.vue @@ -256,7 +256,8 @@ export default { cell: this.initDrag(this.columns) } }, - selfScroll: {} + selfScroll: {}, + resizing: false } }, watch: { @@ -457,6 +458,7 @@ export default { } // 开始拖拽监听 const onDragging = (x) => { + this.resizing = true const beforeWidth = col.width const scroll = cloneDeep(this.scroll) || {} draggingState[key] = 0 @@ -484,6 +486,9 @@ export default { // 停止拖拽监听 const onDragstop = () => { draggingState[key] = thDom.getBoundingClientRect().width + setTimeout(() => { + this.resizing = false + }, 200) } // 控制最小拖拽宽度 const onDrag = (x) => { diff --git a/src/mixins/ConfigurableTableMixin.js b/src/mixins/ConfigurableTableMixin.js index 45e01be7..5c3a8f39 100644 --- a/src/mixins/ConfigurableTableMixin.js +++ b/src/mixins/ConfigurableTableMixin.js @@ -225,6 +225,18 @@ export const ConfigurableTableMixin = { }) }, tableOnChange (pagination, filters, sorter) { + // debugger; + console.log(this.$refs.tableRef.resizing) + if (this.$refs.tableRef.resizing) { + const classNameOne = window.event.target.parentNode.children[0].children[0].children[1].children[0].children[0].className + const classNameTwo = window.event.target.parentNode.children[0].children[0].children[1].children[0].children[1].className + const target = window.event.target + this.$nextTick(() => { + target.parentNode.children[0].children[0].children[1].children[0].children[0].className = classNameOne + target.parentNode.children[0].children[0].children[1].children[0].children[1].className = classNameTwo + }) + return + } console.log(sorter) if (Object.keys(sorter).length > 0) { if (sorter.field.split('_')[sorter.field.split('_').length - 1] === 'dictText') { diff --git a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue index 9ad4f575..de70e116 100644 --- a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue +++ b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue @@ -88,6 +88,7 @@