位置: IT常识 - 正文

uniapp项目中引入vant-Weapp(局部全局都有 史上最详细的方法)(uniapp引入bootstrap)

编辑:rootadmin
uniapp项目中引入vant-Weapp(局部全局都有 史上最详细的方法)

推荐整理分享uniapp项目中引入vant-Weapp(局部全局都有 史上最详细的方法)(uniapp引入bootstrap),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:uniapp引入vuex,uniapp引入bootstrap,uniapp引入jssdk,uniapp引入组件,uniapp引入axios,uniapp引入外部css,uniapp引入组件,uniapp 引入外部js,内容如对您有帮助,希望把文章链接给更多的朋友!

1.先在根目录创建wxcomponents文件夹

2.打开 https://github.com/youzan/vant-weapp 下载最新的vant-Weapp

 3.把我们下好的文件vant-weapp里面只留下dist其余的可以全部删掉,然后把vant-weapp放到 wxcomponents里面

4.在App.vue引入vant样式

@import '/wxcomponents/vant-weapp/dist/common/index.wxss'

5.然后在pages.json引入(局部引入)

uniapp项目中引入vant-Weapp(局部全局都有 史上最详细的方法)(uniapp引入bootstrap)

"usingComponents": {                   "van-button": "/wxcomponents/vant-weapp/dist/button/index"                 }

6. 然后在页面引入button(注意:你在当前页面引入了button其他的页面没有引入,其他页面就用不了,其他页面想用,就得在path相应的路径引入)

 7.这个时候页面会报错,注意:(重新启动项目即可)

 8.然后就可以看到页面的组件出来了

 9.下面是全局引入

 10.分享一些常用的组件你们直接复制到你的usingComponents下面页面就可以直接用了

"usingComponents": { //这里为方便,全局引入了所有组件,也可以在某个page下单独引用某个组件 "van-action-sheet": "/wxcomponents/vant-weapp/dist/action-sheet/index","van-area": "/wxcomponents/vant-weapp/dist/area/index",// "van-badge": "/wxcomponents/vant-weapp/dist/badge/index",// "van-badge-group": "/wxcomponents/vant-weapp/dist/badge-group/index","van-button": "/wxcomponents/vant-weapp/dist/button/index","van-card": "/wxcomponents/vant-weapp/dist/card/index","van-cell": "/wxcomponents/vant-weapp/dist/cell/index","van-cell-group": "/wxcomponents/vant-weapp/dist/cell-group/index","van-checkbox": "/wxcomponents/vant-weapp/dist/checkbox/index","van-checkbox-group": "/wxcomponents/vant-weapp/dist/checkbox-group/index","van-col": "/wxcomponents/vant-weapp/dist/col/index","van-dialog": "/wxcomponents/vant-weapp/dist/dialog/index","van-field": "/wxcomponents/vant-weapp/dist/field/index","van-goods-action": "/wxcomponents/vant-weapp/dist/goods-action/index","van-goods-action-icon": "/wxcomponents/vant-weapp/dist/goods-action-icon/index","van-goods-action-button": "/wxcomponents/vant-weapp/dist/goods-action-button/index","van-icon": "/wxcomponents/vant-weapp/dist/icon/index","van-loading": "/wxcomponents/vant-weapp/dist/loading/index","van-nav-bar": "/wxcomponents/vant-weapp/dist/nav-bar/index","van-notice-bar": "/wxcomponents/vant-weapp/dist/notice-bar/index","van-notify": "/wxcomponents/vant-weapp/dist/notify/index","van-panel": "/wxcomponents/vant-weapp/dist/panel/index","van-popup": "/wxcomponents/vant-weapp/dist/popup/index","van-progress": "/wxcomponents/vant-weapp/dist/progress/index","van-radio": "/wxcomponents/vant-weapp/dist/radio/index","van-radio-group": "/wxcomponents/vant-weapp/dist/radio-group/index","van-row": "/wxcomponents/vant-weapp/dist/row/index","van-search": "/wxcomponents/vant-weapp/dist/search/index","van-slider": "/wxcomponents/vant-weapp/dist/slider/index","van-stepper": "/wxcomponents/vant-weapp/dist/stepper/index","van-steps": "/wxcomponents/vant-weapp/dist/steps/index","van-submit-bar": "/wxcomponents/vant-weapp/dist/submit-bar/index","van-swipe-cell": "/wxcomponents/vant-weapp/dist/swipe-cell/index","van-switch": "/wxcomponents/vant-weapp/dist/switch/index",// "van-switch-cell": "/wxcomponents/vant-weapp/dist/switch-cell/index","van-tab": "/wxcomponents/vant-weapp/dist/tab/index","van-tabs": "/wxcomponents/vant-weapp/dist/tabs/index","van-tabbar": "/wxcomponents/vant-weapp/dist/tabbar/index","van-tabbar-item": "/wxcomponents/vant-weapp/dist/tabbar-item/index","van-tag": "/wxcomponents/vant-weapp/dist/tag/index","van-toast": "/wxcomponents/vant-weapp/dist/toast/index","van-transition": "/wxcomponents/vant-weapp/dist/transition/index","van-tree-select": "/wxcomponents/vant-weapp/dist/tree-select/index","van-datetime-picker": "/wxcomponents/vant-weapp/dist/datetime-picker/index","van-rate": "/wxcomponents/vant-weapp/dist/rate/index","van-collapse": "/wxcomponents/vant-weapp/dist/collapse/index","van-collapse-item": "/wxcomponents/vant-weapp/dist/collapse-item/index","van-picker": "/wxcomponents/vant-weapp/dist/picker/index" }

以上就是局部全局的方法啦,记得点个赞

本文链接地址:https://www.jiuchutong.com/zhishi/287168.html 转载请保留说明!

上一篇:Narrenmuehle(愚人磨坊风车),德国Dülken (© dpa picture alliance/Alamy)(愚人二部曲)

下一篇:Vite处理html模板插件之vite-plugin-html(html visit)

  • 印花税征税对象包括哪些
  • 企业所得税税前扣除管理办法
  • 个体工商户月销售额超10万怎么报税
  • 个人独资企业可以核定征收吗
  • 坏账准备计入营业外支出还是资产减值损失
  • 纳税人的住房租金专项附加扣除标准有
  • 企业构建固定资产支付的现金应列示在现金流量表
  • 反写了可以重新申报吗
  • 维修汽车费用
  • 计算产品当月生产成本
  • 城市维护建设税属于什么科目
  • 房产继承是不是谁照顾谁的
  • 常见的会计凭证有哪些
  • 公司利润如何提取避税
  • 应扣未扣税款向谁追缴
  • 减免税款是否要结转到未交增值税?
  • 外经证预缴税填不含税金额吗
  • 应收账款的周转率怎么算
  • 票开了但是没有发票
  • 增值税是什么鬼
  • 累计结转是什么意思
  • 物流公司怎么进去工作的
  • 软件公司客户经理一般月薪多少
  • 什么是增值税
  • 怎样打开电脑wifi连接
  • 物权请求权是什么意思
  • 2020快手怎么删除
  • win11任务管理器在哪里打开
  • win7系统咋样
  • 联想笔记本在bios中怎么把图标和字变大
  • u盘安装win8系统步骤
  • IE浏览器如何取消全屏
  • PHP:Memcached::getOption()的用法_Memcached类
  • php常用设计模式(大总结)
  • php基本操作
  • 个人所得税申报流程图
  • 租入固定资产改良支出属于资本性支出吗
  • promise async区别
  • echarts中的legend能被监听吗
  • eterm指令退出a
  • 以旧换新方式销售金银首饰的消费税处理
  • 购买二手设备
  • 税务已注销工商如何注销
  • 小规模纳税人都报什么税
  • 收到以前年度增值税退税账务处理怎么做账
  • 安全生产费用收取方案
  • 留抵增值税怎么填列
  • 物流公司过户给我需要做什么
  • 销售产品领用单独计价的包装物2000元,售价2400元
  • 职工教育经费还有什么经费
  • 特殊销售方式下销售额的确定
  • 销售回款率怎么计算,麻烦知道的告诉我,11
  • 参加会议正常应该交多少钱
  • 银行存款日记账模板
  • 商业企业可将商品分为哪三类
  • sql查询树形结构
  • 阿拉伯数字转大写函数
  • mysql存储过程判断输入判断类型
  • windows后台启动VirtualBox虚拟机让界面不在出现
  • win10装360安全卫士
  • win7系统如何创建新用户
  • centos 7 远程桌面
  • centos yum 命令
  • fsc文件用什么软件打开
  • linux中fdisk -l
  • linux init1
  • win7专用字符编辑程序的使用方法
  • android怎么添加按钮
  • Access to the path "LibraryUnityAssembliesUnityEngine.xml" is denied.
  • cocos-2dx
  • dos批命令
  • nodejsorg
  • 浅谈如何培养孩子的注意力
  • diy相册设计
  • js的实现原理
  • 异步promise原理
  • python怎么写函数
  • 发票一年可以开多少
  • 视频号带货个人和个体工商户的区别
  • 电子税务局网页版
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设