@zscreate/zhxy-app-component 1.0.191 → 1.0.193

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.
@@ -318,6 +318,7 @@
318
318
  <u-number-box v-model="dataModel" @numberBoxClick="numberBoxClick"
319
319
  style="width: 100%"
320
320
  :positive-integer="false"
321
+ @plus="numberBoxPlus" @minus="numberBoxMinus"
321
322
  :step="widget.options.step ? widget.options.step:1"
322
323
  :min="widget.options.min ? widget.options.min : 0"
323
324
  :max="widget.options.max ? widget.options.max : 100000000" :disabled="widget.options.disabled">
@@ -779,6 +780,14 @@ export default {
779
780
  uni.$off(this.widget.model);
780
781
  },
781
782
  methods: {
783
+ numberBoxPlus(e) {
784
+ console.log(e, this.dataModel);
785
+ this.dataModel = this.widget.options.step ? e.value + this.widget.options.step : e.value + 1
786
+ },
787
+ numberBoxMinus(e) {
788
+ console.log(e, this.dataModel);
789
+ this.dataModel = this.widget.options.step ? e.value - this.widget.options.step : e.value - 1
790
+ },
782
791
  // 数据列表选人回调
783
792
  handleDataTableOk(key, val) {
784
793
  console.log(key, val);
@@ -1251,7 +1260,7 @@ export default {
1251
1260
  if (this.models[this.widget.model]) {
1252
1261
  this.dataModel = this.models[this.widget.model]
1253
1262
  } else {
1254
- this.dataModel = this.widget.options.min
1263
+ this.dataModel = this.dataModel < this.widget.options.min ? this.widget.options.min : this.dataModel
1255
1264
  }
1256
1265
  if (!this.dataModel) this.dataModel = 0
1257
1266
  } else if (!value && this.widget.type === 'codeControl') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.191",
3
+ "version": "1.0.193",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",