We all love vue 3 new script setup, but it is difficult to shift to it because of low usage and less support. I faced problem while getting and using props value inside functions.My code was like below
<script setup>
defineProps({
text: String,
howShow: Number,
text1: String,
text2: String,
text3: String,
widths: {
type: String,
default: "100%",
},
})
</script>
w
will not be reactive, because getting a value from theprops
in root scope of<script setup>
will cause the value to lose reactivity. Seevue/no-setup-props-destructure
lint rule. – Rendition