更新记录
1.0.2(2021-01-29)
添加双向绑定
1.0.1(2020-11-26)
.
2.9.11(2020-11-26)
修复小程序 bug
添加右侧数量显示
查看更多
平台兼容性
HbuilderX/cli最低兼容版本 |
2.9.11 |
uni-app
app-vue |
app-nvue |
app-android |
app-ios |
? |
? |
? |
? |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
? |
? |
? |
? |
? |
? |
? |
? |
? |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
? |
? |
? |
? |
? |
? |
? |
? |
? |
uni-app x
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
? |
? |
? |
? |
? |
? |
? |
? |
? |
使用说明
import sideCategory from '@/components/mochen-side-category/mochen-side-category.vue';
<!-- 引入 -->
components: {
sideCategory
}
<!-- 注册 -->
<!-- 在页面中使用 -->
<side-category class="category" v-model="currentIndex" :customNumStyle="{ color: 'red' }" :list="list" active-color="#4CD964" :width="100" actiive-height="80%" actiive-width="2%" @change="change">
<view>
分类
</view>
</side-category>
<!-- 示例值 -->
data(){
returl {
list: [
{
name: '分类一',
num: 10
},
{
name: '分类一',
num: 20
}
],
currentIndex : 1
}
},
methods:{
change(currentIndex){
console.log(currentIndex)
}
}
props: {
list: {
type: Array,
default() {
return [];
}
},
listKey: {
type: String,
default: 'name'
},
listNumKey: {
type: String,
default: 'num'
},
customItemStyle: {
// items style
type: Object,
default() {
return {};
}
},
customNumStyle: {
// items style
type: Object,
default() {
return {};
}
},
width: {
type: Number,
default: 200
},
actiiveColor: {
type: String,
default: '#4CD964'
},
actiiveHeight: {
type: String,
default: '60%'
},
actiiveWidth: {
type: String,
default: '4px'
}
},