Commit 4b302e01 by 胡悦

提交

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