Skip to content

Commit d0e7e89

Browse files
committed
style: fix lint errors
1 parent 0036e39 commit d0e7e89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+245
-237
lines changed

src/components/affix/Affix.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ export default {
3535
return
3636
}
3737
// get window scroll and element position to detect if have to be normal or affixed
38-
let scroll = {}
39-
let element = {}
38+
const scroll = {}
39+
const element = {}
4040
const rect = this.$el.getBoundingClientRect()
4141
const body = document.body
4242
const types = ['Top', 'Left']
4343
types.forEach(type => {
44-
let t = type.toLowerCase()
44+
const t = type.toLowerCase()
4545
scroll[t] = window['page' + (type === 'Top' ? 'Y' : 'X') + 'Offset']
4646
element[t] = scroll[t] + rect[t] - (this.$el['client' + type] || body['client' + type] || 0)
4747
})
48-
let fix = scroll.top > element.top - this.offset
48+
const fix = scroll.top > element.top - this.offset
4949
if (this.affixed !== fix) {
5050
this.affixed = fix
5151
this.$emit(this.affixed ? 'affix' : 'unfix')

src/components/alert/Alert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
computed: {
2222
alertClass () {
2323
return {
24-
'alert': true,
24+
alert: true,
2525
[`alert-${this.type}`]: Boolean(this.type),
2626
'alert-dismissible': this.dismissible
2727
}

src/components/breadcrumbs/BreadcrumbItem.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {mergeData} from 'vue-functional-data-merge'
1+
import { mergeData } from 'vue-functional-data-merge'
22
import linkMixin from '../../mixins/link.mixin'
33

44
export default {
55
functional: true,
66
mixins: [linkMixin],
7-
render (h, {props, data, children}) {
7+
render (h, { props, data, children }) {
88
let slot
99
if (props.active) {
1010
slot = children
@@ -29,7 +29,7 @@ export default {
2929
}, children)
3030
]
3131
}
32-
return h('li', mergeData(data, {class: {active: props.active}}), slot)
32+
return h('li', mergeData(data, { class: { active: props.active } }), slot)
3333
},
3434
props: {
3535
active: {

src/components/breadcrumbs/Breadcrumbs.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import {mergeData} from 'vue-functional-data-merge'
1+
import { mergeData } from 'vue-functional-data-merge'
22
import BreadcrumbItem from './BreadcrumbItem.js'
3+
import { hasOwnProperty } from '../../utils/object.utils'
34

45
export default {
56
functional: true,
6-
render (h, {props, data, children}) {
7+
render (h, { props, data, children }) {
78
let slot = []
89
if (children && children.length) {
910
slot = children
@@ -12,9 +13,9 @@ export default {
1213
return h(
1314
BreadcrumbItem,
1415
{
15-
key: item.hasOwnProperty('key') ? item.key : index,
16+
key: hasOwnProperty(item, 'key') ? item.key : index,
1617
props: {
17-
active: item.hasOwnProperty('active') ? item.active : index === props.items.length - 1,
18+
active: hasOwnProperty(item, 'active') ? item.active : index === props.items.length - 1,
1819
href: item.href,
1920
target: item.target,
2021
to: item.to,
@@ -27,7 +28,7 @@ export default {
2728
)
2829
})
2930
}
30-
return h('ol', mergeData(data, {class: 'breadcrumb'}), slot)
31+
return h('ol', mergeData(data, { class: 'breadcrumb' }), slot)
3132
},
3233
props: {
3334
items: Array

src/components/button/Btn.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {mergeData} from 'vue-functional-data-merge'
1+
import { mergeData } from 'vue-functional-data-merge'
22
import linkMixin from '../../mixins/link.mixin'
33
import BtnGroup from './BtnGroup'
44

@@ -8,7 +8,7 @@ const INPUT_TYPE_RADIO = 'radio'
88
export default {
99
functional: true,
1010
mixins: [linkMixin],
11-
render (h, {children, props, data}) {
11+
render (h, { children, props, data }) {
1212
// event listeners
1313
const listeners = data.on || {}
1414
// checkbox: model contain inputValue
@@ -96,9 +96,9 @@ export default {
9696
} else {
9797
valueCopied.push(props.inputValue)
9898
}
99-
listeners['input'](valueCopied)
99+
listeners.input(valueCopied)
100100
} else {
101-
listeners['input'](props.inputValue)
101+
listeners.input(props.inputValue)
102102
}
103103
}
104104
}

src/components/button/BtnGroup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import {mergeData} from 'vue-functional-data-merge'
1+
import { mergeData } from 'vue-functional-data-merge'
22

33
export default {
44
functional: true,
5-
render (h, {props, children, data}) {
5+
render (h, { props, children, data }) {
66
return h(
77
'div',
88
mergeData(data, {

src/components/button/BtnToolbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import {mergeData} from 'vue-functional-data-merge'
1+
import { mergeData } from 'vue-functional-data-merge'
22

33
export default {
44
functional: true,
5-
render (h, {children, data}) {
5+
render (h, { children, data }) {
66
return h(
77
'div',
88
mergeData(data, {

src/components/carousel/Carousel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default {
5555
},
5656
methods: {
5757
run (newIndex, oldIndex) {
58-
let currentActiveIndex = oldIndex || 0
58+
const currentActiveIndex = oldIndex || 0
5959
let direction
6060
if (newIndex > currentActiveIndex) {
6161
direction = ['next', 'left']

src/components/carousel/Slide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default {
2020
}
2121
},
2222
beforeDestroy () {
23-
let slides = this.$parent && this.$parent.slides
23+
const slides = this.$parent && this.$parent.slides
2424
spliceIfExist(slides, this)
2525
}
2626
}

src/components/collapse/Collapse.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default {
3333
}
3434
},
3535
mounted () {
36-
let el = this.$el
36+
const el = this.$el
3737
addClass(el, COLLAPSE)
3838
if (this.value) {
3939
addClass(el, IN)
@@ -42,12 +42,12 @@ export default {
4242
methods: {
4343
toggle (show) {
4444
clearTimeout(this.timeoutId)
45-
let el = this.$el
45+
const el = this.$el
4646
if (show) {
4747
this.$emit('show')
4848
removeClass(el, COLLAPSE)
4949
el.style.height = 'auto'
50-
let height = window.getComputedStyle(el).height
50+
const height = window.getComputedStyle(el).height
5151
el.style.height = null
5252
addClass(el, COLLAPSING)
5353
el.offsetHeight // force repaint

0 commit comments

Comments
 (0)