# uni-segmented-control
## Instructions
组件名:uni-segmented-control
代码块: uSegmentedControl
点击下载&安装
### Syntax
- 使用 ``(或 ``,当需要包裹子节点时)。
- 遇到平台差异时,建议使用条件编译(`#ifdef / #endif`)显式处理。
#### Properties
| 属性名 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| current | Number | 0 | 当前选中的tab索引值,从0计数 |
| styleType | String | button | 分段器样式类型,可选值:button(按钮类型),text(文字类型) |
| activeColor | String | #007aff | 选中的标签背景色与边框颜色 |
| inActiveColor | String | transparent | 未激活时的颜色 |
| values | Array | - | 选项数组 |
#### Events
| 事件名 | 说明 | 返回值 |
| --- | --- | --- |
| @clickItem | 组件触发点击事件时触发 | e={currentIndex} |
#### Platform Compatibility
See official docs for platform support table: `https://uniapp.dcloud.net.cn/component/uniui/uni-segmented-control.html`
### Examples
### Example (Example 1)
```vue
选项卡1的内容
选项卡2的内容
选项卡3的内容
```
### Example (Example 2)
```html
选项卡1的内容
选项卡2的内容
选项卡3的内容
```
### Example (Example 3)
```vue
标签组件多用于商品分类、重点内容显示等场景。
选项卡1的内容
选项卡2的内容
选项卡3的内容
{{ item.text }}
```
### Example (Example 4)
```html
标签组件多用于商品分类、重点内容显示等场景。
选项卡1的内容
选项卡2的内容
选项卡3的内容
{{ item.text }}
```
### Example (Example 5)
```html
```
### Example (Example 6)
```html
```
Reference:
- [Official Documentation](https://uniapp.dcloud.net.cn/component/uniui/uni-segmented-control.html)
- [Plugin Marketplace](https://ext.dcloud.net.cn/plugin?name=segmented-control)
- [Local Example](examples/uni-ui/uni-segmented-control.vue)