본문 바로가기

vuejs safari textarea placeholder multiline not work

by 식 2018. 9. 4.

Template

<textarea v-model="textAreaVal" @focus="changeTextAreaFocus" @blur="changeTextAreaFocus"></textarea>


Script

data() {
return {
placeholder: 'Placeholder..',
textAreaVal: 'Placeholder..',
}
},
methods: {
changeTextAreaFocus() {
if (this.placeholder == this.textAreaVal) {
this. textAreaVal = ''
} else if (this.textAreaVal.length == 0) {
this.textAreaVal = this.placeholder
}
}
}


CSS로 맞출려다가 암걸릴뻔

반응형