在需要使用 naive-ui 组件中单独引用,naive-ui依赖在第一章已经引入。
<script setup>
import { NButton } from "naive-ui";
</script>
<template>
<n-button type="primary">点我</n-button>
</template>
<style lang="scss" scoped>
</style>
<script setup>
import { NButton } from "naive-ui";
</script>
<template>
<n-button type="primary">点我</n-button>
</template>
<style lang="scss" scoped>
</style>