提交 a5a9b3fb 作者: 无木

fix(table): fix `dataPicker` show in `fullscreen` mode

修复basicTable编辑组件的校验提示以及日期选择框的弹出层在全屏模式下的显示问题
上级 a07ab6d7
...@@ -10,10 +10,17 @@ export interface ComponentProps { ...@@ -10,10 +10,17 @@ export interface ComponentProps {
rule: boolean; rule: boolean;
popoverVisible: boolean; popoverVisible: boolean;
ruleMessage: string; ruleMessage: string;
getPopupContainer?: Fn;
} }
export const CellComponent: FunctionalComponent = ( export const CellComponent: FunctionalComponent = (
{ component = 'Input', rule = true, ruleMessage, popoverVisible }: ComponentProps, {
component = 'Input',
rule = true,
ruleMessage,
popoverVisible,
getPopupContainer,
}: ComponentProps,
{ attrs } { attrs }
) => { ) => {
const Comp = componentMap.get(component) as typeof defineComponent; const Comp = componentMap.get(component) as typeof defineComponent;
...@@ -24,7 +31,11 @@ export const CellComponent: FunctionalComponent = ( ...@@ -24,7 +31,11 @@ export const CellComponent: FunctionalComponent = (
} }
return h( return h(
Popover, Popover,
{ overlayClassName: 'edit-cell-rule-popover', visible: !!popoverVisible }, {
overlayClassName: 'edit-cell-rule-popover',
visible: !!popoverVisible,
...(getPopupContainer ? { getPopupContainer } : {}),
},
{ {
default: () => DefaultComp, default: () => DefaultComp,
content: () => ruleMessage, content: () => ruleMessage,
......
...@@ -114,6 +114,7 @@ ...@@ -114,6 +114,7 @@
return { return {
getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body, getPopupContainer: () => unref(table?.wrapRef.value) ?? document.body,
getCalendarContainer: () => unref(table?.wrapRef.value) ?? document.body,
placeholder: createPlaceholderMessage(unref(getComponent)), placeholder: createPlaceholderMessage(unref(getComponent)),
...apiSelectProps, ...apiSelectProps,
...omit(compProps, 'onChange'), ...omit(compProps, 'onChange'),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论