@tak-ps/vue-tabler 2.12.0 → 3.0.0

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/CHANGELOG.md CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v3.0.0
14
+
15
+ - :rocket: Standardize Enum Component
16
+
13
17
  ### v2.12.0
14
18
 
15
19
  - :tada: Add `TablerDelete` component
@@ -3,14 +3,14 @@
3
3
  <a class="dropdown-toggle text-muted" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-text='current'></a>
4
4
  <div class="dropdown-menu dropdown-menu-end">
5
5
  <a
6
- :key='value'
7
- v-for='value in values'
8
- @click='current = value'
6
+ :key='option'
7
+ v-for='option in options'
8
+ @click='current = option'
9
9
  class="dropdown-item"
10
10
  :class='{
11
- active: value === current
11
+ active: option === current
12
12
  }'
13
- v-text='value'
13
+ v-text='option'
14
14
  ></a>
15
15
  </div>
16
16
  </div>
@@ -20,8 +20,18 @@
20
20
  export default {
21
21
  name: 'TablerSelect',
22
22
  props: {
23
- default: String,
24
- values: Array
23
+ modelValue: {
24
+ type: String,
25
+ required: true,
26
+ },
27
+ default: {
28
+ type: String,
29
+ required: false
30
+ },
31
+ options: {
32
+ type: Array,
33
+ required: true
34
+ },
25
35
  },
26
36
  data: function() {
27
37
  return {
@@ -30,17 +40,17 @@ export default {
30
40
  },
31
41
  watch: {
32
42
  current: function() {
33
- this.$emit('select', this.current);
43
+ if (this.modelValue !== this.current) {
44
+ this.$emit('update:modelValue', this.current);
45
+ }
34
46
  }
35
47
  },
36
48
  mounted: function() {
37
49
  if (!this.default) {
38
- this.current = this.values[0];
50
+ this.current = this.options[0];
39
51
  } else {
40
52
  this.current = this.default;
41
53
  }
42
54
  },
43
- methods: {
44
- },
45
55
  }
46
56
  </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/vue-tabler",
3
3
  "type": "module",
4
- "version": "2.12.0",
4
+ "version": "3.0.0",
5
5
  "lib": "lib.js",
6
6
  "module": "lib.js",
7
7
  "description": "Tabler UI components for Vue3",