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