Skip to content

Commit d74053a

Browse files
committed
refactor: small changes and fixes
1 parent 493d9cf commit d74053a

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/components/render-function/CRenderFunction.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ export default {
2323
},
2424
methods: {
2525
convertItem (item) {
26+
if (typeof item === 'string') {
27+
return item
28+
}
2629
let newItem = []
27-
newItem[0] = item._component || 'div'
30+
newItem[0] = item._name || 'div'
2831
newItem[1] = {}
2932
newItem[1].props = this.getProps(item)
3033

src/components/sidebar/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import CSidebarMinimizer from './CSidebarMinimizer'
88
import CSidebarNav from './CSidebarNav'
99
import CSidebarNavDivider from './CSidebarNavDivider'
1010
import CSidebarNavDropdown from './CSidebarNavDropdown'
11-
import CSidebarNavGenerator from './CSidebarNavGenerator'
1211
import CSidebarNavItem from './CSidebarNavItem'
1312
import CSidebarNavTitle from './CSidebarNavTitle'
1413

@@ -23,7 +22,6 @@ export {
2322
CSidebarNav,
2423
CSidebarNavDivider,
2524
CSidebarNavDropdown,
26-
CSidebarNavGenerator,
2725
CSidebarNavItem,
2826
CSidebarNavTitle
2927
}

src/components/switch/CSwitch.vue

+2-4
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,13 @@ export default {
5858
},
5959
computed: {
6060
classList () {
61-
const havePrefix = ['opposite', 'outline'].includes(this.variant)
62-
const colorPrefix = havePrefix ? `-${this.variant}` : ''
61+
const variant = this.variant ? `-${this.variant}` : ''
6362
return [
6463
'c-switch form-check-label',
6564
{
6665
[`c-switch-${this.size}`]: this.size,
6766
[`c-switch-${this.shape}`]: this.shape,
68-
'c-switch-3d': this.variant === '3d',
69-
[`c-switch${colorPrefix}-${this.color}`]: this.color,
67+
[`c-switch${variant}-${this.color}`]: this.color,
7068
'c-switch-label': this.labelOn || this.labelOff
7169
}
7270
]

0 commit comments

Comments
 (0)