var data = res.data
          var content = data.content
          if (content !== '') {
            // 替换富文本为rem
            content = data.content.replace(/(\d+)px/g, function(s, t) {
                s = s.replace('px', '');
                var value = parseInt(s) * 0.01; // 100px = 1rem
                return value + "rem";
            });
          }     

 

相关文章:

  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案