- 博客(6)
- 收藏
- 关注
原创 h5适配,rem的使用
window.onload = function(){ /*720代表设计师给的设计稿的宽度,你的设计稿是多少,就写多少;100代表换算比例,这里写100是为了以后好算,比如,你测量的一个宽度是100px,就可以写为1rem,以及1px=0.01rem等等*/ getRem(750,100)};window.onresize = function(){ getRem(750,100)};function getRem(pwidth,prem){ var html =
2020-11-20 10:10:31 130
原创 vue手动判断浏览器关闭
当浏览器关闭时,我们可以清除localstorage及cookie在App.js里面写入 mounted() { window.addEventListener('beforeunload', e => { console.log(e) localStorage.removeItem('token') }) },
2020-11-05 11:33:48 1029
原创 elementUI 侧边栏加滚动效果
.aside { height: 100%; overflow: auto; &::-webkit-scrollbar{ display:none } }
2020-11-04 17:01:32 1127
原创 vuex结合localStorage存储数据
import Vue from 'vue'import Vuex from 'vuex'Vue.use(Vuex)export default new Vuex.Store({ state: { editableTabsValue: '1',//当前tab页 editableTabs: [{ title: '首页', name: '1', path:'/equipmentDistribution', }], tabIndex:
2020-11-03 16:07:45 675
原创 elementUI table表格修改高度和字体大小
<el-table :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" style="font-size: 10px"> </el-table>:cell-style="{padding:‘0px’}"加不加也不是那么重要,看情况
2020-11-03 16:05:03 8887
原创 vue-cli打包首页白屏问题
第一种办法在vue.config.js配置module.exports = { lintOnSave: true, publicPath: './', outputDir: 'dist', assetsDir: 'static'}第二种解决办法在项目中使用了es6的语法,一些浏览器不支持es6,造成编译错误不能解析而造成白屏安装 npm install --save-dev babel-preset-es2015安装 npm install --save-
2020-11-02 16:25:33 259
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人