@v2coding/ui 1.5.1 → 1.5.3
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.
- package/dist/v2coding-ui.esm.js +64 -48
- package/dist/v2coding-ui.min.js +1 -1
- package/dist/v2coding-ui.ssr.js +65 -49
- package/package.json +1 -1
package/dist/v2coding-ui.esm.js
CHANGED
|
@@ -7753,6 +7753,10 @@ var script$9 = {
|
|
|
7753
7753
|
rowSelect: {
|
|
7754
7754
|
type: Boolean,
|
|
7755
7755
|
default: true
|
|
7756
|
+
},
|
|
7757
|
+
emptyMessage: {
|
|
7758
|
+
type: String,
|
|
7759
|
+
default: '暂无数据'
|
|
7756
7760
|
}
|
|
7757
7761
|
},
|
|
7758
7762
|
|
|
@@ -8524,7 +8528,7 @@ var __vue_render__$9 = function () {
|
|
|
8524
8528
|
fn: function () {
|
|
8525
8529
|
return [_c('div', {
|
|
8526
8530
|
staticClass: "ui-table-empty"
|
|
8527
|
-
}, [_vm._v(
|
|
8531
|
+
}, [_vm._v(_vm._s(_vm.emptyMessage))])];
|
|
8528
8532
|
},
|
|
8529
8533
|
proxy: true
|
|
8530
8534
|
}])
|
|
@@ -8549,7 +8553,7 @@ var __vue_staticRenderFns__$9 = [];
|
|
|
8549
8553
|
|
|
8550
8554
|
const __vue_inject_styles__$9 = function (inject) {
|
|
8551
8555
|
if (!inject) return;
|
|
8552
|
-
inject("data-v-
|
|
8556
|
+
inject("data-v-24011210_0", {
|
|
8553
8557
|
source: ".ui-table{flex:1;display:flex;flex-direction:column;z-index:0;background-color:#fff;padding:15px 20px}.ui-table .ui-table-select-bar{flex:none}.ui-table .ui-table-select-bar .ui-table-select{position:relative;padding-right:100px}.ui-table .ui-table-select-bar .ui-table-select.has-reset{padding-right:200px}.ui-table .ui-table-select-bar .ui-table-select .submit-item{position:absolute;top:0;right:0;margin-right:0;margin-bottom:0}.ui-table .ui-table-select-bar .el-input{width:200px}.ui-table .ui-table-tool-bar{padding:10px 0;flex:none;display:flex;flex-wrap:wrap;align-items:center;flex-direction:row;background-color:#fff}.ui-table .private-tools{z-index:1;position:absolute;top:8px;right:5px;display:flex;flex-direction:row;padding-left:20px}.ui-table .private-tools .tool+.tool{margin-left:5px}.ui-table .private-tools .el-button.el-tooltip{background:rgba(255,255,255,.6);backdrop-filter:blur(3px);box-shadow:0 0 3px #999}.ui-table .ui-table-alert{margin-bottom:10px;border:1px solid #b3d8ff;background-color:#ecf5ff;border-radius:3px;padding:8px 10px}.ui-table .ui-table-alert .el-icon-info{color:#409eff;margin-right:6px}.ui-table .ui-table-alert .el-button--text{padding:0;margin-left:10px}.ui-table .el-table{flex:1;border:1px solid #ebeef5;border-bottom:none;z-index:0}.ui-table .footer-bar{flex:none;display:block;padding:20px 15px 15px;background-color:#fff}.ui-table .footer-bar .el-pagination{padding:0;display:flex;flex-direction:row-reverse}.ui-table .footer-bar .el-pagination .el-pagination__rightwrapper+*{flex:1;text-align:left}.ui-table .footer-bar .el-pagination::after,.ui-table .footer-bar .el-pagination::before{content:unset}.ui-table .ui-table-empty{padding-top:110px;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgdmlld0JveD0iMCAwIDE4NCAxNTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDMxLjY3KSI+CiAgICAgIDxlbGxpcHNlIGZpbGwtb3BhY2l0eT0iLjgiIGZpbGw9IiNGNUY1RjciIGN4PSI2Ny43OTciIGN5PSIxMDYuODkiIHJ4PSI2Ny43OTciIHJ5PSIxMi42NjgiPjwvZWxsaXBzZT4KICAgICAgPHBhdGggZD0iTTEyMi4wMzQgNjkuNjc0TDk4LjEwOSA0MC4yMjljLTEuMTQ4LTEuMzg2LTIuODI2LTIuMjI1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 100px;color:rgba(0,0,0,.65);font-size:14px;line-height:22px;text-align:center}.column-label{width:80px;display:inline-block;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-table-column-action .el-button{box-shadow:none;padding:0;line-height:inherit}",
|
|
8554
8558
|
map: undefined,
|
|
8555
8559
|
media: undefined
|
|
@@ -9791,12 +9795,7 @@ var Drag = {
|
|
|
9791
9795
|
name: 'dialogDrag',
|
|
9792
9796
|
|
|
9793
9797
|
bind(el) {
|
|
9794
|
-
|
|
9795
|
-
const dragDom = el.querySelector('.el-dialog'); //dialogHeaderEl.style.cursor = 'move';
|
|
9796
|
-
|
|
9797
|
-
dialogHeaderEl.style.cssText += ';cursor:move;';
|
|
9798
|
-
dragDom.style.cssText += ';top:0px;'; // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
|
|
9799
|
-
|
|
9798
|
+
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
|
|
9800
9799
|
const sty = function () {
|
|
9801
9800
|
if (window.document.currentStyle) {
|
|
9802
9801
|
return (dom, attr) => dom.currentStyle[attr];
|
|
@@ -9805,60 +9804,77 @@ var Drag = {
|
|
|
9805
9804
|
}
|
|
9806
9805
|
}();
|
|
9807
9806
|
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
const
|
|
9811
|
-
|
|
9812
|
-
|
|
9807
|
+
const init = () => {
|
|
9808
|
+
const dialogHeaderEl = el.querySelector('.el-dialog__header');
|
|
9809
|
+
const dragDom = el.querySelector('.el-dialog');
|
|
9810
|
+
dialogHeaderEl.style.cssText += ';cursor:move;';
|
|
9811
|
+
dragDom.style.cssText += ';top:0px;';
|
|
9813
9812
|
|
|
9814
|
-
|
|
9813
|
+
dialogHeaderEl.onmousedown = e => {
|
|
9814
|
+
// 鼠标按下,计算当前元素距离可视区的距离
|
|
9815
|
+
const disX = e.clientX - dialogHeaderEl.offsetLeft;
|
|
9816
|
+
const disY = e.clientY - dialogHeaderEl.offsetTop;
|
|
9817
|
+
const screenWidth = el.scrollWidth; // body当前宽度
|
|
9815
9818
|
|
|
9816
|
-
|
|
9819
|
+
const screenHeight = el.scrollHeight; // 可见区域高度(应为body高度,可某些环境下无法获取)
|
|
9817
9820
|
|
|
9818
|
-
|
|
9821
|
+
const dragDomWidth = dragDom.offsetWidth; // 对话框宽度
|
|
9819
9822
|
|
|
9820
|
-
|
|
9821
|
-
const maxDragDomLeft = Math.max(0, screenWidth - dragDom.offsetLeft - dragDomWidth);
|
|
9822
|
-
const minDragDomTop = dragDom.offsetTop;
|
|
9823
|
-
const maxDragDomTop = Math.max(0, screenHeight - dragDom.offsetTop - dragDomheight); // 获取到的值带px 正则匹配替换
|
|
9823
|
+
const dragDomheight = dragDom.offsetHeight; // 对话框高度
|
|
9824
9824
|
|
|
9825
|
-
|
|
9826
|
-
|
|
9825
|
+
const minDragDomLeft = dragDom.offsetLeft;
|
|
9826
|
+
const maxDragDomLeft = Math.max(0, screenWidth - dragDom.offsetLeft - dragDomWidth);
|
|
9827
|
+
const minDragDomTop = dragDom.offsetTop;
|
|
9828
|
+
const maxDragDomTop = Math.max(0, screenHeight - dragDom.offsetTop - dragDomheight); // 获取到的值带px 正则匹配替换
|
|
9827
9829
|
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
styT = +document.body.clientHeight * (+styT.replace(/%/g, '') / 100);
|
|
9831
|
-
} else {
|
|
9832
|
-
styL = +styL.replace(/px/g, '');
|
|
9833
|
-
styT = +styT.replace(/px/g, '');
|
|
9834
|
-
}
|
|
9835
|
-
|
|
9836
|
-
document.onmousemove = function (e) {
|
|
9837
|
-
// 通过事件委托,计算移动的距离
|
|
9838
|
-
let left = e.clientX - disX;
|
|
9839
|
-
let top = e.clientY - disY; // 边界处理
|
|
9830
|
+
let styL = sty(dragDom, 'left');
|
|
9831
|
+
let styT = sty(dragDom, 'top'); // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
|
|
9840
9832
|
|
|
9841
|
-
if (
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
|
|
9833
|
+
if (styL.includes('%')) {
|
|
9834
|
+
styL = +document.body.clientWidth * (+styL.replace(/%/g, '') / 100);
|
|
9835
|
+
styT = +document.body.clientHeight * (+styT.replace(/%/g, '') / 100);
|
|
9836
|
+
} else {
|
|
9837
|
+
styL = +styL.replace(/px/g, '');
|
|
9838
|
+
styT = +styT.replace(/px/g, '');
|
|
9845
9839
|
}
|
|
9846
9840
|
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
top =
|
|
9851
|
-
|
|
9841
|
+
document.onmousemove = function (e) {
|
|
9842
|
+
// 通过事件委托,计算移动的距离
|
|
9843
|
+
let left = e.clientX - disX;
|
|
9844
|
+
let top = e.clientY - disY; // 边界处理
|
|
9845
|
+
|
|
9846
|
+
if (-left > minDragDomLeft) {
|
|
9847
|
+
left = -minDragDomLeft;
|
|
9848
|
+
} else if (left > maxDragDomLeft) {
|
|
9849
|
+
left = maxDragDomLeft;
|
|
9850
|
+
}
|
|
9852
9851
|
|
|
9852
|
+
if (-top > minDragDomTop) {
|
|
9853
|
+
top = -minDragDomTop;
|
|
9854
|
+
} else if (top > maxDragDomTop) {
|
|
9855
|
+
top = maxDragDomTop;
|
|
9856
|
+
} // 移动当前元素
|
|
9853
9857
|
|
|
9854
|
-
dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`;
|
|
9855
|
-
};
|
|
9856
9858
|
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9859
|
+
dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`;
|
|
9860
|
+
};
|
|
9861
|
+
|
|
9862
|
+
document.onmouseup = function () {
|
|
9863
|
+
document.onmousemove = null;
|
|
9864
|
+
document.onmouseup = null;
|
|
9865
|
+
};
|
|
9860
9866
|
};
|
|
9861
9867
|
};
|
|
9868
|
+
|
|
9869
|
+
init();
|
|
9870
|
+
const observer = new MutationObserver(mutationsList => {
|
|
9871
|
+
init();
|
|
9872
|
+
});
|
|
9873
|
+
observer.observe(el, {
|
|
9874
|
+
childList: true,
|
|
9875
|
+
subtree: false,
|
|
9876
|
+
attributes: false
|
|
9877
|
+
});
|
|
9862
9878
|
}
|
|
9863
9879
|
|
|
9864
9880
|
};
|