From b36195eac0bad81ea9739c4ed54a6e8fb04ee634 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Thu, 22 Feb 2024 13:38:43 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E8=A7=A3=E5=86=B3=E6=A0=87=E5=87=86?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E8=B0=83=E6=95=B4=E5=88=97=E5=AE=BD=E4=BC=9A?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E6=8E=92=E5=BA=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/jero/JTable.vue | 7 ++++++- src/mixins/ConfigurableTableMixin.js | 12 ++++++++++++ .../standard/EnterpriseStandardList.vue | 1 + .../domesticStandard/DomesticStandardList.vue | 1 + .../overseasStandard/OverseasStandardList.vue | 1 + 5 files changed, 21 insertions(+), 1 deletion(-) 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 @@