随笔分类 - uni-app
摘要:1.其实是个组件页面,移过来就行了。 2.原有组件中,可视区域和截图结果区域的长宽是一样的,所以需要调整一下; 3.因为剪切图片,是在一个单独页面实现的.所以pages.json中需要加上剪切的页面路径; pages.json { "path": "components/u-avatar-cropp
阅读全文
摘要:u-button组件里:customStyle="样式数据名" 在data里申明样式数据名,形式为对象,注意值要加引号,且有-的只要改为驼峰命名如border-Radius 例如: //html <u-button :customStyle="btnGetCode"></u-button> //js
阅读全文
摘要:<template> <view class="imgcon"> <image src="/static/music.png" :class="[muteBgMusic ? '' : 'music']" @click="playMusic" mode="aspectFill" ></image> <
阅读全文
摘要:通过改变current,自动切换 <template> <view class="page"> <swiper class="swiper" :vertical="true" :current="current" @tap="switchNext"> <swiper-item> <view clas
阅读全文
摘要:在微信小程序中使用rpx可以解决屏幕宽度的兼容问题 但是设置高度的时候还是会有问题 为了解决宽度的兼容问题,在微信小程序中可以使用了rpx像素单位来进行设置,不管屏幕的宽度大小是多少, 都认为宽度有750rpx 这样即使屏幕大小不一样 使用了rpx单位来设置的样式比例也是一样的。 这样屏幕宽度和rp
阅读全文
摘要:mode 有效值: mode 有 13 种模式,其中 4 种是缩放模式,9 种是裁剪模式。 设置height:auto, mode="widthFix" 就行咯~~~ https://blog.csdn.net/qq_40095973/article/details/80352144
阅读全文
摘要:小程序转发,得用button,样式太丑了, <view class="one"> <button data-name="shareBtn" open-type="share" hover-class="none"> <image src="/static/index/carddetail/sendc
阅读全文
摘要:https://www.codenong.com/cs109827730/
阅读全文
摘要:<template> <scroll-view class="scroll-view" scroll-y @scroll="onPageScroll"> <div class="one">one</div> <div class="two">two</div> <div class="three">
阅读全文
摘要:现在看手册,都支持多层嵌套的。那是新版本更改bug后的。 uview老版本 这样的问题版本不更新,可能只能绕开!!! https://gitee.com/umicro/uView/issues/I2AYUY
阅读全文
摘要:uni.showModal({ title: '提示', content: '这是一个模态弹窗', success: function (res) { if (res.confirm) { console.log('用户点击确定'); } else if (res.cancel) { console
阅读全文
摘要:安卓下载 exportPDF(url) { // url 未pdf,word文件可以打开的链接 const a = document.createElement("a"); a.href = url; a.target="_blank"; a.download = "download"; a.cli
阅读全文
摘要:相信大家和我一样,在开发中总是遇到一个问题。 为啥我修改v-for遍历的数组,视图却没有更新???当我点击其他操作重新渲染后,又更新了???这不会是vue出bug了吧 这项问题其实正是由vue的双向绑定造成的,vue在2.x的版本中还在使用defineProperty方法,这就是defineProp
阅读全文
摘要:changeAccidentType(e){ console.log('e:',e); console.log(e.detail.data) this.form.accidentType = [] e.detail.data.forEach((item,index) => { console.log
阅读全文
摘要:最近弄安卓开发,uniapp,开发,微信小程序无任何报错, 但安卓端,报错,而且,一个错误会再报很多不相干的错误; 并不会显示代码具体报错的行数。排查费劲!!! [Vue warn]: Error in render: "TypeError: Cannot read property 'length
阅读全文
摘要:最近接手了一个项目,登录用户信息都放全局变量里面的,用法和之前有所不同 a页面定义 uni.test = 'testval' b页面可以直接获取得到 console.log(uni.test) // 也可以存多个对象 页面一刷新就销毁了,调试非常不方便,而且整体项目中没有统一管理的地方
阅读全文
摘要:uni-forms 有个属性 :labelWidth="数字" 就ok了 <u-form :model="form" ref="uForm"> <u-form-item label="姓名" :labelWidth='140'> <u-input v-model="name" /> </u-form
阅读全文
摘要:uni.authorize is not a function 请问这个是为什么 错误提示:“errMsg”: "getLocation:fail [geolocation:7]KEY错误 请到http://lbs.amap.com/api/android-location-sdk/guide/ut
阅读全文
摘要:打包界面 https://www.cnblogs.com/moranjl/p/15743649.html 用安卓调试一些授权配置, https://blog.csdn.net/weixin_43881345/article/details/116708087 有模拟安卓手机的编辑器的 https:/
阅读全文
摘要:关于新接手项目,或者复制新部署项目,uni-app的应用标识appid是否变更,及其影响 使用场景 云打包 DCloud 根据 appid 来判断用户是否有权限进行云打包。既不是所有者、又不是协作者,就无法打包; 打包后的原生应用根据 appid 来管理本地资源。每个appid有独立的沙盒,存储是隔
阅读全文