1
1
<template >
2
- <section
3
- v-if =" component"
4
- class =" bd-content"
5
- >
2
+ <section v-if =" component" class =" bd-content" >
6
3
<b-row tag =" header" align-v =" center" >
7
4
<b-col sm =" 9" >
8
5
<anchored-heading :id =" `comp-ref-${componentName}`" level =" 2" >
44
41
<b-badge variant =" warning" >
45
42
{{ typeof item.deprecated === 'string' ? 'deprecation' : 'deprecated' }}
46
43
</b-badge >
47
- <!-- if deprecated is a string, show the string value -->
44
+ <!-- If deprecated is a string, show the string value -->
48
45
<small v-if =" typeof item.deprecated === 'string'" >{{ item.deprecated }}</small >
49
46
</template >
50
47
<template slot="defaultValue" slot-scope="{ value }">
83
80
small
84
81
head-variant =" default"
85
82
striped
86
- / >
83
+ ></ b-table >
87
84
</article >
88
85
89
86
<article v-if =" events && events.length > 0" >
113
110
<anchored-heading :id =" `comp-ref-${componentName}-rootEventListeners`" level =" 4" >
114
111
$root Event Listeners
115
112
</anchored-heading >
116
- <p >You can control <code >{{ tag }}</code > by emitting the following events on <samp >$root</samp >:</p >
113
+ <p >
114
+ You can control <code >{{ tag }}</code > by emitting the following events on
115
+ <samp >$root</samp >:
116
+ </p >
117
117
<b-table
118
118
:items =" rootEventListeners"
119
119
:fields =" rootEventListenersFields"
@@ -151,9 +151,7 @@ import kebabCase from 'lodash/kebabCase'
151
151
import AnchoredHeading from ' ./anchored-heading'
152
152
153
153
export default {
154
- components: {
155
- AnchoredHeading
156
- },
154
+ components: { AnchoredHeading },
157
155
props: {
158
156
component: {},
159
157
slots: {
@@ -206,7 +204,6 @@ export default {
206
204
},
207
205
propsFields () {
208
206
const props = this .componentProps
209
-
210
207
const hasRequired = Object .keys (props).some (p => props[p].required )
211
208
212
209
const fields = [
@@ -259,19 +256,15 @@ export default {
259
256
260
257
// Describe value
261
258
let defaultVal = p .default
262
-
263
259
if (defaultVal instanceof Function && ! Array .isArray (defaultVal)) {
264
260
defaultVal = defaultVal ()
265
261
}
266
-
267
262
if (typeof defaultVal !== ' string' ) {
268
263
defaultVal = JSON .stringify (defaultVal)
269
264
}
270
-
271
265
if (defaultVal === ' ' || defaultVal === null || defaultVal === ' null' ) {
272
266
defaultVal = ' '
273
267
}
274
-
275
268
defaultVal = (defaultVal || ' ' ).replace (/ "/ g , " '" )
276
269
277
270
// Requied prop?
@@ -294,7 +287,7 @@ export default {
294
287
return kebabCase (this .component )
295
288
},
296
289
tag () {
297
- return ' < ' + this .componentName + ' > '
290
+ return ` < ${ this .componentName } > `
298
291
},
299
292
githubURL () {
300
293
const base = ' https://github.com/bootstrap-vue/bootstrap-vue/tree/dev/src/components'
0 commit comments