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

Lines changed: 6 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy