Merge branch 'next' into feat-popup-menu
This commit is contained in:
commit
9b02804d17
@ -39,6 +39,7 @@ import {
|
|||||||
calculatePhotosArea,
|
calculatePhotosArea,
|
||||||
calculateNotifOffset,
|
calculateNotifOffset,
|
||||||
removeNotifiyFromQueen,
|
removeNotifiyFromQueen,
|
||||||
|
getNotifyAnimationClass,
|
||||||
} from "../utils";
|
} from "../utils";
|
||||||
import useMove from "../composable/useMove";
|
import useMove from "../composable/useMove";
|
||||||
import useResize from "../composable/useResize";
|
import useResize from "../composable/useResize";
|
||||||
@ -530,6 +531,9 @@ const enterActiveClass = computed(() => {
|
|||||||
if (type === 4) {
|
if (type === 4) {
|
||||||
return getDrawerAnimationClass(props.offset);
|
return getDrawerAnimationClass(props.offset);
|
||||||
}
|
}
|
||||||
|
if (type === 6) {
|
||||||
|
return getNotifyAnimationClass(props.offset);
|
||||||
|
}
|
||||||
return `layer-anim layer-anim-0${props.anim}`;
|
return `layer-anim layer-anim-0${props.anim}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -140,7 +140,6 @@ const layer = {
|
|||||||
},
|
},
|
||||||
//通知
|
//通知
|
||||||
notifiy: (option: any = {}, callback?: Function) => {
|
notifiy: (option: any = {}, callback?: Function) => {
|
||||||
option.anim = 5;
|
|
||||||
option.shade = false;
|
option.shade = false;
|
||||||
option.type = 6;
|
option.type = 6;
|
||||||
let defaultOption = {
|
let defaultOption = {
|
||||||
|
@ -1282,4 +1282,5 @@ html #layuicss-layer {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
transform: scale(0.7);
|
transform: scale(0.7);
|
||||||
margin-left: -7px;
|
margin-left: -7px;
|
||||||
|
margin-right: 3px;
|
||||||
}
|
}
|
@ -344,9 +344,7 @@ export function removeNotifiyFromQueen(layerId: string | undefined) {
|
|||||||
// 间隙
|
// 间隙
|
||||||
let transOffsetTop = 15;
|
let transOffsetTop = 15;
|
||||||
// @ts-ignore 删除项的高度
|
// @ts-ignore 删除项的高度
|
||||||
let offsetHeight =
|
let offsetHeight = document.getElementById(layerId)?.firstElementChild?.firstElementChild?.offsetHeight;
|
||||||
document.getElementById(layerId)?.firstElementChild?.firstElementChild
|
|
||||||
?.offsetHeight;
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
window.NotifiyQueen = window.NotifiyQueen || [];
|
window.NotifiyQueen = window.NotifiyQueen || [];
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -366,17 +364,25 @@ export function removeNotifiyFromQueen(layerId: string | undefined) {
|
|||||||
?.firstElementChild;
|
?.firstElementChild;
|
||||||
if (offsetType === "rt" || offsetType === "lt") {
|
if (offsetType === "rt" || offsetType === "lt") {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
dom.style["top"] =
|
dom.style["top"] = parseFloat(dom.style["top"]) - transOffsetTop - offsetHeight + "px";
|
||||||
parseFloat(dom.style["top"]) - transOffsetTop - offsetHeight + "px";
|
|
||||||
} else {
|
} else {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
let bottom =
|
let bottom = parseFloat(dom.style["top"].split(" - ")[1]) - transOffsetTop - offsetHeight;
|
||||||
parseFloat(dom.style["top"].split(" - ")[1]) -
|
|
||||||
transOffsetTop -
|
|
||||||
offsetHeight;
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
dom.style["top"] = "calc(100vh - " + bottom + "px)";
|
dom.style["top"] = "calc(100vh - " + bottom + "px)";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
notifiyQueen.splice(index, 1); //删除
|
notifiyQueen.splice(index, 1); //删除
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notify动画类
|
||||||
|
export function getNotifyAnimationClass(offset: any) {
|
||||||
|
const prefix = "layer-drawer-anim layer-anim";
|
||||||
|
let suffix = "";
|
||||||
|
if (offset === "lt" || offset === "lb") {
|
||||||
|
suffix = "lr";
|
||||||
|
} else {
|
||||||
|
suffix = "rl";
|
||||||
|
}
|
||||||
|
return `${prefix}-${suffix}`;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user