Skip to content

Dev,modal组件#10

Merged
RobinYang11 merged 6 commits intoRobinYang11:devfrom
xahy123:dev
Mar 22, 2023
Merged

Dev,modal组件#10
RobinYang11 merged 6 commits intoRobinYang11:devfrom
xahy123:dev

Conversation

@xahy123
Copy link
Copy Markdown

@xahy123 xahy123 commented Mar 22, 2023

No description provided.

@EbenChan
Copy link
Copy Markdown

EbenChan commented Mar 22, 2023 via email

Copy link
Copy Markdown
Owner

@RobinYang11 RobinYang11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请实现

  • 点击 遮罩关闭
  • 为了保证css类名尽量唯一 请使用style module

}
}, [])
return (
(ref.current && props.visible) ? createPortal(
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请问你的弹框 ,点击遮罩层 能关闭弹框吗?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在蒙层那里调用Onclose方法就能关闭

Comment thread src/components/myModal/index.tsx Outdated
return (
(ref.current && props.visible) ? createPortal(
<div>
<div className="mask"></div>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

会用style module 吗?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

会使用,将less改为index.module.less,使用style引入,className='mask' ==> className={style.mask}

@RobinYang11
Copy link
Copy Markdown
Owner

_test.tsx 还有冲突哦

@xahy123
Copy link
Copy Markdown
Author

xahy123 commented Mar 22, 2023

现在呢,解决了

@RobinYang11 RobinYang11 merged commit 5b1acd1 into RobinYang11:dev Mar 22, 2023
@RobinYang11
Copy link
Copy Markdown
Owner

好了

@RobinYang11
Copy link
Copy Markdown
Owner

👍🏼 greate job!

@xahy123
Copy link
Copy Markdown
Author

xahy123 commented Mar 22, 2023

Thanks

@xahy123 xahy123 deleted the dev branch March 22, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants