| | |
| | | /** |
| | | * CFormAgreement |
| | | * CFormAgreement - 表单套装组件,同意协议勾选项 |
| | | * @author Tevin |
| | | */ |
| | | |
| | |
| | | class="title" |
| | | @tap="evt=>handleCheck()" |
| | | > |
| | | |
| | | <view :class="['icon', checked?'checked':'']"> |
| | | <text class="at-icon at-icon-check"></text> |
| | | </view> |
| | |
| | | AtFloatLayout, |
| | | }, |
| | | props: { |
| | | formData: Object, |
| | | // 表单数据资源(表单组件内部机制专用) |
| | | formRes: Object, |
| | | // 需要同意的协议内容 |
| | | protocol: String, |
| | | }, |
| | | data() { |
| | | return { |
| | | name: 'agreement', |
| | | name: '$agreement', |
| | | protocolShow: false, |
| | | checked: false, |
| | | }; |
| | |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.formData.$regItemValidator(this.name, () => { |
| | | this.formRes.$regItemValidator(this.name, () => { |
| | | if (this.checked) { |
| | | return Promise.resolve({ |
| | | name: this.name, |