Commit 4749087e by 张超军

8888

parent 1896fa01
/*
* @Author: your name
* @Date: 2021-07-05 13:42:42
* @LastEditTime: 2021-09-11 13:29:56
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\config\defaultSettings.js
*/
/**
* 项目默认配置项
* primaryColor - 默认主题色, 如果修改颜色不生效,请清理 localStorage
* navTheme - sidebar theme ['dark', 'light'] 两种主题
* colorWeak - 色盲模式
* layout - 整体布局方式 ['sidemenu', 'topmenu'] 两种布局
* fixedHeader - 固定 Header : boolean
* fixSiderbar - 固定左侧菜单栏 : boolean
* autoHideHeader - 向下滚动时,隐藏 Header : boolean
* contentWidth - 内容区布局: 流式 | 固定
*
* storageOptions: {} - Vue-ls 插件配置项 (localStorage/sessionStorage)
*
*/
export default {
primaryColor: '#1890FF', // primary color of ant design
navTheme: 'dark', // theme for nav menu
layout: 'sidemenu', // nav menu position: sidemenu or topmenu
contentWidth: 'Fluid', // layout of content: Fluid or Fixed, only works when layout is topmenu
fixedHeader: true, // sticky header
fixSiderbar: true, // sticky siderbar
autoHideHeader: false, // auto hide header
colorWeak: false,
multiTab: false,
production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true',
// vue-ls options
storageOptions: {
namespace: 'pro__',
name: 'ls',
storage: 'local'
},
windowWidth: 1920,
windowHeight: 1080
}
/* eslint-disable */
import cfg from '@/config/defaultSettings'
export default function zoom(id) {
const width = cfg.windowWidth
const height = cfg.windowHeight
let x = window.innerWidth / width
let y = window.innerHeight / height
let scale = 'scale(' + x + ',' + y + ')'
let cssText = 'overflow:hidden;'
cssText += 'width:' + width + 'px;'
cssText += 'height:' + height + 'px;'
let browsers = ['', '-ms-', '-moz-', '-webkit-', '-o-']
browsers.forEach((key) => {
cssText += key + 'transform:' + scale + ' translate3d(0,0,0);'
cssText += key + 'transform-origin: left top 0;'
})
if (id) {
document.getElementById(id).style.cssText = cssText
} else {
document.body.style.cssText = cssText
}
}
/* eslint-disable */
// import cfg from '../config/defaultSettings'
//
// let zoom = function zoom(width, height) {
// let x = window.innerWidth / width
// let y = window.innerHeight / height
// let scale = 'scale(' + x + ',' + y + ')'
// let cssText = 'overflow:hidden;'
//
// cssText += 'width:' + width + 'px;'
// cssText += 'height:' + height + 'px;'
//
// let browsers = ['', '-ms-', '-moz-', '-webkit-', '-o-']
// browsers.forEach((key) => {
// cssText += key + 'transform:' + scale + ';'
// cssText += key + 'transform-origin: left top 0;'
// })
// document.body.style.cssText = cssText
// }
// zoom(cfg.windowWidth, cfg.windowHeight)
//
// window.addEventListener('resize', function () {
// zoom(cfg.windowWidth, cfg.windowHeight)
// })
//
// export default {
// zoom
// }
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