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

  • 牛奶的增值税税率
  • 一般纳税人是否可以开普票
  • 出口应退税额如何计算
  • 车辆报废做账务处理依据的法规是
  • 现在开票还能用三方协议吗
  • 工资绩效被扣除怎么办
  • 个税专项扣除如何申报
  • 外国专家工资个税
  • 离境退税政策文件
  • 未能及时取得成功的成语
  • 小企业作废的发票怎么开
  • 银行代扣水电费要手续费吗
  • 法人转钱到公户是借款还是投资款
  • 发票超过2个月可以报销吗
  • 国家认定的高新技术企业是什么意思
  • 挂靠行为应当如何纳税?
  • 调整以前年度损益调整汇算清缴
  • 账上少了25元怎么做账
  • 出口退税的账务关键是什么
  • 企业收取的延期付款利息需要征消费税和增值税
  • 办理出口退税的流程
  • 支付宝国际驾照有效期是多久
  • 以前年度应收账款无法收回
  • 企业所得税汇算清缴扣除标准2023
  • 房地产企业如何结转成本
  • 企业所得税税款
  • win10电脑记事本在哪
  • mpd linux
  • 特兰西瓦尼亚的统一
  • 预付工程施工款会计分录
  • 常用的前端大屏软件
  • 微信公众号服务平台
  • 广告代理费收取比例
  • 财政拨款结转的二级科目有哪些
  • 经营租入固定资产账务处理
  • 质保金企业所得税纳税时间
  • 我们现在收到的礼物
  • 本地住宿费怎么做账
  • 其他应付款个人在贷方表示什么
  • 公司注销后如何追缴税款
  • mysql null+1
  • 现金发放工资会扣税吗
  • 年终奖个人所得税税率表
  • 双软企业的税收优惠政策新政策文件
  • show processlist
  • 企业计提五险一金会计分录怎么写
  • 存货盘点的方法有哪些
  • 汇兑记载事项及内容
  • 收入费用会计分录
  • 固定资产残值怎么做账务处理
  • 营业税金及附加怎么计算
  • 成品油发票如何下载库存
  • 发票冲红如何做账红字发票需要给购买方吗
  • 哪些费用是不可抵扣的
  • ca证书费用计入什么科目
  • 机械租赁带司机和不带司机的税率
  • 经营所得与劳务所得的直别
  • 公司打款账号模板图片
  • 固定资产实务训练题目及答案
  • 账簿设置方法
  • sqlserver附加数据库时出错,请单击消息中的超链接
  • mysql中的groupby
  • oracle教程入门
  • sql server常用
  • Windows Server 2003服务器安全设置
  • bios识别不了硬盘怎么回事
  • windows 安装app
  • linux ldt
  • centos6.5忘记密码
  • mcappins.exe - mcappins进程是什么文件 什么意思.
  • linux测试端口连接
  • win8系统怎么设置无线网连接啊
  • 安卓接入点
  • Bullet(Cocos2dx)之封装PhysicsWorld3D
  • js控制display属性
  • clipboard.js无需Flash无需依赖任何JS库实现文本复制与剪切
  • python中sort()的用法
  • nodejss
  • 权限android.permission.write
  • 附加税申报表怎么做
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设