fmui-base 2.0.53 → 2.0.54
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/README.md +1 -0
- package/lib/react_grid/react_grid.js +43 -17
- package/lib/react_grid/react_grid.less +25 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,6 +49,10 @@ var _Toast = require('saltui/lib/Toast');
|
|
|
49
49
|
|
|
50
50
|
var _Toast2 = _interopRequireDefault(_Toast);
|
|
51
51
|
|
|
52
|
+
var _Refreshcontrol = require('saltui/lib/Refreshcontrol');
|
|
53
|
+
|
|
54
|
+
var _Refreshcontrol2 = _interopRequireDefault(_Refreshcontrol);
|
|
55
|
+
|
|
52
56
|
require('react-grid-layout/css/styles.css');
|
|
53
57
|
|
|
54
58
|
require('react-resizable/css/styles.css');
|
|
@@ -265,7 +269,6 @@ var MyGrid = function (_React$Component) {
|
|
|
265
269
|
value: function componentDidMount() {
|
|
266
270
|
this.initPage();
|
|
267
271
|
}
|
|
268
|
-
|
|
269
272
|
// 遍历初始化得到的data,奖id给请求部件的内容的接口
|
|
270
273
|
// 如果有两个相同的部件,将会用id请求部件内容,接口返回的数据需要 this.setState({【id】:result.data});这样存值
|
|
271
274
|
// 取值的时候根据id取值
|
|
@@ -380,7 +383,6 @@ var MyGrid = function (_React$Component) {
|
|
|
380
383
|
value: function gotoYd() {
|
|
381
384
|
pageSkipDirectly(_variables2.default.ydPath);
|
|
382
385
|
}
|
|
383
|
-
|
|
384
386
|
// 应用跳转
|
|
385
387
|
|
|
386
388
|
}, {
|
|
@@ -1642,6 +1644,26 @@ var MyGrid = function (_React$Component) {
|
|
|
1642
1644
|
componentContent
|
|
1643
1645
|
);
|
|
1644
1646
|
}
|
|
1647
|
+
|
|
1648
|
+
// 下拉刷新
|
|
1649
|
+
|
|
1650
|
+
}, {
|
|
1651
|
+
key: 'onRefresh',
|
|
1652
|
+
value: function onRefresh() {
|
|
1653
|
+
var _this3 = this;
|
|
1654
|
+
|
|
1655
|
+
// debugger;
|
|
1656
|
+
this.setState({ refreshing: true });
|
|
1657
|
+
this.initPage();
|
|
1658
|
+
// this.setState({
|
|
1659
|
+
// refreshing: false,
|
|
1660
|
+
// });
|
|
1661
|
+
setTimeout(function () {
|
|
1662
|
+
_this3.setState({
|
|
1663
|
+
refreshing: false
|
|
1664
|
+
});
|
|
1665
|
+
}, 1000);
|
|
1666
|
+
}
|
|
1645
1667
|
}, {
|
|
1646
1668
|
key: 'render',
|
|
1647
1669
|
value: function render() {
|
|
@@ -1667,21 +1689,25 @@ var MyGrid = function (_React$Component) {
|
|
|
1667
1689
|
'div',
|
|
1668
1690
|
{ className: 'react-grid' },
|
|
1669
1691
|
_react2.default.createElement(
|
|
1670
|
-
|
|
1671
|
-
{
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1692
|
+
_Refreshcontrol2.default,
|
|
1693
|
+
{ refreshing: this.state.refreshing, onRefresh: this.onRefresh.bind(this), beforePullLoadText: '\u4E0B\u62C9\u5237\u65B0', afterPullLoadText: '\u4E0B\u62C9\u5237\u65B0\u7ED3\u675F' },
|
|
1694
|
+
_react2.default.createElement(
|
|
1695
|
+
_reactGridLayout2.default,
|
|
1696
|
+
{
|
|
1697
|
+
className: 'layout',
|
|
1698
|
+
layout: layout,
|
|
1699
|
+
cols: 12,
|
|
1700
|
+
rowHeight: 20,
|
|
1701
|
+
width: window.innerWidth,
|
|
1702
|
+
isDraggable: this.state.isDraggable,
|
|
1703
|
+
margin: [0, 5]
|
|
1704
|
+
},
|
|
1705
|
+
this.state.data.map(function (item) {
|
|
1706
|
+
return t.portalContent(item) || null;
|
|
1707
|
+
|
|
1708
|
+
// 添加一个默认返回值,以避免未指定键的错误
|
|
1709
|
+
})
|
|
1710
|
+
)
|
|
1685
1711
|
)
|
|
1686
1712
|
);
|
|
1687
1713
|
}
|
|
@@ -1048,5 +1048,30 @@
|
|
|
1048
1048
|
border-left: none !important;
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
1051
|
+
|
|
1052
|
+
.t-refresh-control{
|
|
1053
|
+
.t-refresh-control-inner {
|
|
1054
|
+
z-index: 0;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.t-refresh-control.ready {
|
|
1059
|
+
.t-refresh-control-inner {
|
|
1060
|
+
z-index: -1;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.t-refresh-control.refreshAnimate.refreshing {
|
|
1065
|
+
.t-refresh-control-inner {
|
|
1066
|
+
z-index: 0;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.t-refresh-control.refreshAnimate {
|
|
1071
|
+
.t-refresh-control-inner {
|
|
1072
|
+
z-index: -1;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1051
1076
|
}
|
|
1052
1077
|
|