mali-applet-ui 0.1.10 → 0.1.12

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.
@@ -57,7 +57,16 @@ export default {
57
57
  },
58
58
  methods: {
59
59
  checkValue () {
60
- const numVal = XEUtils.toNumber(this.inpVal)
60
+ const numVal = XEUtils.toNumber(XEUtils.toValueString(this.inpVal).slice(0, this.maxLength))
61
+ if (this.type === 'integer' && !/^[0-9]$/.test(numVal)) {
62
+ const value = XEUtils.toInteger(numVal)
63
+ this.$emit('input', value)
64
+ return { status: false, value: value }
65
+ }
66
+ if (`${numVal}` !== this.inpVal) {
67
+ this.$emit('input', numVal)
68
+ return { status: false, value: numVal }
69
+ }
61
70
  if (`${numVal}` !== `${this.value}`) {
62
71
  this.$emit('input', numVal)
63
72
  return { status: false, value: numVal }
@@ -16,8 +16,8 @@
16
16
  </view>
17
17
  </view>
18
18
 
19
- <ml-popup v-model="showPopup" title="请选择省/市" showConfirmButton showCancelButton @confirm="confirmEvent">
20
- <picker-view v-if="showPopup" :value="selectVals" @change="changeEvent" class="ml-province-city-picker-view">
19
+ <ml-popup v-model="showPopup" title="请选择省/市" height="500rpx" showConfirmButton showCancelButton @confirm="confirmEvent">
20
+ <picker-view v-if="showPicker" :value="selectVals" @change="changeEvent" style="height: 400rpx;text-align: center;">
21
21
  <picker-view-column>
22
22
  <view class="item" v-for="(item, index) in provinceList" :key="index">{{ item[optLabelField] }}</view>
23
23
  </picker-view-column>
@@ -54,6 +54,7 @@ export default {
54
54
  data () {
55
55
  return {
56
56
  showPopup: false,
57
+ showPicker: false,
57
58
  selectVals: [0]
58
59
  }
59
60
  },
@@ -104,9 +105,13 @@ export default {
104
105
  methods: {
105
106
  closePopup () {
106
107
  this.showPopup = false
108
+ this.showPicker = false
107
109
  },
108
110
  openPopup () {
109
111
  this.showPopup = true
112
+ setTimeout(() => {
113
+ this.showPicker = true
114
+ }, 50)
110
115
  },
111
116
  changeEvent (e) {
112
117
  this.selectVals = e.detail.value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",