Taro學習手冊(五)—— 遇到的bug

記錄一下遇到的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)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章