乐趣区

关于vue.js:Vue-30-UI-库-Naive-的使用

Naive 间接引入 的应用

1. 惯例引入

<template>
  <n-button>naive-ui</n-button>
</template>

<script>
  import {defineComponent} from 'vue'
  import {NButton} from 'naive-ui'

  export default defineComponent({
    components: {NButton}
  })
</script>

2. 应用 setup script

<template>
  <n-button>naive-ui</n-button>
</template>

<script>
  import {defineComponent} from 'vue'
  import {NButton} from 'naive-ui'

  export default defineComponent({
    components: {NButton}
  })
</script>
退出移动版