@xsyx/hanzo-swiper-dot
Version:
> swiper组件
40 lines (39 loc) • 808 B
JavaScript
// @xsyx-components/hanzo-swiper-dot/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
// 宽度
width: { type: Number, value: 30 },
// 高度
height: { type: Number, value: 10 },
// 长度
len: { type: Number, value: 3 },
// 背景颜色
bgColor: { type: String, value: "#ccc" },
// 选中的背景颜色
activeBgColor: { type: String, value: "red" },
// 当前所在滑块的 index
current: { type: Number, value: 0, observer(newV, oldV) {
if (newV != oldV) {
this.setData({
current: newV
});
}
}
}
},
ready() {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})