Taro学习手册(五)—— 遇到的bug

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/kelly0721/article/details/89420583

记录一下遇到的bug

  1. Picker 的选择框不是从底部弹出而是从 AtModal 中弹出
    1. 在使用Taro-ui时,想用 AtModal 做一个弹窗,但是这里有个需求就是,在这个弹窗中有下拉框的需求,本来想用 Picker 选择器,但是 Picker 无法在 AtModal 中,本来 Picker 的选择器应该是从页面的底部弹出,但是在 AtModal 中用了之后,是在 AtModal 中弹出,看了很多但还是找不到解决方法,最后我只能自己写一个弹窗了
  2. Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.(./pages/founding/founding.wxss:288:3)This wxss file is ignored.
    1. 这是因为 css 文件中的样式写错,使用rem,改成PX就好了(微信小程序中不能使用px,只能使用PX
  3. Cannot read property ‘toString’ of undefined
    1. 有个参数为空,无法使用 toString 转换成字符串
  4. Uncaught (in promise) {errMsg: “canvasToTempFilePath: fail canvas is empty”}
    1. Taro.canvasToTempFilePath ({}) 要指定上下文,改成这样就好了 Taro.canvasToTempFilePath ({}, this.$scope)

猜你喜欢

转载自blog.csdn.net/kelly0721/article/details/89420583
今日推荐