iview/src/components/cascader/casitem.vue

24 lines
721 B
Vue
Raw Normal View History

2016-11-15 19:17:54 +08:00
<template>
<li :class="classes">{{ data.label }}<i v-if="data.children && data.children.length" class="ivu-icon ivu-icon-ios-arrow-right"></i></li>
</template>
<script>
export default {
props: {
data: Object,
prefixCls: String,
tmpItem: Object
},
computed: {
classes () {
return [
`${this.prefixCls}-menu-item`,
{
2016-11-15 23:23:16 +08:00
[`${this.prefixCls}-menu-item-active`]: this.tmpItem.value === this.data.value,
[`${this.prefixCls}-menu-item-disabled`]: this.data.disabled
2016-11-15 19:17:54 +08:00
}
2016-12-25 22:49:42 +08:00
];
2016-11-15 19:17:54 +08:00
}
}
2016-12-25 22:49:42 +08:00
};
</script>