|
@@ -115,6 +115,32 @@ import { yongyiInterface } from "@/api/api.js";
|
|
|
export default {
|
|
|
name: "Yyzx",
|
|
|
components: { lzTable },
|
|
|
+ directives: {
|
|
|
+ drag(el, bindings) {
|
|
|
+ el.onmousedown = function (e) {
|
|
|
+ var init = e.clientX;
|
|
|
+ // console.log(init);
|
|
|
+ var box = $('#box')[0];
|
|
|
+ // console.log(box.clientWidth)
|
|
|
+ let total_wid = box.offsetWidth;
|
|
|
+ var left = $('#left')[0];
|
|
|
+ var right = $('#right')[0];
|
|
|
+ var initWidth = left.offsetWidth;
|
|
|
+ document.onmousemove = function (e) {
|
|
|
+ var end = e.clientX;
|
|
|
+ var newWidth = end - init + initWidth;
|
|
|
+ left.style.width = newWidth + 'px';
|
|
|
+ right.style.width = newWidth > 320 ? total_wid - newWidth + 'px' : total_wid - 320 + 'px';
|
|
|
+ };
|
|
|
+ document.onmouseup = function () {
|
|
|
+ document.onmousemove = document.onmouseup = null;
|
|
|
+ e.releaseCapture && e.releaseCapture();
|
|
|
+ };
|
|
|
+ e.setCapture && e.setCapture();
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
isLeftWrapShow:true,
|