mali-applet-ui 0.1.3 → 0.1.5

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.
@@ -31,6 +31,10 @@ export default {
31
31
  align: String,
32
32
  titleAlign: String,
33
33
  border: Boolean,
34
+ ruleMsg: {
35
+ type: Boolean,
36
+ default: true
37
+ },
34
38
  readonly: Boolean,
35
39
  vertical: Boolean,
36
40
  labelWidth: String,
@@ -62,7 +66,19 @@ export default {
62
66
  item.errRule = null
63
67
  }
64
68
  }
65
- return errMaps ? Promise.resolve(errMaps) : Promise.resolve()
69
+ return new Promise(resolve => {
70
+ if (errMaps) {
71
+ if (this.ruleMsg) {
72
+ uni.showToast({
73
+ title: '请将必填字段填写完整',
74
+ icon: 'error'
75
+ })
76
+ }
77
+ resolve(errMaps)
78
+ } else {
79
+ resolve()
80
+ }
81
+ })
66
82
  },
67
83
  validateField (field) {
68
84
  let errMaps = null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",