Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

各种坑...... #16

Open
itboos opened this issue May 9, 2018 · 3 comments
Open

各种坑...... #16

itboos opened this issue May 9, 2018 · 3 comments

Comments

@itboos
Copy link
Owner

itboos commented May 9, 2018

微信小程序 里面 atob 方法不存在, 同时也没有错误提示, 导致base64解密失败:

解决办法: 引入第三方的实现:

  1. https://github.com/dankogai/js-base64 这个库存在问题,部分数据解密失败(可能有的数据转换不了)
  2. https://github.com/MaxArt2501/base64-js/blob/master/base64.js 这个解决了问题
    有空还是得深入了解原理
  3. cover 文字的换行问题 , 默认是不换行的,
    官方文档-换行问题
 wrap-line {
    word-break: break-all; 
    word-wrap: break-word;
    white-space: pre-line;
 }
行高还是有问题
@itboos
Copy link
Owner Author

itboos commented Sep 20, 2018

.vue 里面设置背景图片
vue 里面设置背景图片

  export default {
    name: 'productdetailspage',
    data() {
        return {
            note: {
            backgroundImage: "url(" + require("../../assets/save.png") + ")",
            backgroundRepeat: "no-repeat",
            backgroundSize: "25px auto",
            marginTop: "5px",
          },
     }
 },
 需要绑定的地方:  <div class="note" :style ="note"></div>

@itboos
Copy link
Owner Author

itboos commented Mar 4, 2019

IOS 12.03 微信7.03 fixed 弹窗input 输入后点击事件失效

问题描述:
I0S 12.3 fixed 弹窗input 输入后, 弹窗里其它DOM元素点击事件失效

原因:
此系统的微信版本 fixed 布局 导致蒙层没有拉下来,导致点
击事件失效(即点击的位置并不是DOM元素的真实位置,真实位置在点击的上面),弹窗设置成absolute布局可以明显看出问题

   <input type="number"  placeholder = { hoderText } pattern="\d*"
                  value = { this.state.num } 
                  onChange = { this.onInputChange }
                  onBlur = { this.handleBlur }
            />
  handleBlur () {
    window.scrollTo(0,0);
  }

解决方案:
既然是 输入框输入元素后,导致弹窗的Dom元素在上面,没有拉下来,所以,失去焦点后手动滚动条滚动到页面顶部, 让弹窗回到正常的位置,点击生效

@itboos
Copy link
Owner Author

itboos commented Nov 18, 2020

npm install fail npm 安装依赖失败 verbose unsafe-perm in lifecycle true

问题描述: 在项目 里 安装依赖时, 依赖安装失败
原因: unsafe-perm 被设置为 true, 已非 ```root``身份安装依赖会报错
解决方法:

npm config set unsafe-perm true which will override the default unsafe-perm config

参考:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant