Commit 275ce6c93fdd0065880d34e4019810ab80a40f72
1 parent
8450d3df
Jeecg-Boot 2.1.4 版本发布 (升级ant-design-vue版本)
Showing
3 changed files
with
2663 additions
and
2569 deletions
Too many changes to show.
To preserve performance only 2 of 3 files are displayed.
ant-design-vue-jeecg/package.json
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | "@antv/data-set": "^0.10.2", |
13 | 13 | "@jeecg/antd-online-214": "^2.1.41", |
14 | 14 | "@tinymce/tinymce-vue": "^2.0.0", |
15 | - "ant-design-vue": "^1.4.0", | |
15 | + "ant-design-vue": "^1.4.11", | |
16 | 16 | "apexcharts": "^3.6.5", |
17 | 17 | "axios": "^0.18.0", |
18 | 18 | "clipboard": "^2.0.4", |
... | ... | @@ -54,8 +54,8 @@ |
54 | 54 | "html-webpack-plugin": "^4.0.0-beta.11", |
55 | 55 | "less": "^3.9.0", |
56 | 56 | "less-loader": "^4.1.0", |
57 | - "node-sass": "^4.11.0", | |
58 | - "sass-loader": "^7.0.1", | |
57 | + "node-sass": "^4.13.1", | |
58 | + "sass-loader": "^7.3.1", | |
59 | 59 | "vue-template-compiler": "^2.6.10" |
60 | 60 | }, |
61 | 61 | "eslintConfig": { |
... | ... |
ant-design-vue-jeecg/src/components/jeecg/JModal/index.vue
... | ... | @@ -37,20 +37,13 @@ |
37 | 37 | </template> |
38 | 38 | |
39 | 39 | <script> |
40 | - import ACol from 'ant-design-vue/es/grid/Col' | |
41 | 40 | |
42 | 41 | export default { |
43 | 42 | name: 'JModal', |
44 | - components: { ACol }, | |
45 | 43 | props: { |
46 | 44 | title: String, |
47 | 45 | // 可使用 .sync 修饰符 |
48 | 46 | visible: Boolean, |
49 | - // 是否在弹出时禁止 body 滚动 | |
50 | - lockScroll: { | |
51 | - type: Boolean, | |
52 | - default: true | |
53 | - }, | |
54 | 47 | // 是否全屏弹窗,当全屏时无论如何都会禁止 body 滚动。可使用 .sync 修饰符 |
55 | 48 | fullscreen: { |
56 | 49 | type: Boolean, |
... | ... | @@ -66,11 +59,8 @@ |
66 | 59 | return { |
67 | 60 | // 内部使用的 slots ,不再处理 |
68 | 61 | usedSlots: ['title'], |
69 | - | |
70 | - // 缓存 body 的 overflow | |
71 | - bodyOverflowCache: '', | |
62 | + // 实际控制是否全屏的参数 | |
72 | 63 | innerFullscreen: this.fullscreen, |
73 | - fullscreenButtonIcon: 'fullscreen-exit', | |
74 | 64 | } |
75 | 65 | }, |
76 | 66 | computed: { |
... | ... | @@ -98,24 +88,16 @@ |
98 | 88 | allSlotsKeys() { |
99 | 89 | return this.slotsKeys.concat(this.scopedSlotsKeys) |
100 | 90 | }, |
101 | - // 是否锁定body滚动 | |
102 | - lockBodyScroll() { | |
103 | - return this.lockScroll || this.innerFullscreen | |
104 | - } | |
91 | + // 切换全屏的按钮图标 | |
92 | + fullscreenButtonIcon() { | |
93 | + return this.innerFullscreen ? 'fullscreen' : 'fullscreen-exit' | |
94 | + }, | |
105 | 95 | }, |
106 | 96 | watch: { |
107 | 97 | visible() { |
108 | 98 | if (this.visible) { |
109 | 99 | this.innerFullscreen = this.fullscreen |
110 | 100 | } |
111 | - if (this.lockBodyScroll) { | |
112 | - if (this.visible) { | |
113 | - this.bodyOverflowCache = document.body.style.overflow | |
114 | - document.body.style.overflow = 'hidden' | |
115 | - } else { | |
116 | - document.body.style.overflow = this.bodyOverflowCache | |
117 | - } | |
118 | - } | |
119 | 101 | }, |
120 | 102 | innerFullscreen(val) { |
121 | 103 | this.$emit('update:fullscreen', val) |
... | ... | @@ -134,12 +116,8 @@ |
134 | 116 | this.close() |
135 | 117 | }, |
136 | 118 | |
119 | + /** 切换全屏 */ | |
137 | 120 | toggleFullscreen() { |
138 | - if (this.innerFullscreen) { | |
139 | - this.fullscreenButtonIcon = 'fullscreen' | |
140 | - } else { | |
141 | - this.fullscreenButtonIcon = 'fullscreen-exit' | |
142 | - } | |
143 | 121 | this.innerFullscreen = !this.innerFullscreen |
144 | 122 | }, |
145 | 123 | |
... | ... |