UNPKG

captain-ui

Version:

有赞vue wap业务组件库

57 lines (52 loc) 1.26 kB
export default { render: function render() { var _vm = this; var _h = _vm.$createElement; var _c = _vm._self._c || _h; return _c('li', { staticClass: "cap-filter-bar__item", class: { 'cap-filter-bar__item--sort': _vm.type === 'sort', 'cap-filter-bar__item--active': false }, on: { "click": _vm.handleClick } }, [_vm._v("\n " + _vm._s(_vm.title) + "\n "), _vm.filter.type === 'sort' ? _c('div', { staticClass: "cap-filter-bar__item__sort-icon" }) : _vm._e()]); }, name: 'cap-filter-item', props: { title: { type: String, default: '' }, type: { type: String, default: '', validator: function validator(value) { if (value && value !== 'sort') { return false; } return true; } }, defaultDirection: { type: String, default: '', validator: function validator(value) { if (this.type !== 'sort') { return true; } return ['ascend', 'descend'].indexOf(value) !== -1; } } }, methods: { handleClick: function handleClick() { console.log(this.$slots, this.$parent); this.$emit('change'); } } };