ソースを参照

优化客服组件的rpx计算

萤火科技 4 年 前
親
コミット
e61cbbdb29
1 ファイル変更、3 行追加、3 行削除
  1. 3 3
      components/page/service/index.vue

+ 3 - 3
components/page/service/index.vue

@@ -19,7 +19,7 @@
 </template>
 
 <script>
-  const rpx = uni.getSystemInfoSync().windowWidth / 750
+  import { rpx2px } from '@/utils/util'
 
   export default {
 
@@ -44,10 +44,10 @@
     },
     computed: {
       right() {
-        return 2 * this.itemStyle.right * rpx
+        return rpx2px(2 * this.itemStyle.right)
       },
       bottom() {
-        return 2 * this.itemStyle.bottom * rpx
+        return rpx2px(2 * this.itemStyle.bottom)
       }
     },