jufubao-forms 1.0.4 → 1.0.5-beta2

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-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝表单业务插件库",
6
6
  "main": "index.js",
@@ -47,9 +47,10 @@
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
- <xd-font-icon class="icon_font" icon="iconzan_mian"></xd-font-icon> 恭喜您,回答正确!</view>
52
+ <!-- <xd-font-icon class="icon_font" icon="iconzan_mian"></xd-font-icon> 恭喜您,回答正确! -->
53
+ </view>
53
54
  <template v-else>
54
55
  <view class="result_status error">
55
56
  <xd-font-icon class="icon_font" icon="iconmingchengtubiao"></xd-font-icon> 回答有误,再接再厉哦!</view>
@@ -60,11 +61,11 @@
60
61
  <view class="ans_explain">{{ qaResult.explain }}</view>
61
62
  </view>
62
63
  </template>
63
- </view> -->
64
+ </view>
64
65
  <view class="bottom_fixed" :style="fixedBottom">
65
66
  <xd-button type="primary" :disabled="curIndex === 0"
66
67
  :style="[fixedButtonStyle]" @click="handlePrev">上一题</xd-button>
67
- <xd-button v-if="curQA.required && (!qaValue || qaValue.length === 0)" type="primary" :disabled="true"
68
+ <xd-button v-if="noClickNext" type="primary" :disabled="true"
68
69
  :style="[fixedButtonStyle]" @click="handleNext">{{isLastQA ? '确认提交':'下一题'}}</xd-button>
69
70
  <xd-button type="primary" :disabled="false" v-else
70
71
  :style="[fixedButtonStyle]" @click="handleNext">{{isLastQA ? '确认提交':'下一题'}}</xd-button>
@@ -209,6 +210,15 @@
209
210
  fontSize: '28rpx',
210
211
  }
211
212
  },
213
+ noClickNext(){
214
+ if(this.curQA && this.curQA.required){
215
+ return !this.qaValue || this.qaValue.length === 0;
216
+ }
217
+ if(this.curQA && this.qaResult){
218
+ return !this.qaResult.right;
219
+ }
220
+ return false;
221
+ }
212
222
  },
213
223
  watch: {
214
224
  container(value, oldValue) {