zydx-plus 1.35.587 → 1.35.588
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
|
@@ -210,6 +210,13 @@ export default {
|
|
|
210
210
|
},
|
|
211
211
|
created() {
|
|
212
212
|
this.render();
|
|
213
|
+
if(this.domeElement) {
|
|
214
|
+
let el = this.domeElement.$el
|
|
215
|
+
if(!el) el = this.domeElement
|
|
216
|
+
const dome = el.getBoundingClientRect()
|
|
217
|
+
this.x = dome.left
|
|
218
|
+
this.y = dome.top + dome.height
|
|
219
|
+
}
|
|
213
220
|
},
|
|
214
221
|
data() {
|
|
215
222
|
return {
|
|
@@ -298,12 +305,6 @@ export default {
|
|
|
298
305
|
that.render(str);
|
|
299
306
|
},
|
|
300
307
|
render(setTimeStr) { //初始化
|
|
301
|
-
if(this.domeElement) {
|
|
302
|
-
const dome = this.domeElement.$el.getBoundingClientRect()
|
|
303
|
-
this.x = dome.left
|
|
304
|
-
this.y = dome.top + dome.height
|
|
305
|
-
}
|
|
306
|
-
|
|
307
308
|
let that = this;
|
|
308
309
|
let currentTimeStr = setTimeStr ? setTimeStr : that.currentTime;
|
|
309
310
|
let timeObj = this.toDateByStr(currentTimeStr); //当前选定的时间
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<teleport to="body">
|
|
3
|
+
<div class="year" :style="{top: y + 'px', left: x + 'px'}">
|
|
3
4
|
<div class="year-cont">
|
|
4
5
|
<div class='calendar-Time-header under_line'>
|
|
5
6
|
<span class='calendar-lastMonth' @click="last">{{ lastText }}</span>
|
|
@@ -15,7 +16,8 @@
|
|
|
15
16
|
</div>
|
|
16
17
|
</div>
|
|
17
18
|
</div>
|
|
18
|
-
|
|
19
|
+
</div>
|
|
20
|
+
</teleport>
|
|
19
21
|
</template>
|
|
20
22
|
|
|
21
23
|
<script>
|
|
@@ -38,6 +40,10 @@ export default {
|
|
|
38
40
|
type: String,
|
|
39
41
|
default: '2100'
|
|
40
42
|
},
|
|
43
|
+
domeElement: {
|
|
44
|
+
type: Object,
|
|
45
|
+
default: null
|
|
46
|
+
}
|
|
41
47
|
},
|
|
42
48
|
data() {
|
|
43
49
|
return {
|
|
@@ -45,11 +51,20 @@ export default {
|
|
|
45
51
|
yearList: [],
|
|
46
52
|
min: 0,
|
|
47
53
|
max: 0,
|
|
48
|
-
timeObj: 0
|
|
54
|
+
timeObj: 0,
|
|
55
|
+
x: 0,
|
|
56
|
+
y: 0
|
|
49
57
|
}
|
|
50
58
|
},
|
|
51
59
|
created() {
|
|
52
60
|
this.render();
|
|
61
|
+
if(this.domeElement) {
|
|
62
|
+
let el = this.domeElement.$el
|
|
63
|
+
if(!el) el = this.domeElement
|
|
64
|
+
const dome = el.getBoundingClientRect()
|
|
65
|
+
this.x = dome.left
|
|
66
|
+
this.y = dome.top + dome.height
|
|
67
|
+
}
|
|
53
68
|
},
|
|
54
69
|
methods: {
|
|
55
70
|
render() {
|