captain-ui
Version:
有赞vue wap业务组件库
44 lines (41 loc) • 843 B
JavaScript
export default {
render: function render() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "cap-line-wrap",
style: _vm.wrapStyle
}, [_c('hr', {
staticClass: "cap-line",
style: _vm.borderStyle
})]);
},
name: 'cap-line',
props: {
lineType: {
type: String,
default: ''
},
color: {
type: String,
default: ''
},
hasPadding: {
type: Boolean,
default: false
}
},
computed: {
wrapStyle: function wrapStyle() {
return this.hasPadding ? {
padding: '0 15px'
} : {};
},
borderStyle: function borderStyle() {
return this.lineType && this.color ? {
borderTop: "1px " + this.lineType + " " + this.color
} : {};
}
}
};