Skip to content

Commit

Permalink
feat: 删除无用代码dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
zuiaiwanqian committed Apr 29, 2024
1 parent ff8a911 commit 6906cb0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/dialog/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import { CloseIcon } from 'tdesign-icons-vue-next';
import { computed, toRefs, defineComponent, getCurrentInstance } from 'vue';
import { computed, defineComponent } from 'vue';
import get from 'lodash/get';
import isString from 'lodash/isString';

import TButton, { ButtonProps } from '../button';
import TPopup from '../popup';
import config from '../config';
import props from './props';
import { renderContent, renderTNode, TNode } from '../shared';
import { useTNodeJSX, useContent } from '../hooks/tnode';

const { prefix } = config;
const name = `${prefix}-dialog`;

export default defineComponent({
name,
components: { TPopup, TNode, TButton, CloseIcon },
components: { TPopup, TButton, CloseIcon },
props,
emits: ['update:visible', 'confirm', 'overlay-click', 'cancel', 'close', 'closed'],
setup(props, context) {
Expand Down Expand Up @@ -145,7 +144,7 @@ export default defineComponent({
onClose={handleOverlayClick}
onClosed={handleClosed}
>
<div class={`${name} ${context.attrs.class}`} style={rootStyles.value}>
<div class={`${name} ${context.attrs.class || ''}`} style={rootStyles.value}>
{renderTNodeJSX('top')}
{closeBtn && (
<div class={`${name}__close-btn`}>
Expand Down

0 comments on commit 6906cb0

Please sign in to comment.