上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页
摘要: uni-app点击事件传参可以使用微信小程序的方式也可以是传统的js函数传参。主要看开发的项目中包不包含小程序 ###传统js传参,直接在函数中传参即可(这种方式适合开发的项目中不包含小程序时使用) <div @click="handleClick('大狗子')">点我</div> handleCl 阅读全文
posted @ 2020-05-25 10:44 huihuihero 阅读(1639) 评论(0) 推荐(0) 编辑
摘要: ##方案一:使用pdfjs插件将pdf嵌套在页面中的某个位置 ####提示: 1、不兼容IE及兼容模式下的360浏览器(极速模式可以兼容),以上浏览器请自行为用户设置不兼容提醒 2、canvas画布是浮动在页面元素之上的,请知悉 3、这里pdf文件由后端接口返回,如:http://192.168.1 阅读全文
posted @ 2020-05-14 14:05 huihuihero 阅读(4866) 评论(0) 推荐(0) 编辑
摘要: module.exports 或 exports,使用require方式引入 export default 或 export,使用import方式引入 阅读全文
posted @ 2020-05-08 09:05 huihuihero 阅读(910) 评论(0) 推荐(0) 编辑
摘要: ###GET import axios from 'axios' 1 getData(){ let config={ method:'GET', params:{ page:this.page, pagesize:this.pageSize, }, } axios(`${api.base}/getd 阅读全文
posted @ 2020-04-16 15:30 huihuihero 阅读(161) 评论(0) 推荐(0) 编辑
摘要: ####手机号 let regphone = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/; regphone.test(this.registerPhone) ####邮箱 let regemail 阅读全文
posted @ 2020-04-10 09:31 huihuihero 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 小程序不支持在css中使用本地文件,包括本地的背景图和字体文件。需以base64方式方可使用。App端在v3模式以前,也有相同限制。v3编译模式起支持直接使用本地背景图和字体。 微信小程序只支持网络路径和base64的图片。不支持相对路径引入的图片图片(真机不支持,开发工具支持),如有需要,大图片可 阅读全文
posted @ 2020-04-09 13:44 huihuihero 阅读(775) 评论(0) 推荐(0) 编辑
摘要: ###uni-app应用生命周期 ###uni-app部分页面生命周期 ###vue生命周期(注:这也是Uniapp组件的生命周期) ###uni-app页面生命周期与vue生命周期的对比 ######页面加载过程 加载 → 显示 → 加载完成 → 页面隐藏 → 页面卸载 ######uni-app 阅读全文
posted @ 2020-04-09 10:50 huihuihero 阅读(9291) 评论(0) 推荐(1) 编辑
摘要: 在main.js文件中配置: //Vue.prototype.$baseUrl="http://192.168.1.164/api" //线下接口 Vue.prototype.$baseUrl="https://m.demo.com/api" //线上接口 在demo.vue页面中请求: //GET 阅读全文
posted @ 2020-04-08 16:50 huihuihero 阅读(15067) 评论(9) 推荐(0) 编辑
摘要: ###先贴出uniapp官方icon的说明文档:https://uniapp.dcloud.io/component/uniui/uni-icons ####1、挑选iconfont图标,添加至项目中。并下载至本地 ####2、在项目static文件夹中新建iconfont文件夹,将下载文件中的ic 阅读全文
posted @ 2020-04-08 09:26 huihuihero 阅读(2017) 评论(0) 推荐(1) 编辑
摘要: ##方式一 <div class="content"> <div class="bg_img"> <img src="../../img/bg.png" /> </div> </div> .content { position: fixed; //关键是设置fixed定位,设置后即可通过height 阅读全文
posted @ 2020-03-31 10:24 huihuihero 阅读(187) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页