Skip to content

Commit e17f95c

Browse files
committed
refactor: change icons store to $root.$options.icons
1 parent 1fd1d17 commit e17f95c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CIcon.vue

+6-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
<script>
1111
export default {
1212
name: 'CIcon',
13-
//This object contains icons added before component registration
14-
icons: {},
1513
props: {
1614
name: String,
1715
content: [String, Array],
@@ -27,7 +25,12 @@ export default {
2725
return iconNameIsKebabCase ? this.toCamelCase(this.name) : this.name
2826
},
2927
code () {
30-
return this.content || this.$options.icons[this.iconName]
28+
if (this.content) {
29+
return this.content
30+
} else if (this.$root.$options.icons) {
31+
return this.$root.$options.icons[this.iconName]
32+
}
33+
return undefined
3134
},
3235
icon () {
3336
if (Array.isArray(this.code)) {

0 commit comments

Comments
 (0)