-
Notifications
You must be signed in to change notification settings - Fork 32
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
【Slider】组件实现及单测问题 #58
Comments
5这一条我们可能要再考虑一下。 目前的标识一个组件部件的方法是用 <div data-ui="test">
<div id="ctrl-button-test-part"></div>
</div>
|
其他的改动点我觉得都OK |
组件的样式名包括 id 都有专门工具方法来生成这没啥问题,而现在实现上问题是如何获取 |
目前来讲, 那么问题来了,如何给 应该分成两种情况:
分别的处理逻辑应该是这样:
但不管怎样, |
new Slider({
main: document.getElementById('slider'),
datasource: [{
image: 'http://xxxx.jpg',
url: 'http://xxxx.com'
}]
}).render(); 这种情况可以处理main元素中没有任何内容,需要 |
@Property options.prefix选项不存在
@Property {HTMLElement=} options.stage 控件动画容器,
@Property {HTMLElement=} options.prevElement prev按钮的容器,
@Property {HTMLElement=} options.nextElement next按钮的容器,
@Property {HTMLElement=} options.indexElement 轮播索引按钮的容器,会将第一级子元素设为索引元素
@Property {Function=} options.onChange 当播放索引改变时的事件
为啥ie7下会取出数字了?按规范来,都是字符串,用ie7模式下看也都是字符串。。
transition按规范来必须指定属性,不能为all
此外值写错了: all 0.3s 0 linear 应为 all 0.3s linear 0 (0可以省略,默认值)
data-stage
来获取,而不是通过class:ui-slider-stage
即HTML模板,通过
data-stage
属性标识stage
容器,而不是通过组件自动生成的ui-slider-stage
样式privates
定义方法提取出来放在prototype下,私用方法通过annotation标注refresh
方法,组件repaint/render/setXX方法可以替代,这个方法没感觉有存在的必要性,此外可以保持组件 API 一致性circle
设为 true,而不受外部传入的circle
值影响lineer
改成linear
isBusy
实现逻辑有问题this.timer !== 0; 改成 !!this.timer;
The text was updated successfully, but these errors were encountered: