@kaiyinchem/ky-uniui 1.0.33 → 1.0.35
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.
|
@@ -101,17 +101,19 @@
|
|
|
101
101
|
|
|
102
102
|
// 如果输入的不是倍数,自动调整成最小的数值
|
|
103
103
|
if (this.multiple) {
|
|
104
|
-
if (count % min !== 0) {
|
|
104
|
+
if ((Number((count % min).toFixed(3)) % min) !== 0) {
|
|
105
105
|
this.count = min
|
|
106
106
|
this.$toast('请输入规格的倍数')
|
|
107
107
|
}
|
|
108
108
|
this.emit()
|
|
109
109
|
} else {
|
|
110
|
-
if (count < min) {
|
|
110
|
+
if (count < min) {
|
|
111
|
+
this.count = min
|
|
111
112
|
this.$toast('超出最小数值')
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
if (count > max) {
|
|
115
|
+
if (count > max) {
|
|
116
|
+
this.count = max
|
|
115
117
|
this.$toast('超出最大数值')
|
|
116
118
|
}
|
|
117
119
|
this.emit()
|
|
@@ -126,7 +128,7 @@
|
|
|
126
128
|
return
|
|
127
129
|
}
|
|
128
130
|
|
|
129
|
-
if (this.multiple && this.count % min !== 0) {
|
|
131
|
+
if (this.multiple && (Number((this.count % min).toFixed(3)) % min) !== 0) {
|
|
130
132
|
this.count = min
|
|
131
133
|
this.$toast('只能是规格的倍数')
|
|
132
134
|
this.emit()
|