|
@@ -14,6 +14,8 @@ import { ModalFunc } from 'ant-design-vue/lib/modal/Modal';
|
|
|
|
|
|
// 自定义选择列的key
|
|
|
export const CUS_SEL_COLUMN_KEY = 'j-custom-selected-column';
|
|
|
+// css命名空间,暂且写死已解决此hook无法获取到html元素的问题
|
|
|
+const ventSpace = 'zxm';
|
|
|
|
|
|
/**
|
|
|
* 自定义选择列
|
|
@@ -158,7 +160,7 @@ export function useCustomSelection(
|
|
|
}
|
|
|
});
|
|
|
bodyResizeObserver.observe(bodyEl.value);
|
|
|
- const el = bodyEl.value?.querySelector('tbody.ant-table-tbody tr.ant-table-row') as HTMLDivElement;
|
|
|
+ const el = bodyEl.value?.querySelector(`tbody .${ventSpace}-table-tbody tr .${ventSpace}-table-row`) as HTMLDivElement;
|
|
|
if (el) {
|
|
|
rowHeight.value = el.offsetHeight;
|
|
|
return;
|
|
@@ -527,7 +529,8 @@ export function useCustomSelection(
|
|
|
function getTableBody(wrap: HTMLDivElement) {
|
|
|
return new Promise<HTMLDivElement>((resolve) => {
|
|
|
(function fn() {
|
|
|
- const bodyEl = wrap.querySelector('.ant-table-wrapper .ant-table-body') as HTMLDivElement;
|
|
|
+ const bodyEl = wrap.querySelector(`.${ventSpace}-table-wrapper .${ventSpace}-table-body`) as HTMLDivElement;
|
|
|
+ console.log('debug r', bodyEl);
|
|
|
if (bodyEl) {
|
|
|
resolve(bodyEl);
|
|
|
} else {
|