Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_web_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
91isoft_web_vue
Commits
373f2be8
Commit
373f2be8
authored
Feb 26, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pad端分辨率自适应
parent
c223ff91
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
rem.js
src/utils/rem.js
+1
-1
vue.config.js
vue.config.js
+3
-10
No files found.
src/utils/rem.js
View file @
373f2be8
...
...
@@ -8,7 +8,7 @@ function setRem() {
// 设置页面根节点字体大小(“Math.min(scale, 2)” 指最高放大比例为2,可根据实际业务需求调整)
// document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px'
// 设置页面根节点字体大小, 字体大小最小为12
const
fontSize
=
(
baseSize
*
Math
.
min
(
scale
,
2
))
>
1
6
?
(
baseSize
*
Math
.
min
(
scale
,
2
))
:
16
const
fontSize
=
(
baseSize
*
Math
.
min
(
scale
,
2
))
>
1
2
?
(
baseSize
*
Math
.
min
(
scale
,
2
))
:
12
document
.
documentElement
.
style
.
fontSize
=
fontSize
+
'px'
}
// 初始化
...
...
vue.config.js
View file @
373f2be8
...
...
@@ -21,7 +21,6 @@ const name = defaultSettings.title || 'vue Admin Template' // page title
// port = 9528 npm run dev OR npm run dev --port = 9528
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
8080
// dev port
// 引入等比适配插件
const
px2rem
=
require
(
'postcss-px2rem'
)
...
...
@@ -33,13 +32,6 @@ const postcss = px2rem({
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module
.
exports
=
{
/**
* You will need to set publicPath if you plan to deploy your site under a sub path,
* for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/,
* then publicPath should be set to "/bar/".
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
css
:
{
loaderOptions
:
{
sass
:
{
...
...
@@ -55,7 +47,8 @@ module.exports = {
publicPath
:
process
.
env
.
NODE_ENV
!==
'development'
?
'./'
:
'/'
,
outputDir
:
`dist`
,
assetsDir
:
'static'
,
lintOnSave
:
process
.
env
.
NODE_ENV
===
'development'
,
// lintOnSave: process.env.NODE_ENV === 'development',
lintOnSave
:
true
,
productionSourceMap
:
false
,
devServer
:
{
host
:
'0.0.0.0'
,
...
...
@@ -100,7 +93,7 @@ module.exports = {
// target: `http://117.122.212.91:32012/`,
// target: `http://192.168.1.31:8082/`,
// target: `http://192.168.1.12:8082/`, // 孙浩
target
:
`http://192.168.1.
21:8001
/`
,
// 张宇
target
:
`http://192.168.1.
14:8082
/`
,
// 张宇
// target: `http://192.168.1.30:8082/`,
// changeOrigin: true,
pathRewrite
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment