Skip to content

Commit

Permalink
fix: document.body.removeAttribute will remove the class attribute bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoboding committed Dec 23, 2019
1 parent f4ad061 commit b72d725
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/packages/SmartWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export default {
this.widgetBodyOffsetHeight = this.widgetBodyOldHeight
// restore collapsed state
this.isFullScreenCollapsed = this.isFullScreen
document.body.removeAttribute('class', 'no-overflow')
document.body.classList.remove('no-overflow')
}
this.$emit('on-fullscreen', this.isFullScreen)
},
Expand Down
9 changes: 1 addition & 8 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ const isLib = process.env.VUE_APP_BUILD_MODE === 'lib'
const resolve = dir => path.join(__dirname, dir)

const setChainWebpack = config => {
// 修改默认目录简写
config.resolve.alias
.set('@', path.resolve('app'))
// 添加对 app 目录的支持
config.module
.rule('js')
.include
Expand All @@ -18,11 +16,6 @@ const setChainWebpack = config => {
.loader('babel-loader')

if (isProd) {
/**
* 清除性能警告
* entrypoint size limit (244 KiB)
* asset size limit (244 KiB)
*/
config.performance
.set('maxEntrypointSize', 2500000)
.set('maxAssetSize', 2000000)
Expand All @@ -48,7 +41,7 @@ module.exports = {
publicPath: './',
pages: {
index: {
entry: resolve('app/main.js') // 修改默认打包文件入口
entry: resolve('app/main.js')
}
},
lintOnSave: true,
Expand Down

0 comments on commit b72d725

Please sign in to comment.