当前位置:网站首页>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)
}边栏推荐
- 【深度学习】Pytorch Tensor 张量
- Arduino开发(二)_基于Arduino UNO开发板的RGB灯光控制方法
- After working for bytek for two years, he got 15 offers at one go
- MYSQL设计优化生成列
- JVM overview and memory management (to be continued)
- Management of user organization structure
- 2022-07-19 advanced network engineering (XX) BGP route optimization, route optimization analysis one by one
- CONDA common commands
- How bad can a programmer be?
- IM即时通讯开发如何提升移动网络下图片传输速度和成功率
猜你喜欢

JVS私有化部署启动失败处理方案

MySQL驱动jar包的下载--保姆教程

从0开始写bootloader

Anfulai embedded weekly report no. 275: 2022.07.18--2022.07.24

面了个腾讯拿38K跳槽出来的,见识到了真正的测试天花板

A new UI testing method: visual perception test

A layered management method of application layer and hardware layer in embedded system

When adding RTSP devices to easycvr platform, what is the reason for the phenomenon that they are all connected by TCP?

Oracle Xe installation and user operation

Swiftui view onReceive method receives "redundant" event resolution
随机推荐
Laboratory management system implemented by SSM framework +jsp [source code + database + system paper]
How to monitor the running status and usage of NVIDIA Jetson
在字节干了两年离职后,一口气拿到15家Offer
Ie11 method of downloading doc PDF and other files
Check the internship salary of Internet companies: with it, you can also enter the factory
How to solve the problem of missing alarm information and synchronization when Haikang equipment is connected to easycvr?
EasyCVR平台关闭录像为何还会有TS切片文件生成?
Clickhouse implements materializedpostgresql
[design tutorial] yolov7 target detection network interpretation
How bad can a programmer be?
Innovative cases | the growth strategy of digitalization of local life services and upgrading of Gaode brand
关于栈迁移的那些事儿
Flask-MDict搭建在线Mdict词典服务
Jetpack Compose 性能优化指南——编译指标
面了个腾讯拿38K跳槽出来的,见识到了真正的测试天花板
Nailing development document
软件测试面试题:已知一个队列,如: [1, 3, 5, 7], 如何把第一个数字,放到第三个位置,得到:[3, 5, 1, 7]
User and authority modify user password
金仓数据库 Oracle至KingbaseES迁移最佳实践(2. 概述)
Data warehouse construction - DWD floor