Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<template>
<div>
<div class="text">hello</div>
</div>
</template>
<script>
export default {
data() {
return {
color: 'red',
font: {
weight: '800'
}
}
}
}
</script>
<style>
.text {
color: v-bind(color);
/* wrapped in quotes */
font-weight: v-bind('font.weight');
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment