12345678910111213141516171819202122232425262728293031323334353637 |
- <template>
- <div class="icon-image">
- <img :src="imageSrc" :alt="alt" />
- </div>
- </template>
- <script>
- import { mapGetters } from 'vuex'
- export default {
- props: {
- name: {
- type: String,
- default: '',
- },
- alt: {
- type: String,
- default: '',
- },
- },
- computed: {
- ...mapGetters(['static']),
- imageSrc() {
- return this.static + '/' + this.name
- },
- },
- }
- </script>
- <style scoped lang="scss">
- .icon-image {
- img {
- display: block;
- width: 100%;
- height: 100%;
- }
- }
- </style>
|