1、安装vant
npm i vant
2、在vue3中的main.js中导入
import Vant from 'vant'
import 'vant/lib/index.css';
app.use(Vant)
3、在其他.vue中可直接使用
<template>
<van-button type="primary">主要按钮</van-button>
</template>
<script setup>
</script>
<style lang="less" scoped>
</style>
4、效果如下;