I want to implement:
(:colorpropsp)
problems encountered:
getStyle()colorfont-size
Target:
1.stylegetStyle()colorfont-size()
2.colorcolorfont-sizegetStyle()()
3.colorfont-weight(font-size)()
4.font-weightfont-italic(:),()
here is a small example I wrote:
:)
<template>
<div>
<p :style="getStyle()">haha
</div>
</template>
<script>
export default {
name: "Test",
props: {
textStyle: Object
},
methods: {
getStyle() {
return this.textStyle || {
"color": "-sharp999",
"font-size": "22px"
}
}
}
}
</script>