vant-weapp/dist/badge/index.js
2018-12-07 16:13:02 +08:00

25 lines
474 B
JavaScript

import { VantComponent } from '../common/component';
VantComponent({
relation: {
type: 'ancestor',
name: 'badge-group'
},
props: {
info: Number,
title: String
},
methods: {
onClick: function onClick() {
var group = this.getRelationNodes('../badge-group/index')[0];
if (group) {
group.setActive(this);
}
},
setActive: function setActive(active) {
this.set({
active: active
});
}
}
});