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>