摘要: 1.手机端调用window.print()方法无效,无论是在浏览器或者app中或者webview中,(可能有的手机浏览器可以)。 2.uniapp app端无法直接获取dom元素,,没有document对象,可使用renderjs处理,在app中只能使用原生的html元素如button(在元素上添加 阅读全文
posted @ 2021-08-04 18:00 申小贺 阅读(2645) 评论(0) 推荐(0) 编辑
摘要: JS将时间对象输出为(12小时制和24小时制)的字符串1、获取当前时间(12小时制和24小时制)var tempDate=new Date();// "Mon Sep 30 2019 20:38:03 GMT+0800 (中国标准时间)"var tempTimeStr12=tempDate.toLo 阅读全文
posted @ 2020-05-11 13:58 申小贺 阅读(2967) 评论(0) 推荐(1) 编辑
摘要: 1.获取H5的媒体对象 function hasUserMedia() { navigator.getUserMedia = navigator.getUserMedia || navigator.msGetUserMedia || navigator.webkitGetUserMedia || n 阅读全文
posted @ 2020-04-28 15:58 申小贺 阅读(1044) 评论(0) 推荐(0) 编辑
摘要: 1.laravel项目本地运行:php artisan serve 2.apache+laravel:使用了wampserver,但是项目在服务器上一直运行不出来,最后更改了laravel新版本,项目正常运行了。 3.nginx+laravel:其他文件可以访问,但php文件无法正常显示,在配置文件 阅读全文
posted @ 2020-04-07 09:43 申小贺 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 1.错误如下 主要原因是安全设置的问题: 首先执行git config http.sslVerify "false" 若出现下列错误 git config http.sslVerify "false" fatal: not in a git directory 再继续执行 git config -- 阅读全文
posted @ 2019-06-05 15:29 申小贺 阅读(497) 评论(0) 推荐(0) 编辑
摘要: 常见错误 1.RN项目一定要注意版本问题,无论是react native还是其他组件的版本都一定要注意,不然会报错。尽量不要使用太高的版本,会有很多的问题。基本上所有的错误如果你实在解决不了都可以通过降低版本解决。 新版本的react-native初始化的项目会有这个错误(当时是0.59以上的版本报 阅读全文
posted @ 2019-03-28 16:50 申小贺 阅读(675) 评论(0) 推荐(0) 编辑
摘要: 1。在iframe弹出层中,如何刷新父页面的数据表格,也就是调用父页面的 table.reload(); 一开始我在父页面使用 window.tableList = table.render(),然后在子页面使用parent.tableList.reload()。虽然parent.tableList 阅读全文
posted @ 2019-03-07 16:58 申小贺 阅读(996) 评论(0) 推荐(0) 编辑
摘要: 1.路由懒加载 路由懒加载 此方法会把原本打包到一个app.js文件分开成多个js文件打包,这样会减小单个文件的大小,但是不会减小整个js文件夹的大小。通过这种方式可以做到按需加载,只加载单个页面的js文件。 2.组件异步加载 组件异步加载 加载首页的时候,可以先给首页的子组件设置v-if = “f 阅读全文
posted @ 2019-01-03 11:30 申小贺 阅读(2767) 评论(0) 推荐(0) 编辑
摘要: 测试代码如下: 在PC端: 1.pc端无touch相关事件,所以touchstart,touchmove,touchend事件无响应。 2.点击子元素,因为需要先移动到元素上所以触发了mousemove事件并冒泡到父元素上,然后点击,依次出发mousedown并冒泡,触发mouseup并冒泡,触发c 阅读全文
posted @ 2018-12-21 11:55 申小贺 阅读(3305) 评论(0) 推荐(0) 编辑
摘要: indexedDB使用过程中的错误1: 这是由于你在success事件的回调中调用createObjectStore方法,该方法应该在upgradeneeded事件的回调中调用。 }request.onerror = (e) => {console.log('Can not open indexed 阅读全文
posted @ 2018-12-03 09:04 申小贺 阅读(1342) 评论(0) 推荐(0) 编辑