Commit a5a9b3fb34c64b6ea9c9ab3d58045f6e5963952b
1 parent
a07ab6d7
fix(table): fix `dataPicker` show in `fullscreen` mode
修复basicTable编辑组件的校验提示以及日期选择框的弹出层在全屏模式下的显示问题
Showing
2 changed files
with
14 additions
and
2 deletions
src/components/Table/src/components/editable/CellComponent.ts
@@ -10,10 +10,17 @@ export interface ComponentProps { | @@ -10,10 +10,17 @@ export interface ComponentProps { | ||
10 | rule: boolean; | 10 | rule: boolean; |
11 | popoverVisible: boolean; | 11 | popoverVisible: boolean; |
12 | ruleMessage: string; | 12 | ruleMessage: string; |
13 | + getPopupContainer?: Fn; | ||
13 | } | 14 | } |
14 | 15 | ||
15 | export const CellComponent: FunctionalComponent = ( | 16 | export const CellComponent: FunctionalComponent = ( |
16 | - { component = 'Input', rule = true, ruleMessage, popoverVisible }: ComponentProps, | 17 | + { |
18 | + component = 'Input', | ||
19 | + rule = true, | ||
20 | + ruleMessage, | ||
21 | + popoverVisible, | ||
22 | + getPopupContainer, | ||
23 | + }: ComponentProps, | ||
17 | { attrs } | 24 | { attrs } |
18 | ) => { | 25 | ) => { |
19 | const Comp = componentMap.get(component) as typeof defineComponent; | 26 | const Comp = componentMap.get(component) as typeof defineComponent; |
@@ -24,7 +31,11 @@ export const CellComponent: FunctionalComponent = ( | @@ -24,7 +31,11 @@ export const CellComponent: FunctionalComponent = ( | ||
24 | } | 31 | } |
25 | return h( | 32 | return h( |
26 | Popover, | 33 | Popover, |
27 | - { overlayClassName: 'edit-cell-rule-popover', visible: !!popoverVisible }, | 34 | + { |
35 | + overlayClassName: 'edit-cell-rule-popover', | ||
36 | + visible: !!popoverVisible, | ||
37 | + ...(getPopupContainer ? { getPopupContainer } : {}), | ||
38 | + }, | ||
28 | { | 39 | { |
29 | default: () => DefaultComp, | 40 | default: () => DefaultComp, |
30 | content: () => ruleMessage, | 41 | content: () => ruleMessage, |
src/components/Table/src/components/editable/EditableCell.vue
@@ -114,6 +114,7 @@ | @@ -114,6 +114,7 @@ | ||
114 | 114 | ||
115 | return { | 115 | return { |
116 | getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body, | 116 | getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body, |
117 | + getCalendarContainer: () => unref(table?.wrapRef.value) ?? document.body, | ||
117 | placeholder: createPlaceholderMessage(unref(getComponent)), | 118 | placeholder: createPlaceholderMessage(unref(getComponent)), |
118 | ...apiSelectProps, | 119 | ...apiSelectProps, |
119 | ...omit(compProps, 'onChange'), | 120 | ...omit(compProps, 'onChange'), |