bhd-components 0.9.18 → 0.9.20
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/index.esm.es5.development.css +124 -122
- package/dist/index.esm.es5.development.js +71 -25
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +1 -1
- package/dist/vendor.esm.es5.production.js +1 -1
- package/es2017/table/index.module.less +22 -14
- package/es2017/viewImage/index.js +69 -23
- package/es2017/viewImage/index.module.less +7 -7
- package/esm/table/index.module.less +22 -14
- package/esm/viewImage/index.js +69 -23
- package/esm/viewImage/index.module.less +7 -7
- package/package.json +1 -1
|
@@ -162,7 +162,7 @@ var TextTootip = function(props) {
|
|
|
162
162
|
};
|
|
163
163
|
var TextTootip$1 = TextTootip;
|
|
164
164
|
|
|
165
|
-
var modules_63b47c51$a = {"Table":"
|
|
165
|
+
var modules_63b47c51$a = {"Table":"index_module_Table__fa669d28","SmallTable":"index_module_SmallTable__fa669d28","columnTootipClassName":"index_module_columnTootipClassName__fa669d28"};
|
|
166
166
|
|
|
167
167
|
var widthPercentage = /^\d+%$/;
|
|
168
168
|
var widthPx = /^\d+px$/;
|
|
@@ -1420,7 +1420,7 @@ var TitleBar = function(props) {
|
|
|
1420
1420
|
};
|
|
1421
1421
|
var TitleBar$1 = TitleBar;
|
|
1422
1422
|
|
|
1423
|
-
var modules_63b47c51$5 = {"AppViewImage":"
|
|
1423
|
+
var modules_63b47c51$5 = {"AppViewImage":"index_module_AppViewImage__efd7e21c","viewImgBody":"index_module_viewImgBody__efd7e21c","viewImgContent":"index_module_viewImgContent__efd7e21c","viewImgAction":"index_module_viewImgAction__efd7e21c","actionTop":"index_module_actionTop__efd7e21c","viewImgBody_load":"index_module_viewImgBody_load__efd7e21c","viewImgBody_pic":"index_module_viewImgBody_pic__efd7e21c","viewImgActionClose":"index_module_viewImgActionClose__efd7e21c","viewImgBody_pre":"index_module_viewImgBody_pre__efd7e21c","viewImgBody_next":"index_module_viewImgBody_next__efd7e21c","viewImgBodyScale":"index_module_viewImgBodyScale__efd7e21c","viewImgBodyScale_minu":"index_module_viewImgBodyScale_minu__efd7e21c","viewImgBodyScale_add":"index_module_viewImgBodyScale_add__efd7e21c","viewImgBodyScale_value":"index_module_viewImgBodyScale_value__efd7e21c","viewImgInfo":"index_module_viewImgInfo__efd7e21c"};
|
|
1424
1424
|
|
|
1425
1425
|
//获取css样式
|
|
1426
1426
|
var getStyle = function getStyle(dom, key) {
|
|
@@ -1691,15 +1691,24 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1691
1691
|
});
|
|
1692
1692
|
_define_property(_assert_this_initialized(_this), "moveActionClose", function() {
|
|
1693
1693
|
setTimeout(function() {
|
|
1694
|
-
var
|
|
1695
|
-
if (
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1694
|
+
var pic = document.getElementById("viewImgBody_pic");
|
|
1695
|
+
if (pic) {
|
|
1696
|
+
var rect = pic.getBoundingClientRect();
|
|
1697
|
+
if (rect.top >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight) - 40 && rect.right <= (window.innerWidth || document.documentElement.clientWidth) - 52) {
|
|
1698
|
+
_this.setState({
|
|
1699
|
+
actionCloseFlag: 0
|
|
1700
|
+
}, function() {
|
|
1701
|
+
var actionCloseDom = document.getElementById("actionClose");
|
|
1702
|
+
if (actionCloseDom) {
|
|
1703
|
+
actionCloseDom.style.top = rect.top + "px";
|
|
1704
|
+
actionCloseDom.style.left = rect.left + rect.width + 12 + "px";
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
} else {
|
|
1708
|
+
_this.setState({
|
|
1709
|
+
actionCloseFlag: 1
|
|
1710
|
+
});
|
|
1711
|
+
}
|
|
1703
1712
|
}
|
|
1704
1713
|
}, 10);
|
|
1705
1714
|
});
|
|
@@ -1847,11 +1856,15 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1847
1856
|
imgTop: "auto",
|
|
1848
1857
|
rotateValue: 0,
|
|
1849
1858
|
scaleValue: 100
|
|
1859
|
+
}, function() {
|
|
1860
|
+
_this.moveActionClose();
|
|
1850
1861
|
});
|
|
1851
1862
|
});
|
|
1852
1863
|
_define_property(_assert_this_initialized(_this), "rotate", function() {
|
|
1853
1864
|
_this.setState({
|
|
1854
1865
|
rotateValue: _this.state.rotateValue + 90
|
|
1866
|
+
}, function() {
|
|
1867
|
+
_this.moveActionClose();
|
|
1855
1868
|
});
|
|
1856
1869
|
});
|
|
1857
1870
|
_define_property(_assert_this_initialized(_this), "close", function() {
|
|
@@ -1895,6 +1908,10 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1895
1908
|
_this1.setState({
|
|
1896
1909
|
imgSrc: src,
|
|
1897
1910
|
loading: false
|
|
1911
|
+
}, function() {
|
|
1912
|
+
setTimeout(function() {
|
|
1913
|
+
_this1.moveActionClose();
|
|
1914
|
+
}, 100);
|
|
1898
1915
|
});
|
|
1899
1916
|
return [
|
|
1900
1917
|
2
|
|
@@ -1953,11 +1970,15 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1953
1970
|
_define_property(_assert_this_initialized(_this), "imgLoad", function() {
|
|
1954
1971
|
_this.setState({
|
|
1955
1972
|
imgError: false
|
|
1973
|
+
}, function() {
|
|
1974
|
+
_this.moveActionClose();
|
|
1956
1975
|
});
|
|
1957
1976
|
});
|
|
1958
1977
|
_define_property(_assert_this_initialized(_this), "imgErr", function() {
|
|
1959
1978
|
_this.setState({
|
|
1960
1979
|
imgError: true
|
|
1980
|
+
}, function() {
|
|
1981
|
+
_this.moveActionClose();
|
|
1961
1982
|
});
|
|
1962
1983
|
});
|
|
1963
1984
|
return _this;
|
|
@@ -1980,6 +2001,7 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
1980
2001
|
document.oncontextmenu = function() {
|
|
1981
2002
|
return false;
|
|
1982
2003
|
};
|
|
2004
|
+
this.moveActionClose();
|
|
1983
2005
|
}
|
|
1984
2006
|
},
|
|
1985
2007
|
{
|
|
@@ -2066,33 +2088,57 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
2066
2088
|
color: "#FFFFFF"
|
|
2067
2089
|
},
|
|
2068
2090
|
children: imgSrc ? "图片加载错误" : "暂无内容"
|
|
2069
|
-
}) :
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2091
|
+
}) : // <div onMouseDown={this.moveImg}
|
|
2092
|
+
// style={{
|
|
2093
|
+
// transform: `scale(${scaleValue / 100},${
|
|
2094
|
+
// scaleValue / 100
|
|
2095
|
+
// })`,
|
|
2096
|
+
// left: imgLeft == "auto" ? "auto" : imgLeft + "px",
|
|
2097
|
+
// top: imgTop == "auto" ? "auto" : imgTop + "px",
|
|
2098
|
+
// }}
|
|
2099
|
+
// className={styles.viewImgBody_pic}>
|
|
2100
|
+
// <img
|
|
2101
|
+
// id="viewImgBody_pic"
|
|
2102
|
+
// key="img"
|
|
2103
|
+
// src={imgSrc}
|
|
2104
|
+
// alt="图片加载错误"
|
|
2105
|
+
// draggable="false"
|
|
2106
|
+
// style={{transform:`rotate(${rotateValue}deg)`}}
|
|
2107
|
+
// onLoad={this.imgLoad}
|
|
2108
|
+
// onError={this.imgErr}
|
|
2109
|
+
// />
|
|
2110
|
+
// {
|
|
2111
|
+
// this.state.actionCloseFlag===0&&(
|
|
2112
|
+
// <span
|
|
2113
|
+
// id="actionClose"
|
|
2114
|
+
// style={{right:`calc(-40px + (-12px * (1 / ${scaleValue / 100}) ))` ,transform: `scale(calc(1 / ${scaleValue / 100}),calc(1 / ${scaleValue / 100}))`,transformOrigin: `top left`}}
|
|
2115
|
+
// className={styles.viewImgActionClose}
|
|
2116
|
+
// title="关闭"
|
|
2117
|
+
// onClick={this.close}>
|
|
2118
|
+
// <CustomClose />
|
|
2119
|
+
// </span>
|
|
2120
|
+
// )
|
|
2121
|
+
// }
|
|
2122
|
+
// </div>
|
|
2123
|
+
/*#__PURE__*/ jsxs(Fragment, {
|
|
2077
2124
|
children: [
|
|
2078
2125
|
/*#__PURE__*/ jsx("img", {
|
|
2079
2126
|
id: "viewImgBody_pic",
|
|
2080
2127
|
src: imgSrc,
|
|
2081
2128
|
alt: "图片加载错误",
|
|
2082
2129
|
draggable: "false",
|
|
2130
|
+
onMouseDown: this.moveImg,
|
|
2083
2131
|
style: {
|
|
2084
|
-
transform: "rotate(".concat(rotateValue, "deg)")
|
|
2132
|
+
transform: "scale(".concat(scaleValue / 100, ",").concat(scaleValue / 100, ") rotate(").concat(rotateValue, "deg)"),
|
|
2133
|
+
left: imgLeft == "auto" ? "auto" : imgLeft + "px",
|
|
2134
|
+
top: imgTop == "auto" ? "auto" : imgTop + "px"
|
|
2085
2135
|
},
|
|
2136
|
+
className: modules_63b47c51$5.viewImgBody_pic,
|
|
2086
2137
|
onLoad: this.imgLoad,
|
|
2087
2138
|
onError: this.imgErr
|
|
2088
2139
|
}, "img"),
|
|
2089
2140
|
this.state.actionCloseFlag === 0 && /*#__PURE__*/ jsx("span", {
|
|
2090
2141
|
id: "actionClose",
|
|
2091
|
-
style: {
|
|
2092
|
-
right: "calc(-40px + (-12px * (1 / ".concat(scaleValue / 100, ") ))"),
|
|
2093
|
-
transform: "scale(calc(1 / ".concat(scaleValue / 100, "),calc(1 / ").concat(scaleValue / 100, "))"),
|
|
2094
|
-
transformOrigin: "top left"
|
|
2095
|
-
},
|
|
2096
2142
|
className: modules_63b47c51$5.viewImgActionClose,
|
|
2097
2143
|
title: "关闭",
|
|
2098
2144
|
onClick: this.close,
|