mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
487001d697
.demo.md for component demo .demo-entry.md for demo entry .md for common docs
2.2 KiB
2.2 KiB
图标
添加图标
<n-input v-model="value" placeholder="搜索" clearable>
<template v-slot:prefix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" placeholder="搜索" clearable>
<template v-slot:suffix>
DOLLAR
</template>
</n-input>
<n-input v-model="value" round placeholder="搜索" size="small" clearable>
<template v-slot:suffix>
<n-icon>
<md-search/>
</n-icon>
</template>
<template v-slot:prefix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" placeholder="搜索" size="large" clearable>
<template v-slot:suffix>
<n-icon>
<md-search/>
</n-icon>
</template>
<template v-slot:prefix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" placeholder="搜索" size="small" clearable>
<template v-slot:suffix>
<n-icon>
<md-search/>
</n-icon>
</template>
<template v-slot:prefix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" placeholder="搜索" pair size="large" separator="-" clearable>
<template v-slot:suffix>
<n-icon>
<md-search/>
</n-icon>
</template>
<template v-slot:prefix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" placeholder="搜索" pair size="small" separator="-" clearable>
<template v-slot:suffix>
<n-icon>
<md-search/>
</n-icon>
</template>
<template v-slot:prefix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" round placeholder="搜索" size="large" clearable>
<template v-slot:suffix>
<n-icon>
<md-search/>
</n-icon>
</template>
<template v-slot:prefix>
<n-icon>
<md-search/>
</n-icon>
</template>
</n-input>
<n-input v-model="value" round placeholder="搜索" clearable>
<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;
}