当前位置:网站首页>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)
}边栏推荐
- Software test interview question: count the number in a queue, how many positive numbers and how many negative numbers, such as [1, 3, 5, 7, 0, -1, -9, -4, -5, 8]
- Analysis on the optimization of login request in IM development of instant messaging mobile terminal
- Recognized by international authorities! Oceanbase was selected into the Forrester translational data platform report
- Hcip day 5
- R语言使用lm函数构建多元回归模型(Multiple Linear Regression)、并根据模型系数写出回归方程、使用deviance函数计算出模型的残差平方和
- Openresty Lua resty DNS domain name resolution
- IPv4/IPv6、DHCP、网关、路由
- 力扣解法汇总592-分数加减运算
- R语言dplyr包summarise_at函数计算dataframe数据中多个数据列(通过向量指定)的计数个数、均值和中位数、使用list函数指定函数列表(使用.符号和~符号指定函数语法purr)
- 程序中的地址如何转换?
猜你喜欢

IOU 目标跟踪其二:VIOU Tracker

Swiftui view onReceive method receives "redundant" event resolution

Babbitt | metauniverse daily must read: Tencent News suspended the sales service of digital collections, users left messages asking for a "refund", and phantom core also fell into the dilemma of "unsa

品牌列表案例
Rk3399 platform development series explanation (process part) 15.36, understanding process and collaboration process

Hexagon_V65_Programmers_Reference_Manual(7)

People call this software testing engineer. You're just making a living (with HR interview Dictionary)

Xdc 2022 Intel technology special session: Intel Software and hardware technology builds the cornerstone of cloud computing architecture
![[numpy] array properties](/img/eb/a27c24deeb7951828cdfbaa88c059c.png)
[numpy] array properties
![[program life]](/img/68/9a337d37490ad5cd75095cc5efd5e4.jpg)
[program life] "stage summary" - unwilling to be ordinary
随机推荐
JVs privatization deployment start failure handling scheme
R语言使用epiDisplay包的power.for.2p函数进行效用分析 ( 效能分析、Power analysis)、给定两个样本的比例值(proportions)、样本量计算效用值
openresty lua-resty-dns 域名解析
LabVIEW学习笔记五:按钮按下后无法返回原状
金仓数据库 Oracle至KingbaseES迁移最佳实践(2. 概述)
[program life] "stage summary" - unwilling to be ordinary
vi工作模式(3种)以及模式切换(转换)
MySQL基本查询和运算符
Where is the program?
go --- air自动重新编译
Software test interview question: count the number in a queue, how many positive numbers and how many negative numbers, such as [1, 3, 5, 7, 0, -1, -9, -4, -5, 8]
用户和权限限制用户使用资源
推荐一款强大的搜索工具Listary
MYSQL设计优化生成列
[dart] a programming language for cross end development
认识网络模型数据的封装和解封装
关于栈迁移的那些事儿
Hexagon_V65_Programmers_Reference_Manual(7)
2022-07-19 网工进阶(二十)BGP-路由优选、路由优选逐条分析
R语言dplyr包summarise_at函数计算dataframe数据中多个数据列(通过向量指定)的计数个数、均值和中位数、使用list函数指定函数列表(使用.符号和~符号指定函数语法purr)