当前位置:网站首页>vant组件库
vant组件库
2022-07-27 18:12:00 【宇智波-林中路】
安装:
npm i [email protected] -S1.完整引入
//plugins/vant/index.js
import Vue from 'vue';
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);// plugins/index.js
import './vant'
import './tailwind'
import './element'
import './echarts'//main.js
import Vue from 'vue'
import App from './App.vue'
import './plugins'2.按需引入
安装插件
npm i babel-plugin-import -D
#在 babel.config.js 中配置
module.exports = {
presets: ['@vue/cli-plugin-babel/preset'],
plugins: [
[
'import',
{
libraryName: 'vant',
libraryDirectory: 'es',
style: (name) => `${name}/style/less`
},
'vant'
]
]
}
// plugins/vant/index.js
import Vue from 'vue';
import { Button, Select } from 'element-ui';
Vue.use(Button)
// plugins/index.js
import './tailwind';
import './element';
import './echarts';
//main.js
import Vue from 'vue'
import App from './App.vue'
import './plugins为了方便,全部导入
// plugins/index.js
import Vue from 'vue'
import {
Button,
Swipe,
SwipeItem,
Lazyload,
Sticky,
Loading,
List,
Form,
Field,
Uploader,
RadioGroup,
Radio,
Toast,
Tag,
Skeleton,
Cell,
CellGroup,
GoodsAction,
GoodsActionIcon,
GoodsActionButton,
Sku,
Checkbox,
CheckboxGroup,
SubmitBar,
Badge,
Empty,
Image,
ContactCard,
Tab,
Tabs
} from 'vant'
const components = [
Button,
Swipe,
SwipeItem,
Lazyload,
Sticky,
Loading,
List,
Form,
Field,
Uploader,
RadioGroup,
Radio,
Toast,
Tag,
Skeleton,
Cell,
CellGroup,
GoodsAction,
GoodsActionIcon,
GoodsActionButton,
Sku,
Checkbox,
CheckboxGroup,
SubmitBar,
Badge,
Empty,
Image,
ContactCard,
Tab,
Tabs
]
for (const component of components) {
Vue.use(component)
}边栏推荐
- Flask Mdict builds online MDICT Dictionary Service
- You can understand it at a glance, eslint
- 一周活动速递|深入浅出第8期;Meetup成都站报名进行中
- access control
- 未定义变量 “Lattice“ 或类 “Lattice.latticeEasy“(Matlab)
- Management of user organization structure
- [hierarchical reinforcement learning] HAC paper and code
- Under the epidemic, I left my job for a year, and my income increased 10 times
- 洋葱集团携手OceanBase实现分布式升级,全球数据首次实现跨云融合
- 一个程序员的水平能差到什么程度?
猜你喜欢
![(manual) [sqli labs38, 39] stack injection, error echo, character / number type](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
(manual) [sqli labs38, 39] stack injection, error echo, character / number type

JVM overview and memory management (to be continued)

RK3399平台入门到精通系列讲解(导读篇)21天学习挑战介绍

Understand │ what is cross domain? How to solve cross domain problems?

【阿里安全 × ICDM 2022】20万奖金池!大规模电商图上的风险商品检测赛火热报名中!...

Write bootloader from 0

adb shell ls /system/bin(索引表)

JVS公众号登陆配置

【数据集显示标注】VOC文件结构+数据集标注可视化+代码实现

人家这才叫软件测试工程师,你那只是混口饭吃(附HR面试宝典)
随机推荐
Summary of simple topics
Some contents related to cmsis-rtos
What configurations are required to connect polardb and redis?
(manual) [sqli labs38, 39] stack injection, error echo, character / number type
Nailing development document
Leetcode:1498. Number of subsequences that meet the conditions [sort + bisection + power hash table]
【数据集显示标注】VOC文件结构+数据集标注可视化+代码实现
金仓数据库 KingbaseES 异构数据库移植指南 (4. 应用迁移流程)
软件测试面试题:已知一个字符串为“hello_world_yoyo”, 如何得到一个队列 [“hello“,“world“,“yoyo“]
2022.07.11
RK3399平台入门到精通系列讲解(导读篇)21天学习挑战介绍
从0开始写bootloader
How bad can a programmer be?
【程序人生】“阶段总结“-不甘平凡
金仓数据库 Oracle至KingbaseES迁移最佳实践(2. 概述)
Management of user organization structure
Why does Alibaba prohibit more than three forms from joining?
Redis basic understanding, five basic data types
软件测试面试题:字符串 “axbyczdj“,如果得到结果“abcd
adb shell ls /system/bin(索引表)