fix(测试跟踪): 阻止功能用例排序拖拽默认及冒泡事件

--bug=1033936 --user=宋昌昌 【功能用例】firefox浏览器,用例列表拖拽排序,浏览器会自动打开一个tab页 https://www.tapd.cn/55049933/s/1447901
This commit is contained in:
song-cc-rock 2023-12-25 11:10:50 +08:00 committed by 刘瑞斌
parent 961aea187e
commit e7e6431cb4
1 changed files with 13 additions and 7 deletions

View File

@ -116,15 +116,15 @@ import {
_handleSelect, _handleSelect,
_handleSelectAll, _handleSelectAll,
_sort, _sort,
getSelectDataCounts,
setUnSelectIds,
toggleAllSelection,
checkTableRowIsSelect, checkTableRowIsSelect,
clearShareDragParam,
getCustomTableHeader, getCustomTableHeader,
getSelectDataCounts,
handleRowDrop,
saveCustomTableWidth, saveCustomTableWidth,
saveLastTableSortField, saveLastTableSortField,
handleRowDrop, setUnSelectIds,
clearShareDragParam, toggleAllSelection,
} from "../../utils/tableUtils"; } from "../../utils/tableUtils";
import MsTableHeaderSelectPopover from "./MsTableHeaderSelectPopover"; import MsTableHeaderSelectPopover from "./MsTableHeaderSelectPopover";
import MsTablePagination from "../pagination/TablePagination"; import MsTablePagination from "../pagination/TablePagination";
@ -134,8 +134,7 @@ import MsTableOperators from "../MsTableOperators";
import HeaderLabelOperate from "../head/HeaderLabelOperate"; import HeaderLabelOperate from "../head/HeaderLabelOperate";
import HeaderCustom from "../head/HeaderCustom"; import HeaderCustom from "../head/HeaderCustom";
import MsCustomTableHeader from "../table/MsCustomTableHeader"; import MsCustomTableHeader from "../table/MsCustomTableHeader";
import {lineToHump} from "../../utils"; import {getUUID, lineToHump} from "../../utils";
import {getUUID} from "../../utils";
/** /**
* 参考 ApiList * 参考 ApiList
@ -299,6 +298,7 @@ export default {
}, },
mounted() { mounted() {
this.setDefaultOrders(); this.setDefaultOrders();
this.preventSortableEventPropagation();
}, },
watch: { watch: {
selectNodeIds() { selectNodeIds() {
@ -327,6 +327,12 @@ export default {
} }
}, },
methods: { methods: {
preventSortableEventPropagation() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
}
},
// , , // , ,
// batch-popper , , // batch-popper , ,
removeBatchPopper() { removeBatchPopper() {