Seeking help on accessing props data for my computed property. Here is the code snippet:
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
props: {
color: String,
shape: String,
},
computed: {
theme(): string {
const args: string[] = props.color.split('-') //Encountering error: Cannot find name 'props'
let var_1:string = args[0]
return var_1
}
}
})
</script>
I have also tried using "this.color" but it didn't work either.