mirror of
https://github.com/tornadocash/tornado-initiation-ui.git
synced 2024-11-22 17:40:04 +01:00
27 lines
456 B
Vue
27 lines
456 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>
|