【fix 66426】JTable修复拖拽小于最小宽度后的异常
This commit is contained in:
@@ -255,7 +255,7 @@ export default {
|
||||
return <th {...restProps}>{children}</th>
|
||||
}
|
||||
// 开始拖拽监听
|
||||
const onDrag = (x) => {
|
||||
const onDragging = (x) => {
|
||||
const beforeWidth = col.width
|
||||
const scroll = cloneDeep(this.scroll) || {}
|
||||
draggingState[key] = 0
|
||||
@@ -280,6 +280,10 @@ export default {
|
||||
const onDragstop = () => {
|
||||
draggingState[key] = thDom.getBoundingClientRect().width
|
||||
}
|
||||
// 控制最小拖拽宽度
|
||||
const onDrag = (x) => {
|
||||
return x >= (col.minWidth || this.columnMinWidth)
|
||||
}
|
||||
return (
|
||||
<th
|
||||
{...restProps}
|
||||
@@ -298,7 +302,8 @@ export default {
|
||||
axis="x"
|
||||
draggable={true}
|
||||
resizable={false}
|
||||
onDragging={onDrag}
|
||||
props={{ onDrag }}
|
||||
onDragging={onDragging}
|
||||
onDragstop={onDragstop}
|
||||
></vue-draggable-resizable>
|
||||
</th>
|
||||
|
||||
Reference in New Issue
Block a user