yqform-edit 1.0.21 → 1.0.23

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": "yqform-edit",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "private": false,
5
5
  "main": "dist/yqform-edit.umd.min.js",
6
6
  "scripts": {
@@ -232,7 +232,6 @@
232
232
  v-model="question.amount"
233
233
  @focus="inputFocus"
234
234
  type="float"
235
- ref="payInput"
236
235
  @blur="blurPayItem"
237
236
  :center="true" />
238
237
  </van-cell-group>
@@ -482,11 +481,16 @@ export default {
482
481
  watch: {
483
482
  item: {
484
483
  handler(newItem, oldItem) {
485
- console.log('newItem, oldItem', newItem, oldItem)
484
+ // console.log('newItem, oldItem', newItem, oldItem)
486
485
  if (!newItem) {
487
486
  this.noSelectItem = true
488
487
  } else {
489
488
  this.noSelectItem = false
489
+ if (newItem.type === 'pay' && newItem.amount <= 0) {
490
+ this.payError = '支付金额必须大于0'
491
+ } else {
492
+ this.payError = ''
493
+ }
490
494
  }
491
495
  this.defaultCheck = []
492
496
  if (this.question.type === 'period' || this.question.type === 'instant') {
@@ -509,9 +513,6 @@ export default {
509
513
  this.hintRangeShow = false
510
514
  this.hintTextShow = false
511
515
  }
512
- if (this.question.type === 'pay') {
513
- setTimeout(() => this.$refs.payInput.focus())
514
- }
515
516
  this.dependsData = []
516
517
  this.showAddDepend = false
517
518
  this.showAddOption = false
@@ -875,12 +876,7 @@ export default {
875
876
  e.target.select()
876
877
  },
877
878
  blurPayItem() {
878
- if (this.question.amount <= 0) {
879
- this.payError = '支付金额必须大于0'
880
- } else {
881
- this.payError = ''
882
- this.question.amount = (this.question.amount * 1).toFixed(2)
883
- }
879
+ this.question.amount = (this.question.amount * 1).toFixed(2)
884
880
  }
885
881
  },
886
882
  }
@@ -326,7 +326,7 @@ export default {
326
326
  subtitle: '',
327
327
  placeholder: '',
328
328
  required: true,
329
- emsg: '尚未支付', // 必填项未填写时的提示信息
329
+ emsg: '当前项不能为空', // 必填项未填写时的提示信息
330
330
  weight: false, // 主要信息将予以展示,非主要信息将只会展示在详情中。若不设置,则列表会展示所有项目,不利于查看。
331
331
  depends: [],
332
332
  limit: '',