摘要: 分享一个前端拿到数据后,自己生成分页的案例,案例如图显示,点击搜索后查询数据,显示数据列表,前端根据数据显示正确的分页 附上代码:代码附上,简单粗暴,自己用过的,兼容性好,没有封装,可以很好的分页原理,希望可以帮助到大家 html排版如下: js代码如下:每一步操作都有注释 阅读全文
posted @ 2019-06-24 10:27 zhang305 阅读(38563) 评论(11) 推荐(3) 编辑
摘要: vue html 代码 <div id="printArea" ref="printArea" class="printArea"> <div class="positiveItem"> <img :src="idCardImg01"> </div> <div class="printBtn"> < 阅读全文
posted @ 2022-12-12 09:39 zhang305 阅读(64) 评论(0) 推荐(0) 编辑
摘要: midButton没有pagePath,需监听点击事件调用API:uni.onTabBarMidButtonTap 官方文档如下注:list必须是偶数 uni.onTabBarMidButtonTap只支持app,所以使用midButton需要跳转的话,记得加上条件判断 pages.json配置如下 阅读全文
posted @ 2022-10-27 11:05 zhang305 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 使用vue3.0时,因为底层是使用proxy进行代理的所以当我们打印一些值得时候是proxy代理之后的是Proxy对象,Proxy对象里边的[[Target]]才是真实的对象。 第一种获取target值的方式:通过vue中的响应式对象可使用 toRaw() 方法获取原始对象 //第一种获取targe 阅读全文
posted @ 2022-09-13 15:25 zhang305 阅读(4095) 评论(0) 推荐(0) 编辑
摘要: 代码 <video id="screenVideo" ref="video" :muted='muted' :src="videoSrc" webkit-playsinline="false" x-webkit-airplay="allow" x5-video-player-type="h5" x5 阅读全文
posted @ 2022-07-29 11:46 zhang305 阅读(983) 评论(0) 推荐(0) 编辑
摘要: 某前端工程在 麒麟V0 系统环境中运行 yarn electron:serve 命令时出现如下错误 解决方案 在终端按顺序执行下面两个命令即可解决问题 echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && 阅读全文
posted @ 2022-07-29 10:55 zhang305 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 当我在虚拟机中安装好Ubuntu16.04 64位的时候,发现无法进入全屏模式,尝试了这个方法可以解决。虚拟机系统是麒麟v10 第一: 执行下面操作 xrandr -s 1920*1080 如果提示为 Size index 1920 is too large, there are only 19 s 阅读全文
posted @ 2022-06-22 15:58 zhang305 阅读(510) 评论(0) 推荐(0) 编辑
摘要: UI组件库 element https://element.eleme.cn/#/zh-CN vant https://youzan.github.io/vant/#/zh-CN/ View UI www.iviewui.com/ ant design ant.design/index-cn 没用过 阅读全文
posted @ 2022-06-13 15:55 zhang305 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 这是一个排序数组: [15, 24, 30, 48, 49, 64, 86, 90, 100, 121, 130] function binarySearch(arr, x) { // left index of the current interval let l = 0; // right in 阅读全文
posted @ 2022-06-13 14:56 zhang305 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 我们有一个需要排序的数组: let arr = [86, 24, 64, 48, 15, 30, 90, 49] 首先,定义一个参数为数组的快速排序函数。 var quickSort = function(arr) {}; 然后,检查数组中的元素个数,如果小于等于 1,则返回。 var quickS 阅读全文
posted @ 2022-06-13 14:52 zhang305 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 方法1: const electron = require('electron') const Menu = electron.Menu function createWindow (){ Menu.setApplicationMenu(null) } 方法2: new BrowserWindow( 阅读全文
posted @ 2022-05-26 10:51 zhang305 阅读(1240) 评论(0) 推荐(0) 编辑