Commit 275ce6c93fdd0065880d34e4019810ab80a40f72

Authored by zhangdaiscott
1 parent 8450d3df

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

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,7 +12,7 @@
12 "@antv/data-set": "^0.10.2", 12 "@antv/data-set": "^0.10.2",
13 "@jeecg/antd-online-214": "^2.1.41", 13 "@jeecg/antd-online-214": "^2.1.41",
14 "@tinymce/tinymce-vue": "^2.0.0", 14 "@tinymce/tinymce-vue": "^2.0.0",
15 - "ant-design-vue": "^1.4.0", 15 + "ant-design-vue": "^1.4.11",
16 "apexcharts": "^3.6.5", 16 "apexcharts": "^3.6.5",
17 "axios": "^0.18.0", 17 "axios": "^0.18.0",
18 "clipboard": "^2.0.4", 18 "clipboard": "^2.0.4",
@@ -54,8 +54,8 @@ @@ -54,8 +54,8 @@
54 "html-webpack-plugin": "^4.0.0-beta.11", 54 "html-webpack-plugin": "^4.0.0-beta.11",
55 "less": "^3.9.0", 55 "less": "^3.9.0",
56 "less-loader": "^4.1.0", 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 "vue-template-compiler": "^2.6.10" 59 "vue-template-compiler": "^2.6.10"
60 }, 60 },
61 "eslintConfig": { 61 "eslintConfig": {
ant-design-vue-jeecg/src/components/jeecg/JModal/index.vue
@@ -37,20 +37,13 @@ @@ -37,20 +37,13 @@
37 </template> 37 </template>
38 38
39 <script> 39 <script>
40 - import ACol from 'ant-design-vue/es/grid/Col'  
41 40
42 export default { 41 export default {
43 name: 'JModal', 42 name: 'JModal',
44 - components: { ACol },  
45 props: { 43 props: {
46 title: String, 44 title: String,
47 // 可使用 .sync 修饰符 45 // 可使用 .sync 修饰符
48 visible: Boolean, 46 visible: Boolean,
49 - // 是否在弹出时禁止 body 滚动  
50 - lockScroll: {  
51 - type: Boolean,  
52 - default: true  
53 - },  
54 // 是否全屏弹窗,当全屏时无论如何都会禁止 body 滚动。可使用 .sync 修饰符 47 // 是否全屏弹窗,当全屏时无论如何都会禁止 body 滚动。可使用 .sync 修饰符
55 fullscreen: { 48 fullscreen: {
56 type: Boolean, 49 type: Boolean,
@@ -66,11 +59,8 @@ @@ -66,11 +59,8 @@
66 return { 59 return {
67 // 内部使用的 slots ,不再处理 60 // 内部使用的 slots ,不再处理
68 usedSlots: ['title'], 61 usedSlots: ['title'],
69 -  
70 - // 缓存 body 的 overflow  
71 - bodyOverflowCache: '', 62 + // 实际控制是否全屏的参数
72 innerFullscreen: this.fullscreen, 63 innerFullscreen: this.fullscreen,
73 - fullscreenButtonIcon: 'fullscreen-exit',  
74 } 64 }
75 }, 65 },
76 computed: { 66 computed: {
@@ -98,24 +88,16 @@ @@ -98,24 +88,16 @@
98 allSlotsKeys() { 88 allSlotsKeys() {
99 return this.slotsKeys.concat(this.scopedSlotsKeys) 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 watch: { 96 watch: {
107 visible() { 97 visible() {
108 if (this.visible) { 98 if (this.visible) {
109 this.innerFullscreen = this.fullscreen 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 innerFullscreen(val) { 102 innerFullscreen(val) {
121 this.$emit('update:fullscreen', val) 103 this.$emit('update:fullscreen', val)
@@ -134,12 +116,8 @@ @@ -134,12 +116,8 @@
134 this.close() 116 this.close()
135 }, 117 },
136 118
  119 + /** 切换全屏 */
137 toggleFullscreen() { 120 toggleFullscreen() {
138 - if (this.innerFullscreen) {  
139 - this.fullscreenButtonIcon = 'fullscreen'  
140 - } else {  
141 - this.fullscreenButtonIcon = 'fullscreen-exit'  
142 - }  
143 this.innerFullscreen = !this.innerFullscreen 121 this.innerFullscreen = !this.innerFullscreen
144 }, 122 },
145 123