mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
688 B
688 B
前缀 & 后缀
在前缀后缀添加内容。
<n-input v-model="value" placeholder="搜索">
<template v-slot:prefix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" round placeholder="100,000,000">
<template v-slot:suffix>
元
</template>
</n-input>
<n-input v-model="value" round placeholder="搜索">
<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;
}