上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: 建代码书写规则: 1, 代码格式化,属性排列方式,用换行的方式显示,而不是一行展示的方式。代码清晰,有层次段落感。 2,控制台提交的警告 尽量发布之前处理。有利于后期成员维护和开发。 3,if 条件语句,出现多个 if 语句,或者 else。可以在 if 中添加 return 返回语句。代码逻辑清晰 阅读全文
posted @ 2026-01-05 10:17 微宇宙 阅读(4) 评论(0) 推荐(0)
摘要: 设置点击,跳转到页面的指定位置的方式。 在下面的 scroll-into-view属性设置 v_id 值,就会跳转到指定 id 数据的位置。其中id开头不能是数字。 <scroll-view scroll-y="true" scroll-into-view="{{v_id}}" scroll-wit 阅读全文
posted @ 2026-01-04 17:25 微宇宙 阅读(6) 评论(0) 推荐(0)
摘要: 设置菜单栏的时候,需要设置选择和默认状态的图标,此时图标最佳的尺寸比例是 44 * 44 像素的长宽高。画布比例固定,内部的图片尽量高度小一点,这样才能和上面有一定的间距,不会显得太距顶。 阅读全文
posted @ 2026-01-04 11:34 微宇宙 阅读(7) 评论(0) 推荐(0)
摘要: 打开小程序,在右上角点击分享的方式。如下 onShareAppMessage: function () { const promise = new Promise((resolv) => { const title = '内容'; const path = 'http://xxxxxx?params 阅读全文
posted @ 2025-12-31 10:20 微宇宙 阅读(11) 评论(0) 推荐(0)
摘要: 递归多级的树形结构,用二位数组展示和收缩的 planList2: [ { name: '第一个', value: '1', pid: 0, // 父级 = 关联上一个级别 current: 123456, // 当前 = 唯一值 leftIndex: 0, // 缩进位移 primary: 1 // 阅读全文
posted @ 2025-12-16 13:48 微宇宙 阅读(35) 评论(0) 推荐(0)
摘要: arr.reduce(callback,[initialValue])。call回调函数,他是多个数组方法的组合。 callback(init, curr, index, arr) curr和index 有map循环处理功能,arr 拥有array原始数组项,init 找到上一次的返回结果。 let 阅读全文
posted @ 2025-12-11 10:42 微宇宙 阅读(6) 评论(0) 推荐(0)
摘要: 设置标题自定义得方式。在.json文件上设置这个属性。 { "navigationStyle": "custom", } 封装navbar组件。 <template> <view class="lxy-nav-bar" :style="' height: ' + Allheight + 'px; ' 阅读全文
posted @ 2025-12-04 14:42 微宇宙 阅读(14) 评论(0) 推荐(0)
摘要: 如i果要封装图表组件,可以基于这个案例,每次传入的是一个对象即可。 import * as echarts from '../echarts'; this.ecComponent = this.selectComponent('#chart'); this.ecComponent.init((can 阅读全文
posted @ 2025-12-03 15:29 微宇宙 阅读(4) 评论(0) 推荐(0)
摘要: 如何调用微信 小程序 自动拨打电话功能 bindtapCall: function (e) { let phoneNumber = this.data.telephone; if (phoneNumber) { wx.makePhoneCall({ phoneNumber, }); } }, 阅读全文
posted @ 2025-11-24 11:28 微宇宙 阅读(9) 评论(0) 推荐(0)
摘要: 页面代码: <picker mode="date" fields="month" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange"> <view class="picker"> 当前选择: 阅读全文
posted @ 2025-11-20 16:58 微宇宙 阅读(32) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 8 下一页