I originally wrote a text field that supports one-click clearing; so I directly used the property clearable that comes with the Input component in iview, but the result was invalid, and the little fork didn’t come out...
After trying for a long time, I found out that it was because type="textarea" would conflict with the clearable attribute...
<template>
<Input v-model="value1" clearable style="width: 200px" />
<br>
<br>
<Input type="textarea" v-model="value2" clearable style="width: 200px" />
</template>
<script>
export default {
data () {
return {
value1: 'normal',
value2: "when I'm textarea",
}
}
}
</script>
The results show that: