# uni-swiper-dot ## Instructions 组件名:uni-swiper-dot 代码块: uSwiperDot 点击下载&安装 ### Syntax - 使用 ``(或 ``,当需要包裹子节点时)。 - 遇到平台差异时,建议使用条件编译(`#ifdef / #endif`)显式处理。 #### Properties | 属性名 | 类型 | 默认值 | 说明 | | --- | --- | --- | --- | | current | Number | 0 | 当前指示点索引,必须是通过 swiper 的 change 事件获取到的 e.detail.current | | mode | String | default | 指示点的类型,可选值:default 、round 、nav 、 indexes | | field | String | - | mode 为 nav 时,显示的内容字段(mode = nav 时必填) | | info | Array | - | 轮播图的数据,通过数组长度决定指示点个数 | | dotsStyles | Object | - | 指示点样式 | #### Events See official docs for full events list: `https://uniapp.dcloud.net.cn/component/uniui/uni-swiper-dot.html` #### Platform Compatibility See official docs for platform support table: `https://uniapp.dcloud.net.cn/component/uniui/uni-swiper-dot.html` ### Examples ### Example (Example 1) ```vue {{item.content}} ``` ### Example (Example 2) ```html {{item.content}} ``` ### Example (Example 3) ```vue export default { data() { return { info: [{ content: '内容 A' }, { content: '内容 B' }, { content: '内容 C' }], current: 0, mode: 'round', } }, methods: { change(e) { this.current = e.detail.current; } } } ``` ### Example (Example 4) ```javascript export default { data() { return { info: [{ content: '内容 A' }, { content: '内容 B' }, { content: '内容 C' }], current: 0, mode: 'round', } }, methods: { change(e) { this.current = e.detail.current; } } } ``` ### Example (Example 5) ```vue ``` ### Example (Example 6) ```html ``` Reference: - [Official Documentation](https://uniapp.dcloud.net.cn/component/uniui/uni-swiper-dot.html) - [Plugin Marketplace](https://ext.dcloud.net.cn/plugin?name=swiper-dot) - [Local Example](examples/uni-ui/uni-swiper-dot.vue)