Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Vue.js 3: How to get props value and use it in functions in script setup?

<script setup>
import { computed } from 'vue'
const props = defineProps({
  widths: {
    type: String,
    default: '100%',
  }
})
// do some stuff
// access the value by 
// let w = props.widths
</script>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #props #functions #script
ADD COMMENT
Topic
Name
2+1 =