Commit 373f2be8 authored by 张伯涛's avatar 张伯涛

pad端分辨率自适应

parent c223ff91
...@@ -8,7 +8,7 @@ function setRem() { ...@@ -8,7 +8,7 @@ function setRem() {
// 设置页面根节点字体大小(“Math.min(scale, 2)” 指最高放大比例为2,可根据实际业务需求调整) // 设置页面根节点字体大小(“Math.min(scale, 2)” 指最高放大比例为2,可根据实际业务需求调整)
// document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px' // document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px'
// 设置页面根节点字体大小, 字体大小最小为12 // 设置页面根节点字体大小, 字体大小最小为12
const fontSize = (baseSize * Math.min(scale, 2)) > 16 ? (baseSize * Math.min(scale, 2)) : 16 const fontSize = (baseSize * Math.min(scale, 2)) > 12 ? (baseSize * Math.min(scale, 2)) : 12
document.documentElement.style.fontSize = fontSize + 'px' document.documentElement.style.fontSize = fontSize + 'px'
} }
// 初始化 // 初始化
......
...@@ -21,7 +21,6 @@ const name = defaultSettings.title || 'vue Admin Template' // page title ...@@ -21,7 +21,6 @@ const name = defaultSettings.title || 'vue Admin Template' // page title
// port = 9528 npm run dev OR npm run dev --port = 9528 // 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 port = process.env.port || process.env.npm_config_port || 8080 // dev port
// 引入等比适配插件 // 引入等比适配插件
const px2rem = require('postcss-px2rem') const px2rem = require('postcss-px2rem')
...@@ -33,13 +32,6 @@ const postcss = px2rem({ ...@@ -33,13 +32,6 @@ const postcss = px2rem({
// All configuration item explanations can be find in https://cli.vuejs.org/config/ // All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = { 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: { css: {
loaderOptions: { loaderOptions: {
sass: { sass: {
...@@ -55,7 +47,8 @@ module.exports = { ...@@ -55,7 +47,8 @@ module.exports = {
publicPath: process.env.NODE_ENV !== 'development' ? './' : '/', publicPath: process.env.NODE_ENV !== 'development' ? './' : '/',
outputDir: `dist`, outputDir: `dist`,
assetsDir: 'static', assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development', // lintOnSave: process.env.NODE_ENV === 'development',
lintOnSave: true,
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
host: '0.0.0.0', host: '0.0.0.0',
...@@ -100,7 +93,7 @@ module.exports = { ...@@ -100,7 +93,7 @@ module.exports = {
// target: `http://117.122.212.91:32012/`, // target: `http://117.122.212.91:32012/`,
// target: `http://192.168.1.31:8082/`, // target: `http://192.168.1.31:8082/`,
// target: `http://192.168.1.12: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/`, // target: `http://192.168.1.30:8082/`,
// changeOrigin: true, // changeOrigin: true,
pathRewrite: { pathRewrite: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment