UNPKG

captain-ui

Version:

有赞vue wap业务组件库

60 lines (57 loc) 1.38 kB
import "vant/es/icon/style"; import _Icon from "vant/es/icon"; export default { render: function render() { var _vm = this; var _h = _vm.$createElement; var _c = _vm._self._c || _h; return _c('a', { staticClass: "cap-text", class: { 'cap-text--has-link': _vm.linkUrl, 'cap-text--has-line': _vm.showSplitLine }, style: _vm.textStyle, attrs: { "href": _vm.url } }, [_c('div', { staticClass: "cap-text__content-wrap" }, [_c('p', { staticClass: "cap-text__content" }, [_vm._v(_vm._s(_vm.text))]), _vm.linkUrl ? _c('van-icon', { staticClass: "cap-text__icon", attrs: { "name": "arrow" } }) : _vm._e()], 1)]); }, name: 'cap-text', components: { 'van-icon': _Icon }, props: { linkUrl: String, color: String, text: String, textAlign: String, fontSize: [Number, String], lineHeight: [Number, String], bgColor: String, showSplitLine: Boolean }, computed: { url: function url() { return this.linkUrl ? this.linkUrl : 'javascript:;'; }, textStyle: function textStyle() { return { textAlign: this.textAlign, color: this.color, fontSize: this.fontSize + 'px', lineHeight: this.lineHeight + 'px', background: this.bgColor }; } } };