Fix async import

This commit is contained in:
Ramon Wenger 2023-02-06 14:29:06 +01:00
parent c218904c73
commit c879c074dc
1 changed files with 42 additions and 37 deletions

View File

@ -6,52 +6,57 @@
</template> </template>
<script> <script>
const DocumentIcon = () => import(/* webpackChunkName: "icons" */ '@/components/icons/DocumentIcon'); import {defineAsyncComponent} from 'vue';
export default { const DocumentIcon = defineAsyncComponent(() =>
props: { import(/* webpackChunkName: "icons" */ '@/components/icons/DocumentIcon')
value: Object, );
solution: {
type: Boolean, export default {
default: false, props: {
value: Object,
solution: {
type: Boolean,
default: false,
},
}, },
},
components: { components: {
DocumentIcon, DocumentIcon,
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '~styles/helpers'; @import '~styles/helpers';
.cms-document-block { .cms-document-block {
display: grid; display: grid;
grid-template-columns: 50px 1fr 50px; grid-template-columns: 50px 1fr 50px;
align-items: center; align-items: center;
margin-bottom: $large-spacing; margin-bottom: $large-spacing;
&__icon { &__icon {
width: 30px; width: 30px;
height: 30px; height: 30px;
}
&__link {
text-decoration: underline;
}
$parent: &;
&--solution {
margin-bottom: $small-spacing;
#{$parent}__link {
color: $color-silver-dark;
} }
#{$parent}__icon {
fill: $color-silver-dark; &__link {
text-decoration: underline;
}
$parent: &;
&--solution {
margin-bottom: $small-spacing;
#{$parent}__link {
color: $color-silver-dark;
}
#{$parent}__icon {
fill: $color-silver-dark;
}
} }
} }
}
</style> </style>