DemoSliderAppendTextField.vue
1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<script lang="ts" setup>
const redColorValue = ref(161)
const greenColorValue = ref(105)
const blueColorValue = ref(225)
</script>
<template>
<VResponsive
:style="{ background: `rgb(${redColorValue}, ${greenColorValue}, ${blueColorValue})` }"
height="150px"
/>
<VRow class="mt-5">
<VCol cols="12">
<!-- R -->
<div class="d-flex align-center justify-space-between">
<span class="me-1">R</span>
<VSlider
v-model="redColorValue"
:max="255"
:step="1"
/>
<VTextField
v-model="redColorValue"
type="number"
placeholder="10"
:max="255"
style="max-inline-size: 5rem;"
/>
</div>
</VCol>
<VCol cols="12">
<!-- G -->
<div class="d-flex align-center justify-space-between">
<span class="me-1">G</span>
<VSlider
v-model="greenColorValue"
:max="255"
:step="1"
/>
<VTextField
v-model="greenColorValue"
type="number"
placeholder="20"
:max="255"
style="max-inline-size: 5rem;"
/>
</div>
</VCol>
<VCol cols="12">
<!-- B -->
<div class="d-flex align-center justify-space-between">
<span class="me-1">B</span>
<VSlider
v-model="blueColorValue"
:max="255"
:step="1"
/>
<VTextField
v-model="blueColorValue"
type="number"
placeholder="30"
:max="255"
style="max-inline-size: 5rem;"
/>
</div>
</VCol>
</VRow>
</template>