fix: remove eslint and prettier warnings

This commit is contained in:
Łukasz Holeczek
2021-10-31 20:50:56 +01:00
parent 1660d556f7
commit d2d9de7520
40 changed files with 388 additions and 480 deletions
+1 -1
View File
@@ -2,9 +2,9 @@
<CBreadcrumb class="d-md-down-none me-auto mb-0">
<CBreadcrumbItem
v-for="item in breadcrumbs"
:key="item"
:href="item.active ? '' : item.path"
:active="item.active"
:key="item"
>
{{ item.name }}
</CBreadcrumbItem>
-1
View File
@@ -55,7 +55,6 @@ export default {
AppHeaderDropdownAccnt,
},
setup() {
return {
logo,
}
+2 -2
View File
@@ -13,12 +13,12 @@
>
<CSidebarBrand>
<CIcon
customClassName="sidebar-brand-full"
custom-class-name="sidebar-brand-full"
:icon="logoNegative"
:height="35"
/>
<CIcon
customClassName="sidebar-brand-narrow"
custom-class-name="sidebar-brand-narrow"
:icon="sygnet"
:height="35"
/>
+29 -21
View File
@@ -1,39 +1,45 @@
import { defineComponent, h, onMounted, ref, resolveComponent } from 'vue'
import { RouterLink, useRoute } from 'vue-router'
import { CBadge, CSidebarNav, CNavItem, CNavGroup, CNavTitle } from '@coreui/vue'
import {
CBadge,
CSidebarNav,
CNavItem,
CNavGroup,
CNavTitle,
} from '@coreui/vue'
import nav from '@/_nav.js'
const normalizePath = (path) =>
decodeURI(path)
.replace(/#.*$/, '')
.replace(/(index)?\.(html)$/, '')
decodeURI(path)
.replace(/#.*$/, '')
.replace(/(index)?\.(html)$/, '')
const isActiveLink = (route, link) => {
if (link === undefined) {
return false
}
if (link === undefined) {
return false
}
if (route.hash === link) {
return true
}
if (route.hash === link) {
return true
}
const currentPath = normalizePath(route.path)
const targetPath = normalizePath(link)
const currentPath = normalizePath(route.path)
const targetPath = normalizePath(link)
return currentPath === targetPath
return currentPath === targetPath
}
const isActiveItem = (route, item) => {
if (isActiveLink(route, item.to)) {
return true
}
if (isActiveLink(route, item.to)) {
return true
}
if (item.items) {
return item.items.some((child) => isActiveItem(route, child))
}
if (item.items) {
return item.items.some((child) => isActiveItem(route, child))
}
return false
return false
}
const AppSidebarNav = defineComponent({
@@ -56,7 +62,9 @@ const AppSidebarNav = defineComponent({
return h(
CNavGroup,
{
...firstRender.value && { visible: item.items.some((child) => isActiveItem(route, child))}
...(firstRender.value && {
visible: item.items.some((child) => isActiveItem(route, child)),
}),
},
{
togglerContent: () => [
+10 -6
View File
@@ -1,16 +1,20 @@
<template>
<CCallout color="info" class="bg-white">
{{content
{{
content
? content
: `A Vue ${name} component ${
plural ? 'have' : 'has'
} been created as a native Vue.js version
of Bootstrap ${name}. ${name} ${plural ? 'are' : 'is'} delivered with some new features,
variants, and unique design that matches CoreUI Design System requirements.`}}
of Bootstrap ${name}. ${name} ${
plural ? 'are' : 'is'
} delivered with some new features,
variants, and unique design that matches CoreUI Design System requirements.`
}}
<br />
<br />
For more information please visit our official
<CLink :href="href" target="_blank">
<CLink :href="url" target="_blank">
documentation of CoreUI Components Library for Vue.js
</CLink>
.
@@ -40,10 +44,10 @@ export default {
plural: Boolean,
},
setup(props) {
const href = `https://coreui.io/vue/docs/${packageJson.config.coreui_library_short_version}/${props.href}`
const url = `https://coreui.io/vue/docs/${packageJson.config.coreui_library_short_version}/${props.url}`
return {
href,
url,
}
},
}
+3 -3
View File
@@ -7,7 +7,7 @@
</CNavLink>
</CNavItem>
<CNavItem>
<CNavLink :href="href" target="_blank">
<CNavLink :href="url" target="_blank">
<CIcon icon="cil-code" class="me-2" />
Code
</CNavLink>
@@ -33,10 +33,10 @@ export default {
},
},
setup(props) {
const href = `https://coreui.io/vue/docs/${pkg.config.coreui_library_short_version}/${props.href}`
const url = `https://coreui.io/vue/docs/${pkg.config.coreui_library_short_version}/${props.href}`
return {
href,
url,
}
},
}