Case Description
Hints for manipulating input
case code
<template>
<view>
<view>
<input type="text" placeholder="请输入内容" :placeholder-class="isDialogHidden?'redColor':''" />
<button @click="hideDialog">按钮</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isDialogHidden: false
};
},
methods: {
hideDialog() {
this.isDialogHidden = true;
}
}
};
</script>
<style lang="scss">
.redColor {
color: #ff0000;
}
</style>
The default is gray. When the button is clicked, the default gray prompt will turn red. placeholder-class
The attribute value is the class name. placeholder-style
or by processing