-
Notifications
You must be signed in to change notification settings - Fork 19
1.0.5 #37
base: master
Are you sure you want to change the base?
1.0.5 #37
Conversation
Signed-off-by: Luozhou (Siyuan Cao) <luozhou.csy@alibaba-inc.com>
Signed-off-by: Luozhou (Siyuan Cao) <luozhou.csy@alibaba-inc.com>
Signed-off-by: Luozhou (Siyuan Cao) <luozhou.csy@alibaba-inc.com>
yibuyisheng
left a comment
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.
Page 和 App 也同步改一下?
| */ | ||
| observe( | ||
| targetSelector: string, | ||
| callback: (res: IObserveResult) => any, |
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.
返回值要不用 void?
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.
有的时候就用箭头函数的,感觉用 void 会限制这个地方?
my.createIntersectionObserver()
.relativeToViewport()
.observe('.className', node => this.nodes.push(node)) // <- 用 void 会报错
types/component.d.ts
Outdated
| } | ||
|
|
||
| type ComponentOptions< | ||
| interface InternalComponentOptions<P, D, M> { |
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.
IInternalComponentOptions
Signed-off-by: Luozhou (Siyuan Cao) <luozhou.csy@alibaba-inc.com>
Signed-off-by: Luozhou (Siyuan Cao) <luozhou.csy@alibaba-inc.com>
| * @file IntersectionObserver 对象,用于推断某些节点是否可以被用户看见、有多大比例可以被用户看见。 | ||
| */ | ||
| declare namespace my { | ||
| namespace intersectionObserver { |
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.
不需要加这个 namespace 吧
| selectAll?: boolean; | ||
| } | ||
|
|
||
| interface IRect { |
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.
IRect -> IIntersectionObserverRect
主要变更
my.createIntersectionObserver及相关类型的声明。Refactor
ComponentOptions重构为 interface 以便业务自行扩展。