classic-ui/components/icons/FlagIcon.vue
FreezyEx b32527e057 Revert "minor fixes"
This reverts commit 7f8f7c2aa15c8b8c6a7449d177f46f8a417e2f67.
2022-10-13 16:03:54 +02:00

27 lines
453 B
Vue

<template>
<i v-if="code" class="flag-icon" :class="flagIconClass"></i>
</template>
<script>
export default {
name: 'FlagIcon',
props: {
code: { type: String, default: null }
},
computed: {
flagIconClass() {
let code = this.code
switch (code) {
case 'zh':
code = 'cn'
break
case 'en':
code = 'gb'
break
}
return 'flag-icon-' + code
}
}
}
</script>