mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
731 B
731 B
前缀 & 后缀
在前缀后缀添加内容。
<n-input v-model:value="value" placeholder="搜索">
<template v-slot:prefix>
<n-icon>
<search-outline/>
</n-icon>
</template>
</n-input>
<n-input v-model:value="value" round placeholder="100,000,000">
<template v-slot:suffix>
元
</template>
</n-input>
<n-input v-model:value="value" round placeholder="搜索">
<template v-slot:suffix>
<n-icon>
<search-outline/>
</n-icon>
</template>
</n-input>
import searchOutline from 'naive-ui/lib/icons/search-outline'
export default {
components: {
searchOutline
},
data() {
return {
value: null
}
}
}
.n-input {
margin-bottom: 8px;
}