位置: 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)

  • 兴业银行汇款手续费
  • 设计印刷合同
  • 销项税转出是啥意思
  • 价外费用纳税义务发生时间
  • 养猪场死猪处理方法
  • 企业收到银行汇票退回的多余款项
  • 个税上个月没报下个月累计会怎么样
  • 购货方要求退货合理吗
  • 哪些纳税人需要实名办税
  • 无偿捐赠设备该如何做账务处理呢?
  • 调增教育经费如何做账
  • 电费发票可以抵扣进项吗
  • 税会差异例子
  • 培训费是否能全额退款
  • 公司注销要给钱吗
  • 期初未缴税额和期末未缴税额
  • 工程类劳务发票
  • 第一次申领发票可以增额吗?
  • win7 右键 没反应怎么办
  • 退回的发票怎么处理
  • 记账凭证摘要的填写要求有
  • 私立幼儿园收费归哪个部门管
  • php utf8转unicode
  • 微信企业公众号开发平台
  • 交增值税还交营业税吗
  • linux vim
  • 公司已开票给客户,但客户未打款怎么办?
  • 进出口商品的税率是多少
  • 可抵扣增值税有哪些
  • wordpress开发app
  • 进项税可以留底多长时间
  • 劳务费开发票后还需要交个税吗
  • 利润分配怎样做分录
  • Spring Security(七)-- AuthenticationProvider
  • wordpress文章主题
  • vue-echarts
  • 企业所得税报表模板
  • 贷款利息发票可以随便开吗
  • 帝国cms文件夹介绍
  • sqlloader-350错误
  • Python可变数据类型和不可变数据类型
  • python字符串类型及操作
  • 一般纳税人差额纳税
  • 商场超市收银员每日工作流程
  • 营业执照变更需要本人到场吗
  • 企业所得税年度纳税申报表A类怎么填
  • 固定制造费用需要逐项进行预计通常与本期产量无关
  • 企业预付款属于负债吗
  • 营改增后建筑劳务分包开票一般几个点
  • 管理费用月底结转吗
  • 银行存款的收付应严格执行()的规定
  • 建设项目开办费包括哪些
  • 凭证扣除 28号
  • 固定资产的建造成本怎么计算
  • 被征用的不动产或者动产使用后应当怎样
  • mysql8设置时区
  • mysql怎么备份数据库命令
  • 批量替换多个wps文档的内容
  • 修改远程桌面端口后,远程桌面连不上
  • grub修复引导windows10
  • win10电脑去掉快捷箭头百度经验
  • winxp远程桌面
  • win8开机进不了桌面
  • 在linux操作系统中
  • windows 8 key
  • opengl csdn
  • 百分比的介绍
  • 关于加载失败壁纸
  • 背包设备
  • 为什么你应该使用手机
  • jQuery实现ajax调用WCF服务的方法(附带demo下载)
  • [置顶]电影名字《收件人不详》
  • unity人物面板
  • Javascript & DHTML 实例编程(教程)(三)初级实例篇1—上传文件控件实例
  • jQuery ajax提交Form表单实例(附demo源码)
  • javascript面向对象精要
  • jquery技巧
  • 核定征收怎么计算税额
  • 查询完毕
  • 税务局取消办税人员
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设