当前位置:网站首页>Vant component library
Vant component library
2022-07-27 20:55:00 【Yuzhibo Linzhong Road】
install :
npm i [email protected] -S1. Complete introduction
//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. Introduce on demand
Installing a plug-in
npm i babel-plugin-import -D
# stay babel.config.js Middle configuration
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 './pluginsFor convenience , Import all
// 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)
}边栏推荐
- Xdc 2022 Intel technology special session: Intel Software and hardware technology builds the cornerstone of cloud computing architecture
- JVS公众号登陆配置
- [dataset display annotation] VOC file structure + dataset annotation visualization + code implementation
- 获取委托中注册的方法
- R语言使用t.test函数执行t检验验证总体均值是否是某个特定的值(从样本集推论总体均值)
- 基于ATX自动化测试解决方案
- People call this software testing engineer. You're just making a living (with HR interview Dictionary)
- VI working mode (3 kinds) and mode switching (conversion)
- 从0开始写bootloader
- 推荐一款强大的搜索工具Listary
猜你喜欢

IOU 目标跟踪其二:VIOU Tracker

LabVIEW学习笔记五:按钮按下后无法返回原状

未定义变量 “Lattice“ 或类 “Lattice.latticeEasy“(Matlab)

Swiftui view onReceive method receives "redundant" event resolution

Hexagon_V65_Programmers_Reference_Manual(6)

全局样式与图标

Innovative cases | the growth strategy of digitalization of local life services and upgrading of Gaode brand

Hexagon_V65_Programmers_Reference_Manual(5)

CPDA|如何拥有数据分析思维?

2022-07-19 advanced network engineering (XX) BGP route optimization, route optimization analysis one by one
随机推荐
Why does Alibaba prohibit more than three forms from joining?
R语言使用epiDisplay包的power.for.2p函数进行效用分析 ( 效能分析、Power analysis)、给定两个样本的比例值(proportions)、样本量计算效用值
IPv4/IPv6、DHCP、网关、路由
认识传输介质网络通信的介质
【Dart】一门为跨端开发而生的编程语言
LabVIEW学习笔记五:按钮按下后无法返回原状
Hexagon_V65_Programmers_Reference_Manual(9)
你了解数据同步吗?
Technology blog and tutorial
Hcip day 5
CPDA|如何拥有数据分析思维?
Nailing development document
Kingbasees heterogeneous database migration guide (3. Kingbasees migration capability support system)
Jetpack compose performance optimization guide - compilation metrics
【深度学习】Pytorch torch.autograd 自动差分引擎
How to improve the picture transmission speed and success rate in the development of IM instant messaging under the mobile network
[Numpy] 数组属性
Arduino development (II)_ RGB light control method based on Arduino uno development board
认识传输介质物理层概述
Users and permissions revoke user permissions