refactor: update example views

This commit is contained in:
Łukasz Holeczek
2021-08-30 14:47:25 +02:00
parent a759550fb5
commit 1f5cad7f05
42 changed files with 2501 additions and 2112 deletions
+10 -11
View File
@@ -7,9 +7,9 @@
</CCardHeader>
<CCardBody>
<CRow class="text-center">
<template v-for="(icon, iconName) in freeSet" :key="iconName">
<CCol class="mb-5" col="3" sm="2">
<CIcon :content="icon" size="lg" />
<template v-for="(icon, iconName) in icons" :key="iconName">
<CCol class="mb-5" :xs="3" :sm="2">
<CIcon :content="icon" size="xxl" />
<div>{{ toKebabCase(iconName) }}</div>
</CCol>
</template>
@@ -24,15 +24,14 @@
import { freeSet } from '@coreui/icons'
export default {
name: 'CoreUIIcons',
data: function () {
setup() {
const toKebabCase = (str) => str.replace(/([a-z])([A-Z0-9])/g, '$1-$2').toLowerCase()
const icons = freeSet
return {
freeSet: freeSet,
icons,
toKebabCase
}
},
methods: {
toKebabCase(str) {
return str.replace(/([a-z])([A-Z0-9])/g, '$1-$2').toLowerCase()
},
},
}
}
</script>