jufubao-forms 1.0.4 → 1.0.5-beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-forms",
3
- "version": "1.0.4",
3
+ "version": "1.0.5-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝表单业务插件库",
6
6
  "main": "index.js",
@@ -47,7 +47,7 @@
47
47
  </view>
48
48
  </view>
49
49
  </view>
50
- <!-- <view v-if="qaResult" class="qa_result">
50
+ <view v-if="qaResult" class="qa_result">
51
51
  <view class="result_status" v-if="qaResult.right">
52
52
  <xd-font-icon class="icon_font" icon="iconzan_mian"></xd-font-icon> 恭喜您,回答正确!</view>
53
53
  <template v-else>
@@ -60,11 +60,11 @@
60
60
  <view class="ans_explain">{{ qaResult.explain }}</view>
61
61
  </view>
62
62
  </template>
63
- </view> -->
63
+ </view>
64
64
  <view class="bottom_fixed" :style="fixedBottom">
65
65
  <xd-button type="primary" :disabled="curIndex === 0"
66
66
  :style="[fixedButtonStyle]" @click="handlePrev">上一题</xd-button>
67
- <xd-button v-if="curQA.required && (!qaValue || qaValue.length === 0)" type="primary" :disabled="true"
67
+ <xd-button v-if="noClickNext" type="primary" :disabled="true"
68
68
  :style="[fixedButtonStyle]" @click="handleNext">{{isLastQA ? '确认提交':'下一题'}}</xd-button>
69
69
  <xd-button type="primary" :disabled="false" v-else
70
70
  :style="[fixedButtonStyle]" @click="handleNext">{{isLastQA ? '确认提交':'下一题'}}</xd-button>
@@ -209,6 +209,15 @@
209
209
  fontSize: '28rpx',
210
210
  }
211
211
  },
212
+ noClickNext(){
213
+ if(this.curQA && this.curQA.required){
214
+ return !this.qaValue || this.qaValue.length === 0;
215
+ }
216
+ if(this.curQA && this.qaResult){
217
+ return !this.qaResult.right;
218
+ }
219
+ return false;
220
+ }
212
221
  },
213
222
  watch: {
214
223
  container(value, oldValue) {