I have a beginner question. For example i have a componnent that have a Boolean prop. Deppending on the values of the prop i'm setting the path to which Less he should to take, but that doesn't work. Does anyone know how to do that? And if that is possible?
<template>
<div class="my-style">Text</div>
</template>
<script>
export default {
props: {
isFirstApp: Boolean,
},
data: function() {
return {
isFirst: true,
path: '',
}
}
created: function () {
if(this.isFirstApp){
this.path = '/styles/vars1.less';
}else{
this.path = '/oldstyles/vars2.less';
}
},
}
</script>
<style lang="less" scoped>
@import `${path}`;
.my-style {
color: @my-variable;
}
</style>