bootstrap-vue-wrapper 1.7.12 → 1.8.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/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bootstrap-vue-wrapper",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Bootstrap 5 components in Vue3 warapper.",
|
|
5
5
|
"author": "Gabor Zemko <gaborzemko@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/zemkogabor/bootstrap-vue-wrapper",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"bootstrap": "^5.1",
|
|
16
|
-
"vue": "^3.2",
|
|
17
|
-
"vue-router": "^4.0"
|
|
15
|
+
"bootstrap": "^5.1.0",
|
|
16
|
+
"vue": "^3.2.0",
|
|
17
|
+
"vue-router": "^4.0.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"eslint": "^8.8.0",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
v-for="(item, index) in items"
|
|
6
6
|
:key="index"
|
|
7
7
|
class="breadcrumb-item"
|
|
8
|
-
:class="{ active:
|
|
8
|
+
:class="{ active: !isRouteAvailable(item)}"
|
|
9
9
|
>
|
|
10
10
|
<router-link
|
|
11
|
-
v-if="
|
|
11
|
+
v-if="isRouteAvailable(item)"
|
|
12
12
|
:to="item.route"
|
|
13
13
|
v-text="item.title"
|
|
14
14
|
/>
|
|
@@ -32,17 +32,17 @@ export default {
|
|
|
32
32
|
},
|
|
33
33
|
methods: {
|
|
34
34
|
/**
|
|
35
|
-
* Is
|
|
35
|
+
* Is route available
|
|
36
36
|
*
|
|
37
37
|
* @param item
|
|
38
38
|
* @returns {boolean}
|
|
39
39
|
*/
|
|
40
|
-
|
|
41
|
-
if (item.route
|
|
40
|
+
isRouteAvailable(item) {
|
|
41
|
+
if (!item.route) {
|
|
42
42
|
return false
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
return item.route.name
|
|
45
|
+
return item.route.name !== this.$route.name
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="form-check" :class="classContainer">
|
|
3
|
+
<input
|
|
4
|
+
:id="id"
|
|
5
|
+
ref="validationTarget"
|
|
6
|
+
:value="modelValue"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
type="radio"
|
|
9
|
+
class="form-check-input"
|
|
10
|
+
:checked="isChecked"
|
|
11
|
+
:aria-describedby="hint !== null ? getHintId() : null"
|
|
12
|
+
@input="onInput"
|
|
13
|
+
@invalid="onInvalid"
|
|
14
|
+
>
|
|
15
|
+
<label
|
|
16
|
+
v-if="label !== null"
|
|
17
|
+
:for="id"
|
|
18
|
+
class="form-check-label"
|
|
19
|
+
v-text="label"
|
|
20
|
+
/>
|
|
21
|
+
<div
|
|
22
|
+
v-if="invalidMessage !== null && !hideValidationMessage"
|
|
23
|
+
class="invalid-feedback"
|
|
24
|
+
v-text="invalidMessage"
|
|
25
|
+
/>
|
|
26
|
+
<div
|
|
27
|
+
v-if="hint !== null"
|
|
28
|
+
:id="getHintId()"
|
|
29
|
+
class="form-text"
|
|
30
|
+
v-text="hint"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import validator from '../../mixins/validator.js'
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name: 'BsRadio',
|
|
40
|
+
mixins: [validator],
|
|
41
|
+
props: {
|
|
42
|
+
/**
|
|
43
|
+
* Radio value
|
|
44
|
+
*/
|
|
45
|
+
value: {
|
|
46
|
+
type: [String, Number],
|
|
47
|
+
default: null,
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* Value for v-model
|
|
51
|
+
*/
|
|
52
|
+
modelValue: {
|
|
53
|
+
type: [String, Number],
|
|
54
|
+
default: null,
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Html id
|
|
58
|
+
*/
|
|
59
|
+
id: {
|
|
60
|
+
type: String,
|
|
61
|
+
required: true,
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Label for input
|
|
65
|
+
*/
|
|
66
|
+
label: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: null,
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Attribute hint
|
|
72
|
+
*/
|
|
73
|
+
hint: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: null,
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Input container div class.
|
|
79
|
+
*/
|
|
80
|
+
classContainer: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: null,
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* If this is true the validation message does not appear.
|
|
86
|
+
*/
|
|
87
|
+
hideValidationMessage: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
emits: ['update:modelValue'],
|
|
93
|
+
computed: {
|
|
94
|
+
/**
|
|
95
|
+
* Radio is checked or not.
|
|
96
|
+
*/
|
|
97
|
+
isChecked() {
|
|
98
|
+
return this.modelValue === this.value
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
methods: {
|
|
102
|
+
/**
|
|
103
|
+
* Hint id is generated
|
|
104
|
+
*/
|
|
105
|
+
getHintId() {
|
|
106
|
+
return this.id + 'Hint'
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* On input event
|
|
110
|
+
*
|
|
111
|
+
* @param event
|
|
112
|
+
*/
|
|
113
|
+
onInput(event) {
|
|
114
|
+
this.$emit('update:modelValue', this.value)
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
</script>
|