提交 e2d4bb29 编写于 作者: JEECG低代码平台's avatar JEECG低代码平台

Jeecg-Boot 2.1.4 版本发布 (升级ant-design-vue版本)

上级 865ace6d
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"@antv/data-set": "^0.10.2", "@antv/data-set": "^0.10.2",
"@jeecg/antd-online-214": "^2.1.41", "@jeecg/antd-online-214": "^2.1.41",
"@tinymce/tinymce-vue": "^2.0.0", "@tinymce/tinymce-vue": "^2.0.0",
"ant-design-vue": "^1.4.0", "ant-design-vue": "^1.4.11",
"apexcharts": "^3.6.5", "apexcharts": "^3.6.5",
"axios": "^0.18.0", "axios": "^0.18.0",
"clipboard": "^2.0.4", "clipboard": "^2.0.4",
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
"html-webpack-plugin": "^4.0.0-beta.11", "html-webpack-plugin": "^4.0.0-beta.11",
"less": "^3.9.0", "less": "^3.9.0",
"less-loader": "^4.1.0", "less-loader": "^4.1.0",
"node-sass": "^4.11.0", "node-sass": "^4.13.1",
"sass-loader": "^7.0.1", "sass-loader": "^7.3.1",
"vue-template-compiler": "^2.6.10" "vue-template-compiler": "^2.6.10"
}, },
"eslintConfig": { "eslintConfig": {
......
...@@ -37,20 +37,13 @@ ...@@ -37,20 +37,13 @@
</template> </template>
<script> <script>
import ACol from 'ant-design-vue/es/grid/Col'
export default { export default {
name: 'JModal', name: 'JModal',
components: { ACol },
props: { props: {
title: String, title: String,
// 可使用 .sync 修饰符 // 可使用 .sync 修饰符
visible: Boolean, visible: Boolean,
// 是否在弹出时禁止 body 滚动
lockScroll: {
type: Boolean,
default: true
},
// 是否全屏弹窗,当全屏时无论如何都会禁止 body 滚动。可使用 .sync 修饰符 // 是否全屏弹窗,当全屏时无论如何都会禁止 body 滚动。可使用 .sync 修饰符
fullscreen: { fullscreen: {
type: Boolean, type: Boolean,
...@@ -66,11 +59,8 @@ ...@@ -66,11 +59,8 @@
return { return {
// 内部使用的 slots ,不再处理 // 内部使用的 slots ,不再处理
usedSlots: ['title'], usedSlots: ['title'],
// 实际控制是否全屏的参数
// 缓存 body 的 overflow
bodyOverflowCache: '',
innerFullscreen: this.fullscreen, innerFullscreen: this.fullscreen,
fullscreenButtonIcon: 'fullscreen-exit',
} }
}, },
computed: { computed: {
...@@ -98,24 +88,16 @@ ...@@ -98,24 +88,16 @@
allSlotsKeys() { allSlotsKeys() {
return this.slotsKeys.concat(this.scopedSlotsKeys) return this.slotsKeys.concat(this.scopedSlotsKeys)
}, },
// 是否锁定body滚动 // 切换全屏的按钮图标
lockBodyScroll() { fullscreenButtonIcon() {
return this.lockScroll || this.innerFullscreen return this.innerFullscreen ? 'fullscreen' : 'fullscreen-exit'
} },
}, },
watch: { watch: {
visible() { visible() {
if (this.visible) { if (this.visible) {
this.innerFullscreen = this.fullscreen this.innerFullscreen = this.fullscreen
} }
if (this.lockBodyScroll) {
if (this.visible) {
this.bodyOverflowCache = document.body.style.overflow
document.body.style.overflow = 'hidden'
} else {
document.body.style.overflow = this.bodyOverflowCache
}
}
}, },
innerFullscreen(val) { innerFullscreen(val) {
this.$emit('update:fullscreen', val) this.$emit('update:fullscreen', val)
...@@ -134,12 +116,8 @@ ...@@ -134,12 +116,8 @@
this.close() this.close()
}, },
/** 切换全屏 */
toggleFullscreen() { toggleFullscreen() {
if (this.innerFullscreen) {
this.fullscreenButtonIcon = 'fullscreen'
} else {
this.fullscreenButtonIcon = 'fullscreen-exit'
}
this.innerFullscreen = !this.innerFullscreen this.innerFullscreen = !this.innerFullscreen
}, },
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册