Skip to content

Commit

Permalink
chore: resolve Conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Wesley-0808 committed Feb 10, 2025
1 parent 048b026 commit f172f79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/components/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ export default defineComponent({
const dialogEle = ref<HTMLElement | null>(null);
const dialogCardRef = ref<HTMLElement | null>(null);
const { globalConfig } = useConfig('dialog');
// header 值为 true 显示空白头部
const header = renderTNodeJSX('header', <h5 class="title"></h5>);
const body = renderContent('default', 'body');
const confirmBtnAction = (context: { e: MouseEvent }) => {
props.onConfirm?.(context);
};
Expand Down Expand Up @@ -284,9 +287,6 @@ export default defineComponent({
return !!eventFuncs?.length;
};
const renderDialog = () => {
// header 值为 true 显示空白头部
const header = renderTNodeJSX('header', <h5 class="title"></h5>);
const body = renderContent('default', 'body');
const { dialogClassName, theme, ...otherProps } = props;
return (
// /* 非模态形态下draggable为true才允许拖拽 */
Expand Down
11 changes: 5 additions & 6 deletions packages/components/dialog/dialogCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ export default defineComponent({
const defaultFooter = (
<div>
{getCancelBtn({
cancelBtn: cancelBtn as TdDialogProps['cancelBtn'],
cancelBtn: cancelBtn.value as TdDialogProps['cancelBtn'],
globalCancel: globalConfig.value.cancel,
className: `${COMPONENT_NAME.value}__cancel`,
})}
{getConfirmBtn({
theme: props.theme,
confirmBtn: confirmBtn as TdDialogProps['confirmBtn'],
confirmBtn: confirmBtn.value as TdDialogProps['confirmBtn'],
globalConfirm: globalConfig.value.confirm,
globalConfirmBtnTheme: globalConfig.value.confirmBtnTheme,
className: `${COMPONENT_NAME.value}__confirm`,
Expand Down Expand Up @@ -87,13 +87,12 @@ export default defineComponent({
};
return icon[props.theme as keyof typeof icon];
};
// console.log(confirmLoading ?? confirmBtn?.loading, confirmBtn)
return (
(header || props.closeBtn) && (
(header.value || props.closeBtn) && (
<div class={headerClassName} onMousedown={onStopDown}>
<div class={`${COMPONENT_NAME.value}__header-content`}>
{getIcon()}
{header}
{header.value}
</div>

{props.closeBtn ? (
Expand All @@ -116,7 +115,7 @@ export default defineComponent({
}
return (
<div class={bodyClassName} onMousedown={onStopDown}>
{body}
{body.value}
</div>
);
};
Expand Down

0 comments on commit f172f79

Please sign in to comment.