Commit a07ab6d7aa1060f856649a9bdbec9dfa50b14f26

Authored by 无木
1 parent 9b8f165a

fix(table): component shown in `fullscreen` mode

修复表格在全屏模式下编辑组件弹出层的显示问题
CHANGELOG.zh_CN.md
... ... @@ -4,6 +4,7 @@
4 4 - **BasicTable** 修复可编辑单元格不支持`ellipsis`配置的问题
5 5 - **ImgRotateDragVerify** 修复组件`resume`方法无法调用的问题
6 6 - **TableAction** 修复 stopButtonPropagation 属性某些情况下不起作用的问题
  7 +- **BasicTable** 修复全屏模式下看不到子组件弹出层(popconfirm 以及 select、treeSelect 等编辑组件)的问题
7 8 - **Dark Theme** 黑暗主题下的配色问题修正
8 9 - 修复`Tree`组件被选中节点的背景颜色
9 10 - 修复`Alert`组件的颜色配置
... ...
src/components/Table/src/components/TableAction.vue
... ... @@ -35,7 +35,7 @@
35 35 </div>
36 36 </template>
37 37 <script lang="ts">
38   - import { defineComponent, PropType, computed, toRaw } from 'vue';
  38 + import { defineComponent, PropType, computed, toRaw, unref } from 'vue';
39 39 import { MoreOutlined } from '@ant-design/icons-vue';
40 40 import { Divider, Tooltip, TooltipProps } from 'ant-design-vue';
41 41 import Icon from '/@/components/Icon/index';
... ... @@ -95,6 +95,7 @@
95 95 .map((action) => {
96 96 const { popConfirm } = action;
97 97 return {
  98 + getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body,
98 99 type: 'link',
99 100 size: 'small',
100 101 ...action,
... ... @@ -131,11 +132,11 @@
131 132 });
132 133  
133 134 function getTooltip(data: string | TooltipProps): TooltipProps {
134   - if (isString(data)) {
135   - return { title: data, placement: 'bottom' };
136   - } else {
137   - return Object.assign({ placement: 'bottom' }, data);
138   - }
  135 + return {
  136 + getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body,
  137 + placement: 'bottom',
  138 + ...(isString(data) ? { title: data } : data),
  139 + };
139 140 }
140 141  
141 142 function onCellClick(e: MouseEvent) {
... ...
src/components/Table/src/components/editable/EditableCell.vue
... ... @@ -113,6 +113,7 @@
113 113 const value = isCheckValue ? (isNumber(val) && isBoolean(val) ? val : !!val) : val;
114 114  
115 115 return {
  116 + getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body,
116 117 placeholder: createPlaceholderMessage(unref(getComponent)),
117 118 ...apiSelectProps,
118 119 ...omit(compProps, 'onChange'),
... ...
src/views/demo/table/EditRowTable.vue
... ... @@ -171,6 +171,8 @@
171 171 api: demoListApi,
172 172 columns: columns,
173 173 showIndexColumn: false,
  174 + showTableSetting: true,
  175 + tableSetting: { fullScreen: true },
174 176 actionColumn: {
175 177 width: 160,
176 178 title: 'Action',
... ...