@wikala/spmkt 2.25.2 → 2.25.3

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.
@@ -62,7 +62,7 @@ export default {
62
62
  container: this.$el
63
63
  })
64
64
 
65
- this.itemQty = parseInt(qty)
65
+ this.itemQty = Number(qty)
66
66
 
67
67
  let requestData = {
68
68
  id: productId,
@@ -90,7 +90,6 @@ export default {
90
90
  this.setCart(response.data)
91
91
  } catch (error) {
92
92
  cqLoading.close()
93
- //console.log(err)
94
93
 
95
94
  let serverErrors = []
96
95
  if (error.errors) {
@@ -5,7 +5,7 @@
5
5
  <option value="smp">{{ selectMax + 1 }}+</option>
6
6
  </select>
7
7
  <form @submit.prevent="qtyUpdate">
8
- <input v-if="!showSelect" class="input" type="number" @input="qtyInput" :value="qty" />
8
+ <input ref="textInput" v-if="!showSelect" class="input" type="number" @input="qtyInput" :value="qty" />
9
9
  <button v-if="showUpdateButton" class="button is-small" style="width: 100%">{{ $t('global.update') }}</button>
10
10
  </form>
11
11
  </div>
@@ -60,6 +60,9 @@ export default {
60
60
  watch: {
61
61
  value: function (nv, ov) {
62
62
  this.qty = nv
63
+ if (this.qty > this.selectMax) {
64
+ this.showSelect = false
65
+ }
63
66
  }
64
67
  },
65
68
 
@@ -82,7 +85,7 @@ export default {
82
85
  this.showSelect = false
83
86
  this.showUpdateButton = true
84
87
  setTimeout(() => {
85
- event.path[1].childNodes[2].childNodes[0].focus()
88
+ this.$refs.textInput.focus()
86
89
  }, 100)
87
90
  } else {
88
91
  this.$emit('input', event.target.value)
@@ -93,13 +96,6 @@ export default {
93
96
  this.showUpdateButton = false
94
97
  this.$emit('input', this.qty)
95
98
  }
96
- },
97
-
98
- mounted() {
99
- this.qty = this.value
100
- if (this.qty > this.selectMax) {
101
- this.showSelect = false
102
- }
103
- }
99
+ }
104
100
  }
105
101
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikala/spmkt",
3
- "version": "2.25.2",
3
+ "version": "2.25.3",
4
4
  "private": false,
5
5
  "description": "supermarket",
6
6
  "scripts": {