-
Notifications
You must be signed in to change notification settings - Fork 375
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
feat: view组件支持配置text相关属性 & border-radius 属性值支持% #1591
Conversation
}, {}) | ||
} | ||
|
||
function splitProps(props: ExtendedViewStyle) { |
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.
props: ExtendedViewStyle 类型声明错了吧
const onLayout = () => { | ||
|
||
nodeRef.current?.measure((x: number, y: number, width: number, height: number, offsetLeft: number, offsetTop: number) => { | ||
layoutRef.current = { x, y, width, height, offsetLeft, offsetTop } | ||
const newWidthStyleMap = percentTransform(widthRelativeStyleProps, 'width', { width }) |
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.
measure按条件执行
children = [<Text key='viewTextWrap' style={textStyle}>{children}</Text>] | ||
if (every(children as ReactNode[], (child) => isText(child))) { | ||
if (textStyle || textProps) { | ||
children = [<Text key='viewTextWrap' style={textStyle} {...(textProps || {})}>{children}</Text>] |
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.
没必要包数组
…nto fix-rn-base-component
No description provided.