From 07a0b054953d628a1e4b34c88b974166927ea62d Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期二, 30 三月 2021 11:37:46 +0800
Subject: [PATCH] 弹框修改
---
src/components/BaseNav/SolidWaste/directive.js | 73 ------------------------------------
1 files changed, 0 insertions(+), 73 deletions(-)
diff --git a/src/components/BaseNav/SolidWaste/directive.js b/src/components/BaseNav/SolidWaste/directive.js
index 773a4a8..d51b377 100644
--- a/src/components/BaseNav/SolidWaste/directive.js
+++ b/src/components/BaseNav/SolidWaste/directive.js
@@ -57,76 +57,3 @@
delete el._checkPosition
}
})
-
-// v-dialogDrag: 寮圭獥鎷栨嫿
-Vue.directive('dialogDrag', {
- bind (el, binding, vnode, oldVnode) {
- const dialogHeaderEl = el.querySelector('.el-dialog__header')
- const dragDom = el.querySelector('.el-dialog')
- dialogHeaderEl.style.cursor = 'move'
-
- // 鑾峰彇鍘熸湁灞炴�� ie dom鍏冪礌.currentStyle 鐏嫄璋锋瓕 window.getComputedStyle(dom鍏冪礌, null);
- const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
-
- dialogHeaderEl.onmousedown = (e) => {
- // 榧犳爣鎸変笅锛岃绠楀綋鍓嶅厓绱犺窛绂诲彲瑙嗗尯鐨勮窛绂�
- const disX = e.clientX - dialogHeaderEl.offsetLeft
- const disY = e.clientY - dialogHeaderEl.offsetTop
-
- // 鑾峰彇鍒扮殑鍊煎甫px 姝e垯鍖归厤鏇挎崲
- let styL, styT
-
- // 娉ㄦ剰鍦╥e涓� 绗竴娆¤幏鍙栧埌鐨勫�间负缁勪欢鑷甫50% 绉诲姩涔嬪悗璧嬪�间负px
- if (sty.left.includes('%')) {
- 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) {
- // 閫氳繃浜嬩欢濮旀墭锛岃绠楃Щ鍔ㄧ殑璺濈
- const l = e.clientX - disX
- const t = e.clientY - disY
-
- // 绉诲姩褰撳墠鍏冪礌
- dragDom.style.left = `${l + styL}px`
- dragDom.style.top = `${t + styT}px`
-
- // 灏嗘鏃剁殑浣嶇疆浼犲嚭鍘�
- // binding.value({x:e.pageX,y:e.pageY})
- }
-
- document.onmouseup = function (e) {
- document.onmousemove = null
- document.onmouseup = null
- }
- }
- }
-})
-
-// v-dialogDragWidth: 寮圭獥瀹藉害鎷栧ぇ 鎷栧皬
-Vue.directive('dialogDragWidth', {
- bind (el, binding, vnode, oldVnode) {
- const dragDom = binding.value.$el.querySelector('.el-dialog')
-
- el.onmousedown = (e) => {
- // 榧犳爣鎸変笅锛岃绠楀綋鍓嶅厓绱犺窛绂诲彲瑙嗗尯鐨勮窛绂�
- const disX = e.clientX - el.offsetLeft
-
- document.onmousemove = function (e) {
- e.preventDefault() // 绉诲姩鏃剁鐢ㄩ粯璁や簨浠�
-
- // 閫氳繃浜嬩欢濮旀墭锛岃绠楃Щ鍔ㄧ殑璺濈
- const l = e.clientX - disX
- dragDom.style.width = `${l}px`
- }
-
- document.onmouseup = function (e) {
- document.onmousemove = null
- document.onmouseup = null
- }
- }
- }
-})
--
Gitblit v1.8.0