template:
<input type="text" ref="input" v-model="inputPad" @focus="zfocus" @blur="zblur">
data:
inputPad: "请输入支付密码",
methods:
zfocus() {
this.$refs.input.type = "password"
if (this.inputPad == "请输入支付密码") {
this.inputPad = ''
}
},
zblur() {
if (this.inputPad == '') {
this.inputPad = "请输入支付密码"
this.$refs.input.type = "text"
}
},