@tak-ps/vue-tabler 3.78.1 → 3.79.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 +9 -0
- package/components/Alert.vue +20 -30
- package/components/BreadCrumb.vue +28 -26
- package/components/Button.vue +2 -2
- package/components/Bytes.vue +13 -15
- package/components/Delete.vue +30 -43
- package/components/Epoch.vue +52 -56
- package/components/EpochRange.vue +76 -80
- package/components/Err.vue +21 -33
- package/components/Help.vue +17 -24
- package/components/List.vue +62 -69
- package/components/Loading.vue +10 -13
- package/components/Markdown.vue +20 -23
- package/components/Modal.vue +17 -15
- package/components/None.vue +18 -23
- package/components/Pager.vue +93 -86
- package/components/Progress.vue +6 -9
- package/components/Schema.vue +52 -71
- package/components/Slidedown.vue +104 -0
- package/components/input/Colour.vue +79 -80
- package/components/input/Enum.vue +54 -60
- package/components/input/FileInput.vue +56 -53
- package/components/input/Input.vue +113 -112
- package/components/input/Range.vue +51 -57
- package/components/input/Select.vue +34 -34
- package/components/input/TimeZone.vue +43 -52
- package/components/input/Toggle.vue +45 -51
- package/lib.js +1 -0
- package/package.json +1 -1
|
@@ -96,130 +96,131 @@
|
|
|
96
96
|
</div>
|
|
97
97
|
</template>
|
|
98
98
|
|
|
99
|
-
<script>
|
|
100
|
-
import
|
|
99
|
+
<script setup>
|
|
100
|
+
import { ref, computed, watch, onMounted } from 'vue'
|
|
101
|
+
import TablerLabel from '../internal/Label.vue'
|
|
101
102
|
import {
|
|
102
103
|
IconUser,
|
|
103
104
|
IconLock,
|
|
104
105
|
IconSearch
|
|
105
|
-
} from '@tabler/icons-vue'
|
|
106
|
+
} from '@tabler/icons-vue'
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
IconLock,
|
|
112
|
-
IconSearch,
|
|
113
|
-
TablerLabel
|
|
108
|
+
const props = defineProps({
|
|
109
|
+
modelValue: {
|
|
110
|
+
type: [String, Number],
|
|
111
|
+
required: true
|
|
114
112
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
required: true
|
|
119
|
-
},
|
|
120
|
-
autocomplete: {
|
|
121
|
-
type: String,
|
|
122
|
-
default: 'on'
|
|
123
|
-
},
|
|
124
|
-
autofocus: {
|
|
125
|
-
type: Boolean,
|
|
126
|
-
default: false
|
|
127
|
-
},
|
|
128
|
-
icon: {
|
|
129
|
-
type: String,
|
|
130
|
-
},
|
|
131
|
-
loading: {
|
|
132
|
-
type: Boolean,
|
|
133
|
-
default: false
|
|
134
|
-
},
|
|
135
|
-
required: {
|
|
136
|
-
type: Boolean,
|
|
137
|
-
default: false,
|
|
138
|
-
},
|
|
139
|
-
disabled: {
|
|
140
|
-
type: Boolean,
|
|
141
|
-
default: false,
|
|
142
|
-
},
|
|
143
|
-
description: {
|
|
144
|
-
type: String,
|
|
145
|
-
default: '',
|
|
146
|
-
},
|
|
147
|
-
rows: {
|
|
148
|
-
type: Number,
|
|
149
|
-
default: 1
|
|
150
|
-
},
|
|
151
|
-
wrap: {
|
|
152
|
-
type: String,
|
|
153
|
-
default: 'soft'
|
|
154
|
-
},
|
|
155
|
-
type: {
|
|
156
|
-
type: String,
|
|
157
|
-
default: 'text'
|
|
158
|
-
},
|
|
159
|
-
label: String,
|
|
160
|
-
placeholder: String,
|
|
161
|
-
error: String,
|
|
113
|
+
autocomplete: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: 'on'
|
|
162
116
|
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
help: false,
|
|
167
|
-
internal_error: '',
|
|
168
|
-
current: this.modelValue === undefined ? '' : this.modelValue
|
|
169
|
-
}
|
|
117
|
+
autofocus: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: false
|
|
170
120
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
121
|
+
icon: {
|
|
122
|
+
type: String,
|
|
123
|
+
default: ''
|
|
124
|
+
},
|
|
125
|
+
loading: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
default: false
|
|
128
|
+
},
|
|
129
|
+
required: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: false,
|
|
132
|
+
},
|
|
133
|
+
disabled: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: false,
|
|
136
|
+
},
|
|
137
|
+
description: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: '',
|
|
140
|
+
},
|
|
141
|
+
rows: {
|
|
142
|
+
type: Number,
|
|
143
|
+
default: 1
|
|
144
|
+
},
|
|
145
|
+
wrap: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: 'soft'
|
|
148
|
+
},
|
|
149
|
+
type: {
|
|
150
|
+
type: String,
|
|
151
|
+
default: 'text'
|
|
152
|
+
},
|
|
153
|
+
label: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: ''
|
|
156
|
+
},
|
|
157
|
+
placeholder: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: ''
|
|
180
160
|
},
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
161
|
+
error: {
|
|
162
|
+
type: String,
|
|
163
|
+
default: ''
|
|
164
|
+
},
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
const emit = defineEmits(['blur', 'focus', 'submit', 'update:modelValue'])
|
|
168
|
+
|
|
169
|
+
const textInput = ref(null)
|
|
170
|
+
const internal_error = ref('')
|
|
171
|
+
const current = ref(props.modelValue === undefined ? '' : props.modelValue)
|
|
190
172
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
173
|
+
const errorstr = computed(() => {
|
|
174
|
+
if (props.error) return props.error
|
|
175
|
+
return internal_error.value
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
const computed_type = computed(() => {
|
|
179
|
+
if (props.type === 'integer') return 'number'
|
|
180
|
+
return props.type
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
watch(() => props.modelValue, (newValue) => {
|
|
184
|
+
if (current.value !== String(newValue)) {
|
|
185
|
+
current.value = String(newValue)
|
|
186
|
+
}
|
|
187
|
+
})
|
|
202
188
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
this.$emit('update:modelValue', this.current);
|
|
216
|
-
}
|
|
189
|
+
watch(current, (newValue) => {
|
|
190
|
+
if (typeof props.modelValue === 'number' || props.type === 'number') {
|
|
191
|
+
const currentNum = Number(newValue)
|
|
192
|
+
|
|
193
|
+
if (isNaN(currentNum)) {
|
|
194
|
+
internal_error.value = 'Must be a number!'
|
|
195
|
+
} else if (currentNum === props.modelValue) {
|
|
196
|
+
internal_error.value = ''
|
|
197
|
+
return
|
|
198
|
+
} else {
|
|
199
|
+
internal_error.value = ''
|
|
200
|
+
emit('update:modelValue', currentNum)
|
|
217
201
|
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
202
|
+
} else if (props.type === 'integer') {
|
|
203
|
+
const currentInt = parseInt(newValue)
|
|
204
|
+
|
|
205
|
+
if (isNaN(currentInt)) {
|
|
206
|
+
internal_error.value = 'Must be an integer!'
|
|
207
|
+
} else if (currentInt === props.modelValue) {
|
|
208
|
+
internal_error.value = ''
|
|
209
|
+
return
|
|
210
|
+
} else {
|
|
211
|
+
internal_error.value = ''
|
|
212
|
+
emit('update:modelValue', currentInt)
|
|
222
213
|
}
|
|
214
|
+
} else {
|
|
215
|
+
internal_error.value = ''
|
|
216
|
+
if (newValue === props.modelValue) return
|
|
217
|
+
emit('update:modelValue', newValue)
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
|
|
221
|
+
onMounted(() => {
|
|
222
|
+
if (props.autofocus) {
|
|
223
|
+
textInput.value.focus()
|
|
223
224
|
}
|
|
224
|
-
}
|
|
225
|
+
})
|
|
225
226
|
</script>
|
|
@@ -25,65 +25,59 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
|
-
<script>
|
|
29
|
-
import
|
|
28
|
+
<script setup>
|
|
29
|
+
import { ref, watch } from 'vue'
|
|
30
|
+
import TablerLabel from '../internal/Label.vue'
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
modelValue: {
|
|
34
|
+
type: Number,
|
|
35
|
+
required: true
|
|
35
36
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
required: true
|
|
40
|
-
},
|
|
41
|
-
autofocus: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: false
|
|
44
|
-
},
|
|
45
|
-
min: {
|
|
46
|
-
type: Number,
|
|
47
|
-
default: 0
|
|
48
|
-
},
|
|
49
|
-
max: {
|
|
50
|
-
type: Number,
|
|
51
|
-
default: 10
|
|
52
|
-
},
|
|
53
|
-
step: {
|
|
54
|
-
type: Number,
|
|
55
|
-
default: 1
|
|
56
|
-
},
|
|
57
|
-
required: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: false,
|
|
60
|
-
},
|
|
61
|
-
disabled: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: false,
|
|
64
|
-
},
|
|
65
|
-
description: {
|
|
66
|
-
type: String,
|
|
67
|
-
default: '',
|
|
68
|
-
},
|
|
69
|
-
label: String,
|
|
37
|
+
autofocus: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
70
40
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
'update:modelValue'
|
|
75
|
-
],
|
|
76
|
-
data: function() {
|
|
77
|
-
return {
|
|
78
|
-
help: false,
|
|
79
|
-
current: this.modelValue
|
|
80
|
-
}
|
|
41
|
+
min: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 0
|
|
81
44
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
45
|
+
max: {
|
|
46
|
+
type: Number,
|
|
47
|
+
default: 10
|
|
48
|
+
},
|
|
49
|
+
step: {
|
|
50
|
+
type: Number,
|
|
51
|
+
default: 1
|
|
52
|
+
},
|
|
53
|
+
required: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
disabled: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false,
|
|
60
|
+
},
|
|
61
|
+
description: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: '',
|
|
64
|
+
},
|
|
65
|
+
label: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: ''
|
|
68
|
+
},
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
const emit = defineEmits([
|
|
72
|
+
'blur',
|
|
73
|
+
'submit',
|
|
74
|
+
'update:modelValue'
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
const current = ref(props.modelValue)
|
|
78
|
+
|
|
79
|
+
watch(current, (newValue) => {
|
|
80
|
+
if (newValue === props.modelValue) return
|
|
81
|
+
emit('update:modelValue', Number(newValue))
|
|
82
|
+
})
|
|
89
83
|
</script>
|
|
@@ -23,41 +23,41 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
|
-
<script>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
default: {
|
|
35
|
-
type: String,
|
|
36
|
-
required: false
|
|
37
|
-
},
|
|
38
|
-
options: {
|
|
39
|
-
type: Array,
|
|
40
|
-
required: true
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
emits: [
|
|
44
|
-
'update:modelValue'
|
|
45
|
-
],
|
|
46
|
-
data: function() {
|
|
47
|
-
return {
|
|
48
|
-
current: ''
|
|
49
|
-
}
|
|
26
|
+
<script setup>
|
|
27
|
+
import { ref, watch, onMounted } from 'vue'
|
|
28
|
+
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
modelValue: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
50
33
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.$emit('update:modelValue', this.current);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
34
|
+
default: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ''
|
|
57
37
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
38
|
+
options: {
|
|
39
|
+
type: Array,
|
|
40
|
+
required: true
|
|
61
41
|
},
|
|
62
|
-
}
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const emit = defineEmits([
|
|
45
|
+
'update:modelValue'
|
|
46
|
+
])
|
|
47
|
+
|
|
48
|
+
const current = ref('')
|
|
49
|
+
|
|
50
|
+
watch(current, (newValue) => {
|
|
51
|
+
if (props.modelValue !== newValue) {
|
|
52
|
+
emit('update:modelValue', newValue)
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
if (!props.modelValue && props.default) {
|
|
58
|
+
current.value = props.default
|
|
59
|
+
} else {
|
|
60
|
+
current.value = props.modelValue
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
63
|
</script>
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
:disabled='disabled'
|
|
8
8
|
:required='required'
|
|
9
9
|
:default='inverse.has(modelValue) ? inverse.get(modelValue) : "No TimeZone"'
|
|
10
|
-
@
|
|
11
|
-
@submit='
|
|
12
|
-
@blur='
|
|
10
|
+
@update:model-value='emit("update:modelValue", map.get($event).tzCode)'
|
|
11
|
+
@submit='emit("submit")'
|
|
12
|
+
@blur='emit("blur")'
|
|
13
13
|
/>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
|
-
<script>
|
|
16
|
+
<script setup>
|
|
17
17
|
import TablerEnum from './Enum.vue'
|
|
18
18
|
|
|
19
19
|
const tzs = [
|
|
@@ -443,57 +443,48 @@ const tzs = [
|
|
|
443
443
|
{ label:"Pacific/Kiritimati (GMT+14:00)", "tzCode":"Pacific/Kiritimati", }
|
|
444
444
|
]
|
|
445
445
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
446
|
+
defineProps({
|
|
447
|
+
modelValue: {
|
|
448
|
+
type: String,
|
|
449
|
+
required: true
|
|
450
450
|
},
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
required: true
|
|
455
|
-
},
|
|
456
|
-
autofocus: {
|
|
457
|
-
type: Boolean,
|
|
458
|
-
default: false
|
|
459
|
-
},
|
|
460
|
-
description: {
|
|
461
|
-
type: String,
|
|
462
|
-
default: ''
|
|
463
|
-
},
|
|
464
|
-
required: {
|
|
465
|
-
type: Boolean
|
|
466
|
-
},
|
|
467
|
-
disabled: {
|
|
468
|
-
type: Boolean,
|
|
469
|
-
default: false
|
|
470
|
-
},
|
|
471
|
-
label: {
|
|
472
|
-
type: String,
|
|
473
|
-
default: 'Default Timezone'
|
|
474
|
-
},
|
|
451
|
+
autofocus: {
|
|
452
|
+
type: Boolean,
|
|
453
|
+
default: false
|
|
475
454
|
},
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
'
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
455
|
+
description: {
|
|
456
|
+
type: String,
|
|
457
|
+
default: ''
|
|
458
|
+
},
|
|
459
|
+
required: {
|
|
460
|
+
type: Boolean,
|
|
461
|
+
default: false
|
|
462
|
+
},
|
|
463
|
+
disabled: {
|
|
464
|
+
type: Boolean,
|
|
465
|
+
default: false
|
|
466
|
+
},
|
|
467
|
+
label: {
|
|
468
|
+
type: String,
|
|
469
|
+
default: 'Default Timezone'
|
|
470
|
+
},
|
|
471
|
+
})
|
|
472
|
+
|
|
473
|
+
const emit = defineEmits([
|
|
474
|
+
'submit',
|
|
475
|
+
'blur',
|
|
476
|
+
'update:modelValue'
|
|
477
|
+
])
|
|
484
478
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
inverse.set(tz.tzCode, tz.label);
|
|
489
|
-
}
|
|
479
|
+
// Create maps for timezone conversion
|
|
480
|
+
const map = new Map()
|
|
481
|
+
const inverse = new Map()
|
|
490
482
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
timezones: ['No TimeZone'].concat(tzs.map((tz) => tz.label))
|
|
496
|
-
}
|
|
497
|
-
}
|
|
483
|
+
map.set('No TimeZone', { tzCode: '' })
|
|
484
|
+
for (const tz of tzs) {
|
|
485
|
+
map.set(tz.label, tz)
|
|
486
|
+
inverse.set(tz.tzCode, tz.label)
|
|
498
487
|
}
|
|
488
|
+
|
|
489
|
+
const timezones = ['No TimeZone'].concat(tzs.map((tz) => tz.label))
|
|
499
490
|
</script>
|
|
@@ -20,61 +20,55 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
|
-
<script>
|
|
24
|
-
import
|
|
23
|
+
<script setup>
|
|
24
|
+
import { ref, watch, onMounted } from 'vue'
|
|
25
|
+
import TablerLabel from '../internal/Label.vue'
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const props = defineProps({
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
required: true
|
|
30
31
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
required: true
|
|
35
|
-
},
|
|
36
|
-
autofocus: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: false
|
|
39
|
-
},
|
|
40
|
-
disabled: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: false
|
|
43
|
-
},
|
|
44
|
-
required: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: false
|
|
47
|
-
},
|
|
48
|
-
description: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: ''
|
|
51
|
-
},
|
|
52
|
-
label: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: ''
|
|
55
|
-
}
|
|
32
|
+
autofocus: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
56
35
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
'update:modelValue'
|
|
61
|
-
],
|
|
62
|
-
data: function() {
|
|
63
|
-
return {
|
|
64
|
-
current: this.modelValue
|
|
65
|
-
}
|
|
36
|
+
disabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
66
39
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
current: function() {
|
|
72
|
-
if (this.current === this.modelValue) return;
|
|
73
|
-
this.$emit('update:modelValue', this.current);
|
|
74
|
-
}
|
|
40
|
+
required: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
75
43
|
},
|
|
76
|
-
|
|
77
|
-
|
|
44
|
+
description: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: ''
|
|
47
|
+
},
|
|
48
|
+
label: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ''
|
|
78
51
|
}
|
|
79
|
-
}
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const emit = defineEmits([
|
|
55
|
+
'blur',
|
|
56
|
+
'submit',
|
|
57
|
+
'update:modelValue'
|
|
58
|
+
])
|
|
59
|
+
|
|
60
|
+
const current = ref(props.modelValue)
|
|
61
|
+
|
|
62
|
+
watch(() => props.modelValue, (newValue) => {
|
|
63
|
+
current.value = newValue
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
watch(current, (newValue) => {
|
|
67
|
+
if (newValue === props.modelValue) return
|
|
68
|
+
emit('update:modelValue', newValue)
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
onMounted(() => {
|
|
72
|
+
current.value = props.modelValue
|
|
73
|
+
})
|
|
80
74
|
</script>
|
package/lib.js
CHANGED
|
@@ -14,6 +14,7 @@ export { default as TablerButton } from './components/Button.vue'
|
|
|
14
14
|
export { default as TablerRefreshButton } from './components/RefreshButton.vue'
|
|
15
15
|
export { default as TablerIconButton } from './components/IconButton.vue'
|
|
16
16
|
export { default as TablerDropdown } from './components/Dropdown.vue'
|
|
17
|
+
export { default as TablerSlidedown } from './components/Slidedown.vue'
|
|
17
18
|
export { default as TablerPager } from './components/Pager.vue'
|
|
18
19
|
export { default as TablerNone } from './components/None.vue'
|
|
19
20
|
export { default as TablerError } from './components/Err.vue'
|