mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-20 05:55:07 +08:00
替换var 为const/let
删除未使用import 替换 == 为 ===
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
export default {
|
||||
bind(el, binding, vnode, oldVnode) {
|
||||
const value = binding.value
|
||||
if (value == false) return
|
||||
if (value === false) return
|
||||
// 获取拖拽内容头部
|
||||
const dialogHeaderEl = el.querySelector('.el-dialog__header');
|
||||
const dragDom = el.querySelector('.el-dialog');
|
||||
@ -16,7 +16,7 @@ export default {
|
||||
dragDom.style.marginTop = 0;
|
||||
let width = dragDom.style.width;
|
||||
if (width.includes('%')) {
|
||||
width = +document.body.clientWidth * (+width.replace(/\%/g, '') / 100);
|
||||
width = +document.body.clientWidth * (+width.replace(/%/g, '') / 100);
|
||||
} else {
|
||||
width = +width.replace(/\px/g, '');
|
||||
}
|
||||
@ -32,12 +32,12 @@ export default {
|
||||
|
||||
// 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
|
||||
if (sty.left.includes('%')) {
|
||||
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
|
||||
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
|
||||
styL = +document.body.clientWidth * (+sty.left.replace(/%/g, '') / 100);
|
||||
styT = +document.body.clientHeight * (+sty.top.replace(/%/g, '') / 100);
|
||||
} else {
|
||||
styL = +sty.left.replace(/\px/g, '');
|
||||
styT = +sty.top.replace(/\px/g, '');
|
||||
};
|
||||
}
|
||||
|
||||
// 鼠标拖拽事件
|
||||
document.onmousemove = function (e) {
|
||||
|
Reference in New Issue
Block a user