提交 b89ab135 编写于 作者: 老北's avatar 老北 提交者: meHaoTian

update docs/component/uniui/uni-segmented-control.md.

添加items定义和切换方法
上级 41de328e
......@@ -29,6 +29,29 @@
</template>
```
```html
<script>
export default {
data() {
return {
...
items: ['选项1', '选项2', '选项3'],
current: 0
};
},
methods: {
...
onClickItem(e) {
if (this.current != e.currentIndex) {
this.current = e.currentIndex;
}
}
}
};
</script>
```
## API
### SegmentedControl Props
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册