@dataloop-ai/components 0.18.65 → 0.18.67

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.18.65",
3
+ "version": "0.18.67",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -231,13 +231,14 @@ export default defineComponent({
231
231
  }
232
232
  },
233
233
  methods: {
234
- handleChange(value: string) {
234
+ handleChange(value: number) {
235
235
  this.$emit('change', value)
236
236
  },
237
237
  handleResetButtonClick() {
238
238
  if (this.value === this.initialValue) return
239
239
 
240
240
  this.sliderValue = this.initialValue
241
+ this.handleChange(this.initialValue)
241
242
  }
242
243
  }
243
244
  })
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <dl-slider
4
- v-model.number="value"
4
+ v-model="value"
5
5
  width="500px"
6
6
  text="slider"
7
7
  :step="1"
@@ -10,6 +10,7 @@
10
10
  :editable="editable"
11
11
  :readonly="readonly"
12
12
  :disabled="disabled"
13
+ @change="handleChange"
13
14
  />
14
15
  <div>
15
16
  <button @click="editable = !editable">
@@ -42,6 +43,16 @@ export default defineComponent({
42
43
  readonly: false
43
44
  }
44
45
  },
46
+ watch: {
47
+ value(newValue, oldValue) {
48
+ console.log(`@@@ value changed from ${oldValue} to ${newValue}`)
49
+ }
50
+ },
51
+ methods: {
52
+ handleChange(value: number) {
53
+ console.log(`@@@ value changed to ${value}`)
54
+ }
55
+ },
45
56
  template: 'dl-slider-demo'
46
57
  })
47
58
  </script>