vue 如何动态设置input的placeholder的颜色?
// demo.vue <input type="text" placeholder="输入内容" :style="bindInputStyle" /> ... computed:{ bindInputStyle() { return { '--placeholderColor': 'red', } }, } ... <style scoped lang="scss"> input { &::placeholder { color: var(--placeholderColor); // 动态值 } } </style>