Skip to content

Commit 0454c63

Browse files
committed
fix: small fixes in imports and linting warnings
1 parent de76990 commit 0454c63

23 files changed

+44
-127
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
6060
"chart.js": "^2.7.3",
6161
"core-js": "^2.5.7",
62+
"element-resize-detector": "^1.2.0",
6263
"popper.js": "^1.14.6",
6364
"tooltip.js": "^1.3.1",
6465
"vue": "^2.5.17",

src/components/Button/CButton.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ function computePassedProps (props) {
5353
return isLink(props) ? pluckProps(linkPropsFactory(), props) : null
5454
}
5555

56-
function computeAttrs (props, data, link, toggle) {
56+
function computeAttrs (props, data, isButton, toggle) {
5757
return {
58-
type: !link ? props.type : null,
58+
type: isButton ? props.type : null,
5959
// in CLink disabled property works diffrently
60-
disabled: !link ? props.disabled : null,
60+
disabled: isButton ? props.disabled : null,
6161
'aria-pressed': toggle ? String(props.pressed) : null,
6262
// autocomplete off is needed in toggle mode to prevent some browsers from
6363
// remembering the previous setting when using the back button.
@@ -71,7 +71,7 @@ export default {
7171
props: props,
7272
render (h, { props, data, listeners, children }) {
7373
const toggle = isToggle(props)
74-
const link = isLink(props)
74+
const isButton = !isLink(props)
7575
const on = {
7676
click (e) {
7777
if (props.disabled && e instanceof Event) {
@@ -87,9 +87,9 @@ export default {
8787
staticClass: 'btn',
8888
class: computeClasses(props),
8989
props: computePassedProps(props),
90-
attrs: computeAttrs(props, data, link, toggle),
90+
attrs: computeAttrs(props, data, isButton, toggle),
9191
on
9292
}
93-
return h(link ? CLink : 'button', mergeData(data, componentData), children)
93+
return h(isButton ? 'button' : CLink , mergeData(data, componentData), children)
9494
}
9595
}

src/components/Embed/CEmbed.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const props = {
1818
}
1919
export default {
2020
functional: true,
21+
name: 'CEmbed',
2122
props,
2223
render (h, { props, data, children }) {
2324
return h(
File renamed without changes.

src/components/Forms/CFormFile.vue renamed to src/components/Form/CFormFile.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default {
7676
// classesComputedProps mixin
7777
haveCustomSize () {
7878
return ['','sm','lg'].includes(this.size) &&
79-
Boolean(this.size) && !Boolean(this.custom)
79+
Boolean(this.size && !this.custom)
8080
},
8181
// haveCustomSize () {
8282
// return ['','sm','lg'].includes(this.size) && Boolean(this.size)

src/components/Forms/CFormInput.vue renamed to src/components/Form/CFormInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default {
171171
return
172172
173173
clearTimeout(this.syncTimeout)
174-
this.syncTimeout = setTimeout((val) => {
174+
this.syncTimeout = setTimeout(() => {
175175
this.$emit('sync', this.state, e)
176176
}, this.lazy !== false ? this.lazy : 0)
177177
},

src/components/Forms/CFormSelect.vue renamed to src/components/Form/CFormSelect.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
:value="String(option.value)"
2424
:disabled="option.disabled"
2525
:data-key="key"
26+
:key="key"
2627
>
2728
{{option.text || option.value}}
2829
</option>
2930
<option v-else
3031
:value="String(option)"
3132
:data-key="key"
33+
:key="key"
3234
>
3335
{{option}}
3436
</option>
@@ -51,7 +53,7 @@ const mixins = Object.values(allFormMixins)
5153
import { formSelectProps as props } from './formProps'
5254
import CFormGroup from './CFormGroup'
5355
export default {
54-
name: 'CFormInput',
56+
name: 'CFormSelect',
5557
inheritAttrs: false,
5658
components: { CFormGroup },
5759
mixins,

src/components/Forms/CFormTextarea.vue renamed to src/components/Form/CFormTextarea.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export default {
157157
return
158158
159159
clearTimeout(this.syncTimeout)
160-
this.syncTimeout = setTimeout((val) => {
160+
this.syncTimeout = setTimeout(() => {
161161
this.$emit('sync', this.state, e)
162162
}, this.lazy !== false ? this.lazy : 0)
163163
},

0 commit comments

Comments
 (0)