随笔分类 - uni-app问题
摘要:代码块存档 //扫描框 <view class="scanCodeBox"> <input class="inputContent" type="number" @blur="loseFocus" :disabled="false" :value="textValue" placeholder="请
阅读全文
摘要:父组件 uni.$on('update', function (data) { console.log('监听到事件来自 update ,携带参数 msg 为:' + data.msg); getListdata(resData.value); }) 子组件 function click(){ un
阅读全文
摘要:let wait = ref() function wait(){ //打开等待弹窗 wait.value = plus.nativeUI.showWaiting("正在连接蓝牙..."); // 2秒后更新等待对话框上显示的文字内容 setTimeout(function(){ w.setTitl
阅读全文
摘要:前提:uniapp的app端,用uni自带的toast,icon会自占一行,很丑 如图: 利用 plus.nativeUI.toast 显示正常大小的icon plus.nativeUI.toast( e,//提示文字 { type: 'text', duration: 'short', iconW
阅读全文
摘要:前提: uni自带的拍照插件不支持app使用 需要实现PDA拍照,并识别拍照内容,显示到文本框 uniapp的app端用不了tesseract.js ,因为nodejs没有blob,放弃前端识别文本 plus.camera.getCamera( index ); 指定要获取摄像头的索引值,1表示主摄
阅读全文
摘要:需求:按PDA的扫码键,把扫码内容填入input中 scanner.js 扫描工具类 let main; let filter; let receiver; let tag = false; /** * 开始广播监听扫码 */ const start = () => { /* #ifdef APP-
阅读全文
摘要:A页面跳转B页面 A页面 function toDetail(value) { console.log('click'); let chuansVal = encodeURIComponent(JSON.stringify(value)); console.log(chuansVal); uni.n
阅读全文
摘要:A页面跳转到B页面,传参过去 A页面method //点击进入明细 toDetail() { console.log('click') let val = encodeURIComponent(JSON.stringify(this.detailData[0])) uni.navigateTo({
阅读全文
摘要:在uniapp中使用axios请求接口,利用mock接口获取数据 在微信小程序运行时出错:index.js? [sm]:33 errortypeerror: l is not a function 原写法(在微信小程序不生效) import axios from 'axios'; let _url
阅读全文
摘要:node-sass 6.0.0版本与^4.0.0不兼容 1、先卸载之前版本的node-sass npm uninstall node-sass 2、卸载后安装4.0.0版本 npm install node-sass@4.14.1 这里可能会失败,原因是你安装的淘宝镜像的问题。 如果失败了就重装淘宝
阅读全文
摘要:存档备用 orderList:{ return(){ this.orderList.filter((item)=> item.state '2'); } }
阅读全文
摘要:一、不同方式创建uniapp的区别 通过cli命令创建出来的uniapp可以在任意编译器(vscode、webstorm等)利用npm run serve或npm run dev:h5运行 通过hbuilder创建的uniapp不可以在其他编译器运行(尝试过迁移项目,失败,会出现插件缺失或路径等各种
阅读全文
摘要:按ctrl+alt+L格式化后,rpx单位前会出现空格,导致样式失效 解决方法: 在 设置-->工具-->File Watchers 配置 Progress位置为sed的所在位置 sed的下载路径(适用windows10 x64):https://gitee.com/Leexinxian/littl
阅读全文
摘要:存档备用 =A= <template> <view> <view> <image class="img-style" :src="src" alt="demoImg" @click="previewImg()" ></image> </view> </view> </template> <scrip
阅读全文
摘要:uniapp 使用<image>标签显示不了图片 主要是src路径问题!!! 若在页面中直接引用,可以正常显示 <image class="img-style" src="../static/logo.png" alt="Img" ></image> 若在组件中引用,当src为静态时直接引用组件的相
阅读全文

浙公网安备 33010602011771号