<template> <div class="box" :style="styles"> <!-- computedãªstylesããããã£ãstyleã«ãã¤ã³ã--> <div class="message"> <slot></slot> </div> </div> </template> <script> export default { name: 'box', props: { color: {}, width: {} }, computed: { // ãã¤ã³ãããã¹ã¿ã¤ã«ãçæ styles () { return { '--color': this.color, '--width': this.width } } } } </script> <style scoped> .box { /* ããã©ã«ãã®å¤ã宣è¨*/ --color: orange; /* --width: w

{{#tags}}- {{label}}
{{/tags}}