@tongfun/tf-widget 0.1.152 → 0.1.153

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -140080,8 +140080,8 @@ var component = (0,componentNormalizer/* default */.Z)(
140080
140080
  /* harmony default export */ var tf_filter = (component.exports);
140081
140081
  // EXTERNAL MODULE: ./src/utils/index.js
140082
140082
  var utils = __webpack_require__(42325);
140083
- // EXTERNAL MODULE: ./src/directives/index.js + 31 modules
140084
- var directives = __webpack_require__(7183);
140083
+ // EXTERNAL MODULE: ./src/directives/index.js + 32 modules
140084
+ var directives = __webpack_require__(27499);
140085
140085
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table/src/index.vue?vue&type=script&lang=js&
140086
140086
  //
140087
140087
  //
@@ -140831,21 +140831,20 @@ function getVoucherIds(data) {
140831
140831
 
140832
140832
  /***/ }),
140833
140833
 
140834
- /***/ 7183:
140834
+ /***/ 27499:
140835
140835
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
140836
140836
 
140837
140837
  "use strict";
140838
140838
 
140839
140839
  // EXPORTS
140840
140840
  __webpack_require__.d(__webpack_exports__, {
140841
+ "Lh": function() { return /* reexport */ ElDialogDrag; },
140841
140842
  "Ds": function() { return /* reexport */ debounce; },
140842
140843
  "Cq": function() { return /* reexport */ tableAutoHeight; },
140843
140844
  "AB": function() { return /* reexport */ umyColumnWidth; },
140844
140845
  "b$": function() { return /* reexport */ umyTableSetting; }
140845
140846
  });
140846
140847
 
140847
- // UNUSED EXPORTS: ElDialogDrag
140848
-
140849
140848
  ;// CONCATENATED MODULE: ./src/directives/modules/debounce.js
140850
140849
  const debounce = {
140851
140850
  bind: function (el, {
@@ -142279,14 +142278,19 @@ const tableAutoHeight = {
142279
142278
  }
142280
142279
 
142281
142280
  };
142281
+ ;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/init.js
142282
+ /** 弹框初始化 */
142283
+ function init(el, binding, vNode) {
142284
+ const dialogInstance = vNode.componentInstance;
142285
+ dialogInstance.closeOnClickModal = false;
142286
+ }
142282
142287
  ;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/drag.js
142283
142288
  /** 弹框支持拖拽 */
142284
- function drag(el, binding, vnode) {
142289
+ function drag(el, binding, vNode) {
142285
142290
  const dragDom = el.querySelector('.el-dialog');
142286
142291
  const dialogHeaderEl = el.querySelector('.el-dialog__header');
142287
142292
  dragDom.style.overflow = 'auto';
142288
- dialogHeaderEl.style.cursor = 'move'; // dragDom.style.cssText += ';top:0px;'
142289
-
142293
+ dialogHeaderEl.style.cursor = 'move';
142290
142294
  /**
142291
142295
  * 获取原有属性
142292
142296
  * IE dom元素.currentStyle
@@ -142310,12 +142314,12 @@ function drag(el, binding, vnode) {
142310
142314
 
142311
142315
  let styL, styT; // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
142312
142316
 
142313
- if (!sty.left.includes('%')) {
142314
- styL = +sty.left.replace(/\px/g, '');
142315
- styT = +sty.top.replace(/\px/g, '');
142317
+ if (!sty.marginLeft.includes('%')) {
142318
+ styL = +sty.marginLeft.replace(/\px/g, '');
142319
+ styT = +sty.marginTop.replace(/\px/g, '');
142316
142320
  } else {
142317
- styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
142318
- styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
142321
+ styL = +document.body.clientWidth * (+sty.marginLeft.replace(/\%/g, '') / 100);
142322
+ styT = +document.body.clientHeight * (+sty.marginTop.replace(/\%/g, '') / 100);
142319
142323
  }
142320
142324
 
142321
142325
  document.onmousemove = function (e) {
@@ -142334,15 +142338,16 @@ function drag(el, binding, vnode) {
142334
142338
  } else if (top > maxDragDomTop) {
142335
142339
  top = maxDragDomTop;
142336
142340
  } // 移动当前元素
142337
- // dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
142338
142341
 
142339
142342
 
142340
- dragDom.style.top = `${top + styT}px`;
142341
- dragDom.style.left = `${left + styL}px`;
142342
- vnode.child.$emit('dragDialog');
142343
+ dragDom.style.marginTop = `${top + styT}px`;
142344
+ dragDom.style.marginLeft = `${left + styL}px`;
142345
+ dragDom.style.userSelect = 'none';
142346
+ vNode.child.$emit('dragDialog');
142343
142347
  };
142344
142348
 
142345
142349
  document.onmouseup = function () {
142350
+ dragDom.style.userSelect = 'auto';
142346
142351
  document.onmousemove = null;
142347
142352
  document.onmouseup = null;
142348
142353
  };
@@ -142352,21 +142357,39 @@ function drag(el, binding, vnode) {
142352
142357
  }
142353
142358
  ;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/resize.js
142354
142359
  /** 弹框拖拽改变大小 */
142355
- function resize(el, binding, value) {
142360
+ function resize(el, binding, vNode) {
142356
142361
  const minWidth = 400;
142357
- const minHeight = 400;
142362
+ const minHeight = 250;
142358
142363
  const dragDom = el.querySelector('.el-dialog');
142364
+ const dialogHeaderEl = el.querySelector('.el-dialog__header');
142365
+
142366
+ const setDragDomWidth = (marginLeft, newWidth) => {
142367
+ if (marginLeft > 0 && newWidth > minWidth && marginLeft + newWidth <= document.body.clientWidth) {
142368
+ dragDom.style.marginLeft = marginLeft + 'px';
142369
+ dragDom.style.width = newWidth + 'px';
142370
+ }
142371
+ };
142372
+
142373
+ const setDragDomHeight = newHeight => {
142374
+ if (newHeight + dragDom.offsetTop <= document.body.clientHeight && newHeight >= minHeight) {
142375
+ dragDom.style.height = newHeight + 'px';
142376
+ }
142377
+ };
142359
142378
 
142360
142379
  dragDom.onmousemove = function (e) {
142361
142380
  // 图标变换
142362
- if (dragDom.offsetLeft + 10 > e.clientX) {
142363
- dragDom.style.cursor = 'w-resize';
142364
- } else if (e.clientX > dragDom.offsetLeft + dragDom.clientWidth - 10) {
142365
- dragDom.style.cursor = 'e-resize';
142366
- } else if (el.scrollTop + e.clientY > dragDom.offsetTop + dragDom.clientHeight - 10) {
142381
+ const isLeft = dragDom.offsetLeft + 10 > e.clientX;
142382
+ const isRight = e.clientX > dragDom.offsetLeft + dragDom.clientWidth - 10;
142383
+ const isBottom = el.scrollTop + e.clientY > dragDom.offsetTop + dragDom.clientHeight - 10;
142384
+
142385
+ if (isLeft) {
142386
+ dragDom.style.cursor = isBottom ? 'nesw-resize' : 'w-resize';
142387
+ } else if (isRight) {
142388
+ dragDom.style.cursor = isBottom ? 'nwse-resize' : 'e-resize';
142389
+ } else if (isBottom) {
142367
142390
  dragDom.style.cursor = 's-resize';
142368
142391
  } else {
142369
- dragDom.style.cursor = 'default';
142392
+ dragDom.style.cursor = 'auto';
142370
142393
  dragDom.onmousedown = null;
142371
142394
  } // 改变大小
142372
142395
 
@@ -142374,72 +142397,68 @@ function resize(el, binding, value) {
142374
142397
  dragDom.onmousedown = e => {
142375
142398
  const clientX = e.clientX;
142376
142399
  const clientY = e.clientY;
142377
- let elW = dragDom.clientWidth;
142378
- let elH = dragDom.clientHeight;
142379
- let EloffsetLeft = dragDom.offsetLeft;
142380
- let EloffsetTop = dragDom.offsetTop;
142381
- dragDom.style.userSelect = 'none';
142382
- let ELscrollTop = el.scrollTop; // 判断点击的位置是不是为头部
142400
+ const elW = dragDom.clientWidth;
142401
+ const elH = dragDom.clientHeight;
142402
+ const ELscrollTop = el.scrollTop;
142403
+ const EloffsetTop = dragDom.offsetTop;
142404
+ const EloffsetLeft = dragDom.offsetLeft; // 判断点击的位置是不是为头部
142383
142405
 
142384
- if (clientX > EloffsetLeft && clientX < EloffsetLeft + elW && clientY > EloffsetTop && clientY < EloffsetTop + 100) {// 如果是头部在此就不做任何动作,以上有绑定dialogHeaderEl.onmousedown = moveDown;
142406
+ if (clientX > EloffsetLeft && clientX < EloffsetLeft + elW && clientY > EloffsetTop && clientY < EloffsetTop + dialogHeaderEl.clientHeight) {// 如果是头部在此就不做任何动作,以上有绑定dialogHeaderEl.onmousedown = moveDown;
142385
142407
  } else {
142386
142408
  document.onmousemove = function (e) {
142387
- e.preventDefault(); // 移动时禁用默认事件
142409
+ // e.preventDefault()
142388
142410
  // 左侧鼠标拖拽位置
142389
-
142390
142411
  if (clientX > EloffsetLeft && clientX < EloffsetLeft + 10) {
142391
- // 往左拖拽
142412
+ dragDom.style.userSelect = 'none'; // 往左拖拽
142413
+
142392
142414
  if (clientX > e.clientX) {
142393
- dragDom.style.width = elW + (clientX - e.clientX) * 2 + 'px';
142415
+ const moveLen = clientX - e.clientX;
142416
+ setDragDomWidth(EloffsetLeft - moveLen, elW + moveLen);
142394
142417
  } // 往右拖拽
142395
142418
 
142396
142419
 
142397
142420
  if (clientX < e.clientX) {
142398
- if (dragDom.clientWidth < minWidth) {
142399
- console.log();
142400
- } else {
142401
- dragDom.style.width = elW - (e.clientX - clientX) * 2 + 'px';
142402
- }
142421
+ const moveLen = e.clientX - clientX;
142422
+ setDragDomWidth(EloffsetLeft + moveLen, elW - moveLen);
142403
142423
  }
142404
142424
  } // 右侧鼠标拖拽位置
142405
142425
 
142406
142426
 
142407
142427
  if (clientX > EloffsetLeft + elW - 10 && clientX < EloffsetLeft + elW) {
142408
- // 往左拖拽
142428
+ dragDom.style.userSelect = 'none'; // 往左拖拽
142429
+
142409
142430
  if (clientX > e.clientX) {
142410
- if (dragDom.clientWidth < minWidth) {
142411
- console.log();
142412
- } else {
142413
- dragDom.style.width = elW - (clientX - e.clientX) * 2 + 'px';
142414
- }
142431
+ const moveLen = clientX - e.clientX;
142432
+ setDragDomWidth(EloffsetLeft, elW - moveLen);
142415
142433
  } // 往右拖拽
142416
142434
 
142417
142435
 
142418
142436
  if (clientX < e.clientX) {
142419
- dragDom.style.width = elW + (e.clientX - clientX) * 2 + 'px';
142437
+ const moveLen = e.clientX - clientX;
142438
+ setDragDomWidth(EloffsetLeft, elW + moveLen);
142420
142439
  }
142421
142440
  } // 底部鼠标拖拽位置
142422
142441
 
142423
142442
 
142424
142443
  if (ELscrollTop + clientY > EloffsetTop + elH - 20 && ELscrollTop + clientY < EloffsetTop + elH) {
142425
- // 往上拖拽
142444
+ dragDom.style.userSelect = 'none'; // 往上拖拽
142445
+
142426
142446
  if (clientY > e.clientY) {
142427
- if (dragDom.clientHeight < minHeight) {
142428
- console.log();
142429
- } else {
142430
- dragDom.style.height = elH - (clientY - e.clientY) * 2 + 'px';
142431
- }
142447
+ const moveLen = clientY - e.clientY;
142448
+ setDragDomHeight(elH - moveLen);
142432
142449
  } // 往下拖拽
142433
142450
 
142434
142451
 
142435
142452
  if (clientY < e.clientY) {
142436
- dragDom.style.height = elH + (e.clientY - clientY) * 2 + 'px';
142453
+ const moveLen = e.clientY - clientY;
142454
+ setDragDomHeight(elH + moveLen);
142437
142455
  }
142438
142456
  }
142439
142457
  }; // 拉伸结束
142440
142458
 
142441
142459
 
142442
142460
  document.onmouseup = function (e) {
142461
+ dragDom.style.userSelect = 'auto';
142443
142462
  document.onmousemove = null;
142444
142463
  document.onmouseup = null;
142445
142464
  };
@@ -142449,15 +142468,14 @@ function resize(el, binding, value) {
142449
142468
  }
142450
142469
  ;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/full.js
142451
142470
  /** 弹框支持全屏 */
142452
- function fullScreen(el, binding, vnode) {
142453
- //当前宽高
142471
+ function fullScreen(el, binding, vNode) {
142454
142472
  let nowWidth = 0;
142455
- let nowHight = 0; //当前顶部高度
142456
-
142473
+ let nowHight = 0;
142457
142474
  let nowMarginTop = 0;
142475
+ let nowMarginLeft = 0;
142458
142476
  let isFullScreen = false;
142459
- const dialogHeaderEl = el.querySelector('.el-dialog__header');
142460
142477
  const dragDom = el.querySelector('.el-dialog');
142478
+ const dialogHeaderEl = el.querySelector('.el-dialog__header');
142461
142479
 
142462
142480
  dialogHeaderEl.ondblclick = e => {
142463
142481
  if (isFullScreen == false) {
@@ -142465,18 +142483,21 @@ function fullScreen(el, binding, vnode) {
142465
142483
  nowHight = dragDom.clientHeight;
142466
142484
  nowWidth = dragDom.clientWidth;
142467
142485
  nowMarginTop = dragDom.style.marginTop;
142486
+ nowMarginLeft = dragDom.style.marginLeft;
142468
142487
  dragDom.style.left = 0;
142469
142488
  dragDom.style.top = 0;
142470
142489
  dragDom.style.height = '100vh';
142471
142490
  dragDom.style.width = '100vw';
142472
142491
  dragDom.style.marginTop = 0;
142473
- dialogHeaderEl.style.cursor = 'initial'; // TODO: dialogHeaderEl.onmousedown = null
142492
+ dragDom.style.marginLeft = 0;
142493
+ dialogHeaderEl.style.cursor = 'initial';
142474
142494
  } else {
142475
142495
  isFullScreen = false;
142476
- dragDom.style.height = 'auto';
142477
142496
  dragDom.style.width = nowWidth + 'px';
142497
+ dragDom.style.height = nowHight + 'px';
142478
142498
  dragDom.style.marginTop = nowMarginTop;
142479
- dialogHeaderEl.style.cursor = 'move'; // TODO: dialogHeaderEl.onmousedown = moveDown
142499
+ dragDom.style.marginLeft = nowMarginLeft;
142500
+ dialogHeaderEl.style.cursor = 'move';
142480
142501
  }
142481
142502
  };
142482
142503
  }
@@ -142488,14 +142509,17 @@ function fullScreen(el, binding, vnode) {
142488
142509
 
142489
142510
 
142490
142511
 
142512
+
142491
142513
  const ElDialogDrag = {
142492
- bind(el, binding, vnode) {
142493
- // 弹框可拖拽
142494
- drag(el, binding, vnode); // 弹框可拖拽大小
142514
+ bind(el, binding, vNode) {
142515
+ // 弹框初始化
142516
+ init(el, binding, vNode); // 弹框可拖拽
142495
142517
 
142496
- resize(el, binding, vnode); // 弹框可全屏
142518
+ drag(el, binding, vNode); // 弹框可拖拽大小
142497
142519
 
142498
- fullScreen(el, binding, vnode);
142520
+ resize(el, binding, vNode); // 弹框可全屏
142521
+
142522
+ fullScreen(el, binding, vNode);
142499
142523
  }
142500
142524
 
142501
142525
  };
@@ -244332,8 +244356,8 @@ var push_down_component = (0,componentNormalizer/* default */.Z)(
244332
244356
 
244333
244357
  }
244334
244358
  });
244335
- // EXTERNAL MODULE: ./src/directives/index.js + 31 modules
244336
- var directives = __webpack_require__(7183);
244359
+ // EXTERNAL MODULE: ./src/directives/index.js + 32 modules
244360
+ var directives = __webpack_require__(27499);
244337
244361
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/t-data-list/main.vue?vue&type=script&lang=js&
244338
244362
  //
244339
244363
  //
@@ -249372,8 +249396,8 @@ const components = [package_t_input, svg_icon, package_tf_widget, package_tf_lay
249372
249396
  const install = function (Vue) {
249373
249397
  components.forEach(component => {
249374
249398
  Vue.component(component.name, component);
249375
- }); // Vue.directive('elDialogDrag', ElDialogDrag)
249376
-
249399
+ });
249400
+ Vue.directive('elDialogDrag', directives/* ElDialogDrag */.Lh);
249377
249401
  Vue.directive('umyColumnWidth', directives/* umyColumnWidth */.AB);
249378
249402
  Vue.directive('umyTableSetting', directives/* umyTableSetting */.b$);
249379
249403
  Vue.directive('tableAutoHeight', directives/* tableAutoHeight */.Cq);
@@ -140090,8 +140090,8 @@ var component = (0,componentNormalizer/* default */.Z)(
140090
140090
  /* harmony default export */ var tf_filter = (component.exports);
140091
140091
  // EXTERNAL MODULE: ./src/utils/index.js
140092
140092
  var utils = __webpack_require__(68023);
140093
- // EXTERNAL MODULE: ./src/directives/index.js + 31 modules
140094
- var directives = __webpack_require__(84962);
140093
+ // EXTERNAL MODULE: ./src/directives/index.js + 32 modules
140094
+ var directives = __webpack_require__(6208);
140095
140095
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table/src/index.vue?vue&type=script&lang=js&
140096
140096
  //
140097
140097
  //
@@ -140841,21 +140841,20 @@ function getVoucherIds(data) {
140841
140841
 
140842
140842
  /***/ }),
140843
140843
 
140844
- /***/ 84962:
140844
+ /***/ 6208:
140845
140845
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
140846
140846
 
140847
140847
  "use strict";
140848
140848
 
140849
140849
  // EXPORTS
140850
140850
  __webpack_require__.d(__webpack_exports__, {
140851
+ "Lh": function() { return /* reexport */ ElDialogDrag; },
140851
140852
  "Ds": function() { return /* reexport */ debounce; },
140852
140853
  "Cq": function() { return /* reexport */ tableAutoHeight; },
140853
140854
  "AB": function() { return /* reexport */ umyColumnWidth; },
140854
140855
  "b$": function() { return /* reexport */ umyTableSetting; }
140855
140856
  });
140856
140857
 
140857
- // UNUSED EXPORTS: ElDialogDrag
140858
-
140859
140858
  ;// CONCATENATED MODULE: ./src/directives/modules/debounce.js
140860
140859
  const debounce = {
140861
140860
  bind: function (el, {
@@ -142289,14 +142288,19 @@ const tableAutoHeight = {
142289
142288
  }
142290
142289
 
142291
142290
  };
142291
+ ;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/init.js
142292
+ /** 弹框初始化 */
142293
+ function init(el, binding, vNode) {
142294
+ const dialogInstance = vNode.componentInstance;
142295
+ dialogInstance.closeOnClickModal = false;
142296
+ }
142292
142297
  ;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/drag.js
142293
142298
  /** 弹框支持拖拽 */
142294
- function drag(el, binding, vnode) {
142299
+ function drag(el, binding, vNode) {
142295
142300
  const dragDom = el.querySelector('.el-dialog');
142296
142301
  const dialogHeaderEl = el.querySelector('.el-dialog__header');
142297
142302
  dragDom.style.overflow = 'auto';
142298
- dialogHeaderEl.style.cursor = 'move'; // dragDom.style.cssText += ';top:0px;'
142299
-
142303
+ dialogHeaderEl.style.cursor = 'move';
142300
142304
  /**
142301
142305
  * 获取原有属性
142302
142306
  * IE dom元素.currentStyle
@@ -142320,12 +142324,12 @@ function drag(el, binding, vnode) {
142320
142324
 
142321
142325
  let styL, styT; // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
142322
142326
 
142323
- if (!sty.left.includes('%')) {
142324
- styL = +sty.left.replace(/\px/g, '');
142325
- styT = +sty.top.replace(/\px/g, '');
142327
+ if (!sty.marginLeft.includes('%')) {
142328
+ styL = +sty.marginLeft.replace(/\px/g, '');
142329
+ styT = +sty.marginTop.replace(/\px/g, '');
142326
142330
  } else {
142327
- styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
142328
- styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
142331
+ styL = +document.body.clientWidth * (+sty.marginLeft.replace(/\%/g, '') / 100);
142332
+ styT = +document.body.clientHeight * (+sty.marginTop.replace(/\%/g, '') / 100);
142329
142333
  }
142330
142334
 
142331
142335
  document.onmousemove = function (e) {
@@ -142344,15 +142348,16 @@ function drag(el, binding, vnode) {
142344
142348
  } else if (top > maxDragDomTop) {
142345
142349
  top = maxDragDomTop;
142346
142350
  } // 移动当前元素
142347
- // dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
142348
142351
 
142349
142352
 
142350
- dragDom.style.top = `${top + styT}px`;
142351
- dragDom.style.left = `${left + styL}px`;
142352
- vnode.child.$emit('dragDialog');
142353
+ dragDom.style.marginTop = `${top + styT}px`;
142354
+ dragDom.style.marginLeft = `${left + styL}px`;
142355
+ dragDom.style.userSelect = 'none';
142356
+ vNode.child.$emit('dragDialog');
142353
142357
  };
142354
142358
 
142355
142359
  document.onmouseup = function () {
142360
+ dragDom.style.userSelect = 'auto';
142356
142361
  document.onmousemove = null;
142357
142362
  document.onmouseup = null;
142358
142363
  };
@@ -142362,21 +142367,39 @@ function drag(el, binding, vnode) {
142362
142367
  }
142363
142368
  ;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/resize.js
142364
142369
  /** 弹框拖拽改变大小 */
142365
- function resize(el, binding, value) {
142370
+ function resize(el, binding, vNode) {
142366
142371
  const minWidth = 400;
142367
- const minHeight = 400;
142372
+ const minHeight = 250;
142368
142373
  const dragDom = el.querySelector('.el-dialog');
142374
+ const dialogHeaderEl = el.querySelector('.el-dialog__header');
142375
+
142376
+ const setDragDomWidth = (marginLeft, newWidth) => {
142377
+ if (marginLeft > 0 && newWidth > minWidth && marginLeft + newWidth <= document.body.clientWidth) {
142378
+ dragDom.style.marginLeft = marginLeft + 'px';
142379
+ dragDom.style.width = newWidth + 'px';
142380
+ }
142381
+ };
142382
+
142383
+ const setDragDomHeight = newHeight => {
142384
+ if (newHeight + dragDom.offsetTop <= document.body.clientHeight && newHeight >= minHeight) {
142385
+ dragDom.style.height = newHeight + 'px';
142386
+ }
142387
+ };
142369
142388
 
142370
142389
  dragDom.onmousemove = function (e) {
142371
142390
  // 图标变换
142372
- if (dragDom.offsetLeft + 10 > e.clientX) {
142373
- dragDom.style.cursor = 'w-resize';
142374
- } else if (e.clientX > dragDom.offsetLeft + dragDom.clientWidth - 10) {
142375
- dragDom.style.cursor = 'e-resize';
142376
- } else if (el.scrollTop + e.clientY > dragDom.offsetTop + dragDom.clientHeight - 10) {
142391
+ const isLeft = dragDom.offsetLeft + 10 > e.clientX;
142392
+ const isRight = e.clientX > dragDom.offsetLeft + dragDom.clientWidth - 10;
142393
+ const isBottom = el.scrollTop + e.clientY > dragDom.offsetTop + dragDom.clientHeight - 10;
142394
+
142395
+ if (isLeft) {
142396
+ dragDom.style.cursor = isBottom ? 'nesw-resize' : 'w-resize';
142397
+ } else if (isRight) {
142398
+ dragDom.style.cursor = isBottom ? 'nwse-resize' : 'e-resize';
142399
+ } else if (isBottom) {
142377
142400
  dragDom.style.cursor = 's-resize';
142378
142401
  } else {
142379
- dragDom.style.cursor = 'default';
142402
+ dragDom.style.cursor = 'auto';
142380
142403
  dragDom.onmousedown = null;
142381
142404
  } // 改变大小
142382
142405
 
@@ -142384,72 +142407,68 @@ function resize(el, binding, value) {
142384
142407
  dragDom.onmousedown = e => {
142385
142408
  const clientX = e.clientX;
142386
142409
  const clientY = e.clientY;
142387
- let elW = dragDom.clientWidth;
142388
- let elH = dragDom.clientHeight;
142389
- let EloffsetLeft = dragDom.offsetLeft;
142390
- let EloffsetTop = dragDom.offsetTop;
142391
- dragDom.style.userSelect = 'none';
142392
- let ELscrollTop = el.scrollTop; // 判断点击的位置是不是为头部
142410
+ const elW = dragDom.clientWidth;
142411
+ const elH = dragDom.clientHeight;
142412
+ const ELscrollTop = el.scrollTop;
142413
+ const EloffsetTop = dragDom.offsetTop;
142414
+ const EloffsetLeft = dragDom.offsetLeft; // 判断点击的位置是不是为头部
142393
142415
 
142394
- if (clientX > EloffsetLeft && clientX < EloffsetLeft + elW && clientY > EloffsetTop && clientY < EloffsetTop + 100) {// 如果是头部在此就不做任何动作,以上有绑定dialogHeaderEl.onmousedown = moveDown;
142416
+ if (clientX > EloffsetLeft && clientX < EloffsetLeft + elW && clientY > EloffsetTop && clientY < EloffsetTop + dialogHeaderEl.clientHeight) {// 如果是头部在此就不做任何动作,以上有绑定dialogHeaderEl.onmousedown = moveDown;
142395
142417
  } else {
142396
142418
  document.onmousemove = function (e) {
142397
- e.preventDefault(); // 移动时禁用默认事件
142419
+ // e.preventDefault()
142398
142420
  // 左侧鼠标拖拽位置
142399
-
142400
142421
  if (clientX > EloffsetLeft && clientX < EloffsetLeft + 10) {
142401
- // 往左拖拽
142422
+ dragDom.style.userSelect = 'none'; // 往左拖拽
142423
+
142402
142424
  if (clientX > e.clientX) {
142403
- dragDom.style.width = elW + (clientX - e.clientX) * 2 + 'px';
142425
+ const moveLen = clientX - e.clientX;
142426
+ setDragDomWidth(EloffsetLeft - moveLen, elW + moveLen);
142404
142427
  } // 往右拖拽
142405
142428
 
142406
142429
 
142407
142430
  if (clientX < e.clientX) {
142408
- if (dragDom.clientWidth < minWidth) {
142409
- console.log();
142410
- } else {
142411
- dragDom.style.width = elW - (e.clientX - clientX) * 2 + 'px';
142412
- }
142431
+ const moveLen = e.clientX - clientX;
142432
+ setDragDomWidth(EloffsetLeft + moveLen, elW - moveLen);
142413
142433
  }
142414
142434
  } // 右侧鼠标拖拽位置
142415
142435
 
142416
142436
 
142417
142437
  if (clientX > EloffsetLeft + elW - 10 && clientX < EloffsetLeft + elW) {
142418
- // 往左拖拽
142438
+ dragDom.style.userSelect = 'none'; // 往左拖拽
142439
+
142419
142440
  if (clientX > e.clientX) {
142420
- if (dragDom.clientWidth < minWidth) {
142421
- console.log();
142422
- } else {
142423
- dragDom.style.width = elW - (clientX - e.clientX) * 2 + 'px';
142424
- }
142441
+ const moveLen = clientX - e.clientX;
142442
+ setDragDomWidth(EloffsetLeft, elW - moveLen);
142425
142443
  } // 往右拖拽
142426
142444
 
142427
142445
 
142428
142446
  if (clientX < e.clientX) {
142429
- dragDom.style.width = elW + (e.clientX - clientX) * 2 + 'px';
142447
+ const moveLen = e.clientX - clientX;
142448
+ setDragDomWidth(EloffsetLeft, elW + moveLen);
142430
142449
  }
142431
142450
  } // 底部鼠标拖拽位置
142432
142451
 
142433
142452
 
142434
142453
  if (ELscrollTop + clientY > EloffsetTop + elH - 20 && ELscrollTop + clientY < EloffsetTop + elH) {
142435
- // 往上拖拽
142454
+ dragDom.style.userSelect = 'none'; // 往上拖拽
142455
+
142436
142456
  if (clientY > e.clientY) {
142437
- if (dragDom.clientHeight < minHeight) {
142438
- console.log();
142439
- } else {
142440
- dragDom.style.height = elH - (clientY - e.clientY) * 2 + 'px';
142441
- }
142457
+ const moveLen = clientY - e.clientY;
142458
+ setDragDomHeight(elH - moveLen);
142442
142459
  } // 往下拖拽
142443
142460
 
142444
142461
 
142445
142462
  if (clientY < e.clientY) {
142446
- dragDom.style.height = elH + (e.clientY - clientY) * 2 + 'px';
142463
+ const moveLen = e.clientY - clientY;
142464
+ setDragDomHeight(elH + moveLen);
142447
142465
  }
142448
142466
  }
142449
142467
  }; // 拉伸结束
142450
142468
 
142451
142469
 
142452
142470
  document.onmouseup = function (e) {
142471
+ dragDom.style.userSelect = 'auto';
142453
142472
  document.onmousemove = null;
142454
142473
  document.onmouseup = null;
142455
142474
  };
@@ -142459,15 +142478,14 @@ function resize(el, binding, value) {
142459
142478
  }
142460
142479
  ;// CONCATENATED MODULE: ./src/directives/modules/el-dialog-drag/js/full.js
142461
142480
  /** 弹框支持全屏 */
142462
- function fullScreen(el, binding, vnode) {
142463
- //当前宽高
142481
+ function fullScreen(el, binding, vNode) {
142464
142482
  let nowWidth = 0;
142465
- let nowHight = 0; //当前顶部高度
142466
-
142483
+ let nowHight = 0;
142467
142484
  let nowMarginTop = 0;
142485
+ let nowMarginLeft = 0;
142468
142486
  let isFullScreen = false;
142469
- const dialogHeaderEl = el.querySelector('.el-dialog__header');
142470
142487
  const dragDom = el.querySelector('.el-dialog');
142488
+ const dialogHeaderEl = el.querySelector('.el-dialog__header');
142471
142489
 
142472
142490
  dialogHeaderEl.ondblclick = e => {
142473
142491
  if (isFullScreen == false) {
@@ -142475,18 +142493,21 @@ function fullScreen(el, binding, vnode) {
142475
142493
  nowHight = dragDom.clientHeight;
142476
142494
  nowWidth = dragDom.clientWidth;
142477
142495
  nowMarginTop = dragDom.style.marginTop;
142496
+ nowMarginLeft = dragDom.style.marginLeft;
142478
142497
  dragDom.style.left = 0;
142479
142498
  dragDom.style.top = 0;
142480
142499
  dragDom.style.height = '100vh';
142481
142500
  dragDom.style.width = '100vw';
142482
142501
  dragDom.style.marginTop = 0;
142483
- dialogHeaderEl.style.cursor = 'initial'; // TODO: dialogHeaderEl.onmousedown = null
142502
+ dragDom.style.marginLeft = 0;
142503
+ dialogHeaderEl.style.cursor = 'initial';
142484
142504
  } else {
142485
142505
  isFullScreen = false;
142486
- dragDom.style.height = 'auto';
142487
142506
  dragDom.style.width = nowWidth + 'px';
142507
+ dragDom.style.height = nowHight + 'px';
142488
142508
  dragDom.style.marginTop = nowMarginTop;
142489
- dialogHeaderEl.style.cursor = 'move'; // TODO: dialogHeaderEl.onmousedown = moveDown
142509
+ dragDom.style.marginLeft = nowMarginLeft;
142510
+ dialogHeaderEl.style.cursor = 'move';
142490
142511
  }
142491
142512
  };
142492
142513
  }
@@ -142498,14 +142519,17 @@ function fullScreen(el, binding, vnode) {
142498
142519
 
142499
142520
 
142500
142521
 
142522
+
142501
142523
  const ElDialogDrag = {
142502
- bind(el, binding, vnode) {
142503
- // 弹框可拖拽
142504
- drag(el, binding, vnode); // 弹框可拖拽大小
142524
+ bind(el, binding, vNode) {
142525
+ // 弹框初始化
142526
+ init(el, binding, vNode); // 弹框可拖拽
142505
142527
 
142506
- resize(el, binding, vnode); // 弹框可全屏
142528
+ drag(el, binding, vNode); // 弹框可拖拽大小
142507
142529
 
142508
- fullScreen(el, binding, vnode);
142530
+ resize(el, binding, vNode); // 弹框可全屏
142531
+
142532
+ fullScreen(el, binding, vNode);
142509
142533
  }
142510
142534
 
142511
142535
  };
@@ -244342,8 +244366,8 @@ var push_down_component = (0,componentNormalizer/* default */.Z)(
244342
244366
 
244343
244367
  }
244344
244368
  });
244345
- // EXTERNAL MODULE: ./src/directives/index.js + 31 modules
244346
- var directives = __webpack_require__(84962);
244369
+ // EXTERNAL MODULE: ./src/directives/index.js + 32 modules
244370
+ var directives = __webpack_require__(6208);
244347
244371
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/t-data-list/main.vue?vue&type=script&lang=js&
244348
244372
  //
244349
244373
  //
@@ -249382,8 +249406,8 @@ const components = [package_t_input, svg_icon, package_tf_widget, package_tf_lay
249382
249406
  const install = function (Vue) {
249383
249407
  components.forEach(component => {
249384
249408
  Vue.component(component.name, component);
249385
- }); // Vue.directive('elDialogDrag', ElDialogDrag)
249386
-
249409
+ });
249410
+ Vue.directive('elDialogDrag', directives/* ElDialogDrag */.Lh);
249387
249411
  Vue.directive('umyColumnWidth', directives/* umyColumnWidth */.AB);
249388
249412
  Vue.directive('umyTableSetting', directives/* umyTableSetting */.b$);
249389
249413
  Vue.directive('tableAutoHeight', directives/* tableAutoHeight */.Cq);