UNPKG

vant-fork

Version:

Lightweight Mobile UI Components built on Vue

37 lines (33 loc) 793 B
import create from '../utils/create'; export default create({ render: function render() { var _vm = this; var _h = _vm.$createElement; var _c = _vm._self._c || _h; return _c('div', { staticClass: "van-hairline--top-bottom", class: _vm.b() }, [_vm._t("default")], 2); }, name: 'collapse', props: { accordion: Boolean, value: [String, Number, Array] }, data: function data() { return { items: [] }; }, methods: { switch: function _switch(name, expanded) { if (!this.accordion) { name = expanded ? this.value.concat(name) : this.value.filter(function (activeName) { return activeName !== name; }); } this.$emit('change', name); this.$emit('input', name); } } });