captain-ui
Version:
有赞vue wap业务组件库
153 lines (147 loc) • 3.45 kB
JavaScript
import "vant/es/field/style";
import _Field from "vant/es/field";
import "vant/es/cell-group/style";
import _CellGroup from "vant/es/cell-group";
export default {
render: function render() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
staticClass: "verify-infos__wrapper"
}, [_vm._m(0), _c('div', {
staticClass: "verify-infos__content"
}, [_c('van-cell-group', {
attrs: {
"border": false
}
}, [_c('van-field', {
attrs: {
"label": "姓名",
"maxlength": "50"
},
on: {
"input": function input($event) {
_vm.$emit('input', {
name: 'idCardName',
value: $event
});
}
},
model: {
value: _vm.idCardName,
callback: function callback($$v) {
_vm.idCardName = $$v;
},
expression: "idCardName"
}
}), _c('van-field', {
attrs: {
"label": "身份证号",
"readonly": ""
},
model: {
value: _vm.idCardNo,
callback: function callback($$v) {
_vm.idCardNo = $$v;
},
expression: "idCardNo"
}
}), _c('van-field', {
attrs: {
"label": "签发机关",
"maxlength": "50"
},
on: {
"input": function input($event) {
_vm.$emit('input', {
name: 'issuingAuthority',
value: $event
});
}
},
model: {
value: _vm.issuingAuthority,
callback: function callback($$v) {
_vm.issuingAuthority = $$v;
},
expression: "issuingAuthority"
}
}), _c('van-field', {
attrs: {
"readonly": "",
"label": "有效期"
},
model: {
value: _vm.duration,
callback: function callback($$v) {
_vm.duration = $$v;
},
expression: "duration"
}
})], 1)], 1)]);
},
staticRenderFns: [function () {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('header', {
staticClass: "verify-infos__header"
}, [_vm._v("\n 核对信息\n "), _c('span', [_vm._v("(请核对你的个人信息,若有错误请修改)")])]);
}],
name: 'verify-infos',
components: {
'van-cell-group': _CellGroup,
'van-field': _Field
},
props: {
idCardName: {
type: String,
default: ''
},
idCardNo: {
type: String,
default: ''
},
issuingAuthority: {
type: String,
default: ''
},
validStart: {
type: String,
default: ''
},
validEnd: {
type: String,
default: ''
}
},
data: function data() {
var idCardName = this.idCardName,
issuingAuthority = this.issuingAuthority;
return {
cardName: idCardName,
authority: issuingAuthority
};
},
computed: {
duration: function duration() {
var validStart = this.validStart,
validEnd = this.validEnd;
if (!validStart || !validEnd) return '';
return validStart + " \u81F3 " + validEnd;
}
},
watch: {
cardName: function cardName(val) {
if (val !== this.cardName) {
this.cardName = val;
}
},
authority: function authority(val) {
if (val !== this.authority) {
this.authority = val;
}
}
}
};