cloud-web-corejs 1.0.251 → 1.0.252
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -12,7 +12,19 @@
|
|
|
12
12
|
@close="dialogClose"
|
|
13
13
|
v-el-drag-dialog
|
|
14
14
|
v-el-dialog-center
|
|
15
|
+
:fullscreen="isFullscreen"
|
|
16
|
+
ref="dialog"
|
|
15
17
|
>
|
|
18
|
+
<el-button class="isFullIcon" v-if="!isFullscreen" @click="changeFullscreen(true)">
|
|
19
|
+
<el-tooltip effect="dark" :content="$t1('全屏')" placement="top">
|
|
20
|
+
<i class="iconfont icon-quanping"></i>
|
|
21
|
+
</el-tooltip>
|
|
22
|
+
</el-button>
|
|
23
|
+
<el-button class="isFullIcon" v-else @click="changeFullscreen(false)">
|
|
24
|
+
<el-tooltip effect="dark" :content="$t1('缩小')" placement="top">
|
|
25
|
+
<i class="iconfont icon-suoxiao"></i>
|
|
26
|
+
</el-tooltip>
|
|
27
|
+
</el-button>
|
|
16
28
|
<div class="n-list">
|
|
17
29
|
<div class="item" v-for="(item, index) in page.records" :key="index" :class="{ on: currentIndex == index }"
|
|
18
30
|
@click="checkLine(item, index)">
|
|
@@ -69,6 +81,7 @@ export default {
|
|
|
69
81
|
var that = this;
|
|
70
82
|
return {
|
|
71
83
|
showDialog: true,
|
|
84
|
+
isFullscreen: true,
|
|
72
85
|
falseValue: false,
|
|
73
86
|
selectMulti: true,
|
|
74
87
|
page: {
|
|
@@ -89,6 +102,23 @@ export default {
|
|
|
89
102
|
}
|
|
90
103
|
},
|
|
91
104
|
methods: {
|
|
105
|
+
changeFullscreen(val) {
|
|
106
|
+
this.isFullscreen = val;
|
|
107
|
+
// 退出全屏后,el-dialog-center 指令只在 bind 时设置过 margin-top,
|
|
108
|
+
// 需要在此重新计算,使弹框恢复垂直居中
|
|
109
|
+
this.$nextTick(() => {
|
|
110
|
+
let wrapper = this.$refs.dialog && this.$refs.dialog.$el;
|
|
111
|
+
let dialogEl = wrapper && wrapper.querySelector('.el-dialog');
|
|
112
|
+
if (!dialogEl) return;
|
|
113
|
+
if (val) {
|
|
114
|
+
dialogEl.style['margin-top'] = '';
|
|
115
|
+
} else {
|
|
116
|
+
let autoTop = (document.body.offsetHeight - dialogEl.offsetHeight) / 2;
|
|
117
|
+
if (autoTop < 0) autoTop = 0;
|
|
118
|
+
dialogEl.style['margin-top'] = autoTop + 'px';
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
},
|
|
92
122
|
dialogClose() {
|
|
93
123
|
this.$emit('update:visiable', false);
|
|
94
124
|
},
|
|
@@ -140,7 +170,7 @@ export default {
|
|
|
140
170
|
this.currentRow = item;
|
|
141
171
|
this.handleRead(index)
|
|
142
172
|
},
|
|
143
|
-
handleRead(index, callback) {
|
|
173
|
+
handleRead(index, callback) {
|
|
144
174
|
if(this.page.records.length <= index)return
|
|
145
175
|
let row = this.page.records[index];
|
|
146
176
|
if (row.readed !== 1) {
|
|
@@ -177,4 +207,33 @@ export default {
|
|
|
177
207
|
};
|
|
178
208
|
</script>
|
|
179
209
|
|
|
180
|
-
<style
|
|
210
|
+
<style lang="scss" scoped>
|
|
211
|
+
::v-deep .dialog-style.news-box {
|
|
212
|
+
.isFullIcon {
|
|
213
|
+
position: absolute;
|
|
214
|
+
top: 0;
|
|
215
|
+
right: 58px;
|
|
216
|
+
height: 42px;
|
|
217
|
+
padding: 0 14px;
|
|
218
|
+
border: none !important;
|
|
219
|
+
background: none !important;
|
|
220
|
+
box-shadow: none !important;
|
|
221
|
+
color: #464646;
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
justify-content: center;
|
|
225
|
+
> span {
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
line-height: 1;
|
|
230
|
+
}
|
|
231
|
+
.iconfont {
|
|
232
|
+
font-size: 18px;
|
|
233
|
+
line-height: 1;
|
|
234
|
+
position: relative;
|
|
235
|
+
top: 1px;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
</style>
|