@tak-ps/vue-tabler 3.48.0 → 3.49.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 +4 -0
- package/components/input/Input.vue +26 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,17 +3,25 @@
|
|
|
3
3
|
<TablerLabel :label='label' :description='description' :required='required'><slot/></TablerLabel>
|
|
4
4
|
<div class='col-12'>
|
|
5
5
|
<template v-if='!rows || rows <= 1'>
|
|
6
|
-
<input
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
<div class='input-icon'>
|
|
7
|
+
<span v-if='icon' class="input-icon-addon">
|
|
8
|
+
<IconSearch v-if='icon === "search"' :size='20' :stroke='1'/>
|
|
9
|
+
</span>
|
|
10
|
+
<input
|
|
11
|
+
:disabled='disabled'
|
|
12
|
+
v-model='current'
|
|
13
|
+
@keyup.enter='$emit("submit")'
|
|
14
|
+
:type='computed_type'
|
|
15
|
+
:class='{
|
|
16
|
+
"is-invalid": errorstr
|
|
17
|
+
}'
|
|
18
|
+
class="form-control"
|
|
19
|
+
:placeholder='placeholder||label||""'
|
|
20
|
+
/>
|
|
21
|
+
<span v-if='$slots.posticon' class="input-icon-addon">
|
|
22
|
+
<slot name='prepost'/>
|
|
23
|
+
</span>
|
|
24
|
+
</div>
|
|
17
25
|
</template>
|
|
18
26
|
<template v-else>
|
|
19
27
|
<textarea
|
|
@@ -37,6 +45,9 @@
|
|
|
37
45
|
|
|
38
46
|
<script>
|
|
39
47
|
import TablerLabel from '../internal/Label.vue';
|
|
48
|
+
import {
|
|
49
|
+
IconSearch
|
|
50
|
+
} from '@tabler/icons-vue';
|
|
40
51
|
|
|
41
52
|
export default {
|
|
42
53
|
name: 'TablerInput',
|
|
@@ -46,6 +57,9 @@ export default {
|
|
|
46
57
|
type: [String, Number],
|
|
47
58
|
required: true
|
|
48
59
|
},
|
|
60
|
+
icon: {
|
|
61
|
+
type: String,
|
|
62
|
+
},
|
|
49
63
|
required: {
|
|
50
64
|
type: Boolean,
|
|
51
65
|
default: false,
|
|
@@ -130,6 +144,7 @@ export default {
|
|
|
130
144
|
}
|
|
131
145
|
},
|
|
132
146
|
components: {
|
|
147
|
+
IconSearch,
|
|
133
148
|
TablerLabel
|
|
134
149
|
}
|
|
135
150
|
}
|