Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
xqz
/
dianDemo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5c4c91fd
authored
2022-07-29 00:29:14 +0800
by
Evan_Fong
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 更新依赖和修改适配方案
1 parent
fd3c5ea0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
27 deletions
.postcssrc.js
package-lock.json
package.json
src/assets/css/index.scss
src/views/home/index.vue
.postcssrc.js
View file @
5c4c91f
// https://github.com/michael-ciniawsky/postcss-load-config
const
path
=
require
(
'path'
)
module
.
exports
=
{
module
.
exports
=
({
file
})
=>
{
console
.
log
(
file
)
return
{
plugins
:
{
autoprefixer
:
{},
'postcss-px-to-viewport'
:
{
unitToConvert
:
'px'
,
// 要转化的单位
viewportWidth
:
750
,
// 视窗的宽度,对应的是我们设计稿的宽度,一般是750
viewportWidth
:
file
.
includes
(
'vant'
)
?
375
:
750
,
// 视窗的宽度,对应的是我们设计稿的宽度,一般是750
viewportHeight
:
812
,
// 视窗的高度,根据750设备的宽度来指定,一般指定1334,也可以不配置
unitPrecision
:
6
,
// 指定`px`转换为视窗单位值的小数位数
viewportUnit
:
'vw'
,
//指定需要转换成的视窗单位,建议使用vw
selectorBlackList
:
[
'.van-cell'
,
'.van-button'
,
'.van-skeleton'
,
'.van-toast'
,
'.van-popup__close-icon'
,
'.van-field'
,
'.van-dropdown-menu'
,
'.van-radio'
,
'.van-swipe'
,
'.van-list'
,
'.van-dialog'
,
'.van-tabbar'
],
// 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名
selectorBlackList
:
[],
// 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名
minPixelValue
:
1
,
// 小于或等于`1px`不转换为视窗单位,你也可以设置为你想要的值
mediaQuery
:
false
// 允许在媒体查询中转换`px`
}
}
}
}
...
...
package-lock.json
deleted
100644 → 0
View file @
fd3c5ea
This diff could not be displayed because it is too large.
package.json
View file @
5c4c91f
...
...
@@ -24,11 +24,11 @@
"devDependencies"
:
{
"@babel/core"
:
"^7.18.6"
,
"@babel/eslint-parser"
:
"^7.18.2"
,
"@vue/cli-plugin-babel"
:
"~5.0.
0
"
,
"@vue/cli-plugin-eslint"
:
"~5.0.
0
"
,
"@vue/cli-plugin-router"
:
"~5.0.
0
"
,
"@vue/cli-plugin-vuex"
:
"~5.0.
0
"
,
"@vue/cli-service"
:
"~5.0.
0
"
,
"@vue/cli-plugin-babel"
:
"~5.0.
8
"
,
"@vue/cli-plugin-eslint"
:
"~5.0.
8
"
,
"@vue/cli-plugin-router"
:
"~5.0.
8
"
,
"@vue/cli-plugin-vuex"
:
"~5.0.
8
"
,
"@vue/cli-service"
:
"~5.0.
8
"
,
"babel-eslint"
:
"^10.1.0"
,
"babel-plugin-import"
:
"^1.13.5"
,
"babel-plugin-transform-remove-console"
:
"^6.9.4"
,
...
...
src/assets/css/index.scss
View file @
5c4c91f
...
...
@@ -9,5 +9,5 @@ body .app {
}
.app-container
{
padding-bottom
:
5
0px
;
padding-bottom
:
10
0px
;
}
...
...
src/views/home/index.vue
View file @
5c4c91f
...
...
@@ -37,18 +37,21 @@ let list = ref([
<
style
lang=
"scss"
scoped
>
.index-container
{
.warpper
{
padding
:
12
px
;
padding
:
24
px
;
background
:
#fff
;
.demo-home__title
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin
:
0
0
6px
;
font-size
:
64
px
;
font-size
:
56
px
;
.demo-home__title
img,
.demo-home__title
span
{
display
:
inline-block
;
vertical-align
:
middle
;
}
img
{
width
:
32
px
;
width
:
64
px
;
}
span
{
margin-left
:
16px
;
...
...
@@ -56,9 +59,10 @@ let list = ref([
}
}
.demo-home__desc
{
text-align
:
center
;
margin
:
0
0
20px
;
color
:
rgba
(
69
,
90
,
100
,
0.6
);
font-size
:
14
px
;
font-size
:
28
px
;
}
}
}
...
...
Write
Preview
Styling with
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