-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(affix): use Composition api #3447
Conversation
@@ -50,77 +60,26 @@ const AffixProps = { | |||
}; | |||
const Affix = defineComponent({ | |||
name: 'AAffix', | |||
mixins: [BaseMixin], | |||
// mixins: [BaseMixin], | |||
props: AffixProps, | |||
emits: ['change', 'testUpdatePosition'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testUpdatePosition 这个事件是干啥都
components/affix/index.tsx
Outdated
return () => { | ||
const { prefixCls } = props; | ||
const { affixStyle, placeholderStyle } = state; | ||
const getPrefixCls = configProvider.getPrefixCls; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用解构吧
components/affix/index.tsx
Outdated
|
||
const getOffsetTop = () => { | ||
const { offset, offsetBottom } = props; | ||
let { offsetTop } = props; | ||
if (typeof offsetTop === 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
跟下面判断 undefined
的方式统一一下吧
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is a ...
Refactor
Affix
What's the background?
API Realization (Optional if not new feature)
What's the effect? (Optional if not new feature)
Changelog description (Optional if not new feature)
Self Check before Merge
Additional Plan? (Optional if not new feature)