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