@saooti/octopus-sdk 37.0.12 → 37.0.13
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
package/src/assets/share.scss
CHANGED
|
@@ -31,6 +31,8 @@ export default defineComponent({
|
|
|
31
31
|
isFixed: { type: Boolean, default: false },
|
|
32
32
|
relativeClass: { type: String, default: undefined },
|
|
33
33
|
leftPos: { type: Boolean, default: false },
|
|
34
|
+
topPos: { type: Boolean, default: false },
|
|
35
|
+
|
|
34
36
|
},
|
|
35
37
|
data() {
|
|
36
38
|
return {
|
|
@@ -123,12 +125,13 @@ export default defineComponent({
|
|
|
123
125
|
parentRight -
|
|
124
126
|
(this.$refs.popover as HTMLElement).clientWidth
|
|
125
127
|
: rectElement.left - parentLeft;
|
|
126
|
-
this.
|
|
127
|
-
|
|
128
|
+
const yPosParent = this.topPos ? rectElement.top:rectElement.bottom;
|
|
129
|
+
const yGap = this.topPos ? -5 - (this.$refs.popover as HTMLElement).clientHeight :5;
|
|
130
|
+
this.posY = yPosParent +
|
|
128
131
|
parentScrollTop -
|
|
129
132
|
parentTop +
|
|
130
133
|
(this.isFixed ? 0 : window.scrollY) +
|
|
131
|
-
|
|
134
|
+
yGap;
|
|
132
135
|
},
|
|
133
136
|
async clearDataBlur(e: FocusEvent) {
|
|
134
137
|
if (!e.relatedTarget) {
|