@tak-ps/vue-tabler 2.7.0 → 2.9.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 +8 -0
- package/components/Enum.vue +49 -0
- package/components/Input.vue +1 -1
- package/lib.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<label v-if='label' class="form-label" v-text='label'></label>
|
|
4
|
+
|
|
5
|
+
<select v-model='current' :disabled='disabled' class='form-select'>
|
|
6
|
+
<option v-for='option in options' :value="option" v-text='option'></option>
|
|
7
|
+
</select>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: 'TablerInput',
|
|
14
|
+
props: {
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
default: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: false
|
|
22
|
+
},
|
|
23
|
+
options: {
|
|
24
|
+
type: Array,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
disabled: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false,
|
|
30
|
+
},
|
|
31
|
+
label: String,
|
|
32
|
+
},
|
|
33
|
+
data: function() {
|
|
34
|
+
return {
|
|
35
|
+
current: ''
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
mounted: function() {
|
|
39
|
+
if (!this.modelValue && this.default) this.current = this.default
|
|
40
|
+
else this.current = this.modelValue;
|
|
41
|
+
},
|
|
42
|
+
watch: {
|
|
43
|
+
current: function() {
|
|
44
|
+
if (this.current === this.modelValue) return;
|
|
45
|
+
this.$emit('update:modelValue', this.current);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</script>
|
package/components/Input.vue
CHANGED
package/lib.js
CHANGED
|
@@ -8,10 +8,12 @@ import TablerToggle from './components/Toggle.vue'
|
|
|
8
8
|
import TablerInput from './components/Input.vue'
|
|
9
9
|
import TablerBreadCrumb from './components/BreadCrumb.vue';
|
|
10
10
|
import TablerBytes from './components/Bytes.vue';
|
|
11
|
+
import TablerEnum from './components/Enum.vue';
|
|
11
12
|
import TablerEpoch from './components/Epoch.vue';
|
|
12
13
|
import TablerEpochRange from './components/EpochRange.vue';
|
|
13
14
|
|
|
14
15
|
export {
|
|
16
|
+
TablerEnum,
|
|
15
17
|
TablerBytes,
|
|
16
18
|
TablerEpoch,
|
|
17
19
|
TablerEpochRange,
|