naive-ui/demo/documentation/components/button/zhCN/icon.demo.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +08:00

432 B

图标

在按钮上使用图标。

<n-button>
  <template v-slot:icon>
    <cash-outline />
  </template>
  +100 元
</n-button>
<n-button icon-placement="right">
  <template v-slot:icon>
    <cash-outline />
  </template>
  +100 元
</n-button>
import cashOutline from 'naive-ui/lib/icons/cash-outline'

export default {
  components: {
    cashOutline
  }
}
.n-button {
  margin: 0 8px 8px 0;
}