easy3wmui 0.0.43-beta1 → 0.0.43-beta3
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/assets/index.css +36 -0
- package/lib/Easy3wMPagination/index.js +40 -24
- package/lib/index.js +9 -0
- package/package.json +1 -1
package/assets/index.css
CHANGED
|
@@ -490,3 +490,39 @@
|
|
|
490
490
|
padding-left: 24px;
|
|
491
491
|
padding-right: 24px;
|
|
492
492
|
}
|
|
493
|
+
#Easy3wMPagination .easy3wMGridPageStepper {
|
|
494
|
+
display: -ms-flexbox;
|
|
495
|
+
display: flex;
|
|
496
|
+
-ms-flex-direction: row;
|
|
497
|
+
flex-direction: row;
|
|
498
|
+
-ms-flex-align: center;
|
|
499
|
+
align-items: center;
|
|
500
|
+
-ms-flex-pack: justify;
|
|
501
|
+
justify-content: space-between;
|
|
502
|
+
padding: 12px;
|
|
503
|
+
}
|
|
504
|
+
#Easy3wMPagination .easy3wMGridPageStepper .emgpsBtn {
|
|
505
|
+
-ms-flex: 1;
|
|
506
|
+
flex: 1;
|
|
507
|
+
border: 1px solid #000;
|
|
508
|
+
color: #000;
|
|
509
|
+
cursor: pointer;
|
|
510
|
+
text-align: center;
|
|
511
|
+
padding: 7px 0;
|
|
512
|
+
margin-right: 3px;
|
|
513
|
+
}
|
|
514
|
+
#Easy3wMPagination .easy3wMGridPageStepper .emgpsBtn:last-child {
|
|
515
|
+
margin-right: 0;
|
|
516
|
+
}
|
|
517
|
+
#Easy3wMPagination .easy3wMGridPageStepper .emgpsBtn.emgpsBtnDisable {
|
|
518
|
+
border: 1px solid #999;
|
|
519
|
+
color: #999;
|
|
520
|
+
cursor: not-allowed;
|
|
521
|
+
}
|
|
522
|
+
#Easy3wMPagination .easy3wMGridPageStepper .emgpsBtn.emgpsBtnActive {
|
|
523
|
+
border: 1px solid var(--adm-color-primary);
|
|
524
|
+
color: var(--adm-color-primary);
|
|
525
|
+
}
|
|
526
|
+
#Easy3wMPagination .easy3wMGridPageStepper .emgpsBtnNo {
|
|
527
|
+
display: none;
|
|
528
|
+
}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
|
|
5
|
+
var _toast = require('antd-mobile/es/components/toast');
|
|
6
|
+
|
|
7
|
+
var _toast2 = _interopRequireDefault(_toast);
|
|
8
|
+
|
|
5
9
|
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
6
10
|
|
|
7
11
|
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
@@ -20,6 +24,8 @@ var _react2 = _interopRequireDefault(_react);
|
|
|
20
24
|
|
|
21
25
|
var _dva = require('dva');
|
|
22
26
|
|
|
27
|
+
var _antdMobile = require('antd-mobile');
|
|
28
|
+
|
|
23
29
|
var _antdMobileIcons = require('antd-mobile-icons');
|
|
24
30
|
|
|
25
31
|
var _Easy3wMCard = require('../Easy3wMCard');
|
|
@@ -37,33 +43,43 @@ var Easy3wMPagination = function (_PureComponent) {
|
|
|
37
43
|
var _this = (0, _possibleConstructorReturn3['default'])(this, _PureComponent.call(this, props));
|
|
38
44
|
|
|
39
45
|
_this.onChange = function (num, notFetchFlag) {
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
var globalLoading = _this.props.loading.global;
|
|
47
|
+
if (globalLoading) {
|
|
48
|
+
_toast2['default'].show({
|
|
49
|
+
icon: 'loading',
|
|
50
|
+
content: '正在后台处理,请稍后!',
|
|
51
|
+
duration: 3000
|
|
52
|
+
});
|
|
53
|
+
} else {
|
|
54
|
+
// func(e);
|
|
55
|
+
var _this$props = _this.props,
|
|
56
|
+
intData = _this$props.intData,
|
|
57
|
+
touchFetch = _this$props.touchFetch;
|
|
43
58
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
59
|
+
var intTotalPage = Math.ceil(intData / 10);
|
|
60
|
+
// const intTotalPage = 99999;
|
|
61
|
+
var offset = _this.state.offset;
|
|
47
62
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
if (offset < 1) {
|
|
54
|
-
offset = 1;
|
|
55
|
-
} else if (offset > intTotalPage) {
|
|
56
|
-
offset = intTotalPage;
|
|
57
|
-
}
|
|
58
|
-
_this.setState({
|
|
59
|
-
offset: offset // 当前页
|
|
60
|
-
}, function () {
|
|
61
|
-
if (notFetchFlag) {// true 不查询 false 查询
|
|
62
|
-
// 不查询
|
|
63
|
-
} else if (touchFetch && typeof touchFetch === 'function') {
|
|
64
|
-
touchFetch();
|
|
63
|
+
if (typeof num === 'string') {
|
|
64
|
+
offset += Number(num);
|
|
65
|
+
} else {
|
|
66
|
+
offset = num;
|
|
65
67
|
}
|
|
66
|
-
|
|
68
|
+
if (offset < 1) {
|
|
69
|
+
offset = 1;
|
|
70
|
+
} else if (offset > intTotalPage) {
|
|
71
|
+
offset = intTotalPage;
|
|
72
|
+
}
|
|
73
|
+
_this.setState({
|
|
74
|
+
offset: offset // 当前页
|
|
75
|
+
}, function () {
|
|
76
|
+
if (notFetchFlag) {// true 不查询 false 查询
|
|
77
|
+
// 不查询
|
|
78
|
+
} else if (touchFetch && typeof touchFetch === 'function') {
|
|
79
|
+
touchFetch();
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
67
83
|
};
|
|
68
84
|
|
|
69
85
|
_this.touchCreatePageNum = function (intTotalPage, offset, index) {
|
package/lib/index.js
CHANGED
|
@@ -209,6 +209,15 @@ Object.defineProperty(exports, 'Easy3wMPageIndicator', {
|
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
211
|
|
|
212
|
+
var _Easy3wMPagination = require('./Easy3wMPagination');
|
|
213
|
+
|
|
214
|
+
Object.defineProperty(exports, 'Easy3wMPagination', {
|
|
215
|
+
enumerable: true,
|
|
216
|
+
get: function get() {
|
|
217
|
+
return _interopRequireDefault(_Easy3wMPagination)['default'];
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
212
221
|
var _Easy3wMSteps = require('./Easy3wMSteps');
|
|
213
222
|
|
|
214
223
|
Object.defineProperty(exports, 'Easy3wMSteps', {
|