mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
696 B
696 B
Icon
Use icon in input.
<n-input v-model="value" placeholder="Search">
<template v-slot:affix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" round placeholder="Search">
<template v-slot:affix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" round placeholder="Search">
<template v-slot:suffix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
import mdSearch from 'naive-ui/lib/icons/md-search'
export default {
components: {
mdSearch
},
data() {
return {
value: null
}
}
}
.n-input {
margin-bottom: 8px;
}