【小程序】踩坑记录(待续。。。)

【小程序】踩坑记录

2018-10-11

  1. WePY 1.x 版本中,组件使用的是静态编译组件,即组件是在编译阶段编译进页面的,每个组件都是唯一的一个实例,目前只提供简单的 repeat 支持。不支持在 repeat 的组件中去使用 props, computed, watch 等等特性。
    参考: https://tencent.github.io/wepy/document.html#/?id=存在的问题
  2. 子元素继承父元素透明度解决: 父元素 background: rgba(0,0,0,0.7)
  3. 事件传递从内向外,由子元素传向父元素(和Android中事件传递相反),默认事件冒泡,可通过@tap.stop 拦截
  4. 相对布局实现:父布局:position: relative; 子布局: position: absolute
  5. 组件 components 中 data 内的字段可**直接通过 {{字段名}}**使用,不需 this.

2018-10-24

wepy使用mixin混合,onload事件响应:
打印日志证明:先执行混合对象的onLoad页面事件,再执行组件本身的onLoad事件。
经过试验,onLoad事件的回调,和组件中声名
mixins = [ mixin1, mixin2]
的顺序有关,在前的先执行,依次执行完毕后,才会执行组件自身的onLoad回调。

已提到小程序社区,待解答
https://developers.weixin.qq.com/community/develop/doc/0004e0659e8f60d4ff872012456000

小程序码参数解析

小程序开发工具,选择通过二维码编译;
在App.onShow(options)中打印参数如下:

 {"path":"custom/package/package","query":{"scene":"210561493!12345"},"scene":1047,"referrerInfo":{}}

在Page.onLoad(options)中打印参数如下:
onload--options:{"scene":"210561493!12345"}  
// 注意scene最大长度为32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~

解析参数:
onLoad:function(options){
  if(options.scene){
    let scene=decodeURIComponent(options.scene);
    let productId=options.scene.split("!")[0];   //  ! 数据分割符
    let p=options.scene.split('!')[1];
  }
}


即:把"query"的值作为参数传到onLoad()方法中

小乌龟安装向导提前结束可能是由于安装过程中出现了错误或者中断导致的。根据引用\[3\]中提到的解决方法,你可以尝试以下步骤来解决这个问题: 1. 找到Git的安装目录,其中应该有一个名为"Languages"的文件夹。 2. 删除"Languages"文件夹。 3. 重新运行小乌龟的安装向导。 4. 在安装界面中选择中文语言包。 5. 完成安装后,打开小乌龟的设置,将语言设置为中文。 这样应该能够解决小乌龟安装向导提前结束的问题。希望对你有帮助! #### 引用[.reference_title] - *1* [【小乌龟安装-已完结】](https://blog.csdn.net/weixin_47416539/article/details/124609971)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [git安装与使用,未完待续... ...](https://blog.csdn.net/flywithcan/article/details/122164654)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [GIT中文语言包TortoiseGit-LanguagePack安装闪退解决方法](https://blog.csdn.net/hung_jun/article/details/120155470)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值