Commit 4b302e01 by 胡悦

提交

1 parent b5301fd8
......@@ -3,12 +3,12 @@
* @Author: huyue
* @Date: 2022-10-10 10:59:01
* @LastEditors: huyue
* @LastEditTime: 2022-10-28 09:29:06
* @LastEditTime: 2022-10-28 17:10:10
*/
module.exports = {
"plugins": {
"postcss-pxtorem": {
rootValue: 37.5, // 75 表示 750 设计稿,37.5 表示 37.5 表示 375 设计稿
rootValue: 75, // 75 表示 750 设计稿,37.5 表示 37.5 表示 375 设计稿
unitPrecision: 6, // 计算结果保留 6 位小数
selectorBlackList: ['.no-rem', 'no-rem'], // 要忽略的选择器并保留为px
propList: ['*'], // 可以从 px 更改为 rem 的属性 感叹号开头的不转化
......
......@@ -3,12 +3,12 @@
* @Author: huyue
* @Date: 2022-10-10 10:59:01
* @LastEditors: huyue
* @LastEditTime: 2022-10-26 10:54:03
* @LastEditTime: 2022-10-28 17:58:30
*/
let baseSize = 37.5
function setRem() {
const scale = document.documentElement.clientWidth / 750
document.documentElement.style.fontSize = baseSize * Math.min(scale, 3) + 'px'
const scale = document.documentElement.clientWidth / 375
document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px'
}
function throttle(func, wait) {
let timeout
......@@ -23,6 +23,5 @@ function throttle(func, wait) {
}
setRem()
window.onresize = throttle(() => {
console.log(111)
setRem()
}, 1000)
\ No newline at end of file
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-10-11 17:41:38
* @LastEditors: huyue
* @LastEditTime: 2022-10-28 09:28:09
* @LastEditTime: 2022-10-28 18:04:25
-->
<template>
<!-- 战报产品 -->
......@@ -563,8 +563,8 @@
:style="{
'min-width':
data.activitedInfo.targetStock > 99999
? '5.86rem'
: '4.46rem',
? '1.933'
: '1.733rem',
}"
>{{ data.activitedInfo.targetStock }}<label>个</label></span
>
......@@ -991,8 +991,8 @@ const getInfo = async () => {
] as any;
if (
!(
data.activitedInfo.wechatMomentsRate == "0.00%" &&
data.activitedInfo.wechatShareRate == "0.00%"
data.activitedInfo.workWechatMomentsRate == "0.00%" &&
data.activitedInfo.workWechatMomentsRate == "0.00%"
)
) {
data.activitedInfo.workWechatRate = [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!