✨(component): 修复 layer 在 google 高版本中的警告提示
This commit is contained in:
parent
2f52cc2739
commit
b94fbce367
@ -4,7 +4,7 @@ const useMove = function (el: HTMLElement, callback: Function) {
|
||||
let offsetY: number;
|
||||
if (el != null) {
|
||||
el.addEventListener("mousedown", function (event: any) {
|
||||
const path = event.composedPath();
|
||||
const path = (event.composedPath && event.composedPath()) || event.path;
|
||||
if (path[0].className === "layui-layer-title") {
|
||||
if (event.button == 0 && el != null) {
|
||||
const lexObj: any = getComputedStyle(el);
|
||||
|
@ -1,7 +1,7 @@
|
||||
const useMove = function (el: HTMLElement, callback: Function) {
|
||||
if (el != null) {
|
||||
el.addEventListener("mousedown", function (event: any) {
|
||||
const path = event.composedPath();
|
||||
const path = (event.composedPath && event.composedPath()) || event.path;
|
||||
if (path[0].className === "layui-layer-resize") {
|
||||
if (event.button == 0 && el != null) {
|
||||
var x = el.offsetLeft;
|
||||
|
Loading…
Reference in New Issue
Block a user