Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsx-posters
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4b302e01
authored
Oct 28, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
b5301fd8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
postcss.config.js
src/utils/rem.ts
src/views/crowdfunding/activited.vue
postcss.config.js
View file @
4b302e0
...
@@ -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
:
7
5
,
// 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 的属性 感叹号开头的不转化
...
...
src/utils/rem.ts
View file @
4b302e0
...
@@ -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-2
6 10:54:03
* @LastEditTime: 2022-10-2
8 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
src/views/crowdfunding/activited.vue
View file @
4b302e0
...
@@ -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.46
rem',
: '
1.733
rem',
}"
}"
>
{{ 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
.
w
orkW
echatMomentsRate
==
"0.00%"
&&
data
.
activitedInfo
.
w
echatShare
Rate
==
"0.00%"
data
.
activitedInfo
.
w
orkWechatMoments
Rate
==
"0.00%"
)
)
)
{
)
{
data
.
activitedInfo
.
workWechatRate
=
[
data
.
activitedInfo
.
workWechatRate
=
[
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment