captain-ui
Version:
有赞vue wap业务组件库
55 lines (50 loc) • 1.46 kB
JavaScript
import "vant/es/button/style";
import _Button from "vant/es/button";
var _components;
import fullfillImage from '@youzan/utils/fullfillImage';
export default {
render: function render() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "cap-order-goods__message-list"
}, [_c('h2', [_vm._v("备注信息")]), _c('ul', _vm._l(_vm.messages, function (value, key) {
return _c('li', {
key: key
}, [_c('label', [_vm._v(_vm._s(key))]), _vm.isURL(value) ? _c('a', {
attrs: {
"href": value
}
}, [_c('img', {
attrs: {
"src": _vm.processImage(value)
}
})]) : _c('p', [_vm._v(_vm._s(value))])]);
}), 0), _c('div', {
staticClass: "cap-order-goods-card__button"
}, [_c('van-button', {
attrs: {
"size": "large"
},
on: {
"click": function click($event) {
_vm.$emit('back');
}
}
}, [_vm._v("\n 查看订单详情\n ")])], 1)]);
},
name: 'cap-order-goods-message-list',
components: (_components = {}, _components[_Button.name] = _Button, _components),
props: {
messages: [Object, Array]
},
methods: {
isURL: function isURL(value) {
return /^\s*http(s)*:\/\/.+/.test(value);
},
processImage: function processImage(url) {
return fullfillImage(url, '!180x180.jpg');
}
}
};