easy3wmui 0.0.42-beta2 → 0.0.42-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 +13 -6
- package/assets/mFormPage.css +6 -0
- package/assets/mGridPage.css +7 -6
- package/lib/Easy3wMButton/index.less +3 -3
- package/lib/Easy3wMCaptcha/index.js +80 -80
- package/lib/Easy3wMCard/index.less +3 -3
- package/lib/Easy3wMFormPage/index.js +417 -417
- package/lib/Easy3wMFormPage/index.less +45 -45
- package/lib/Easy3wMGlobalFooter/index.less +1 -1
- package/lib/Easy3wMGridPage/index copy.js +298 -0
- package/lib/Easy3wMGridPage/index.js +285 -247
- package/lib/Easy3wMGridPage/index.less +5 -5
- package/lib/Easy3wMSpin/index.less +13 -13
- package/lib/Easy3wMUserLayout/index.less +9 -9
- package/package.json +1 -1
package/assets/index.css
CHANGED
|
@@ -233,15 +233,22 @@
|
|
|
233
233
|
-ms-flex: none;
|
|
234
234
|
flex: none;
|
|
235
235
|
}
|
|
236
|
+
#Easy3wMFormPage .adm-picker-view-mask {
|
|
237
|
+
z-index: 1;
|
|
238
|
+
}
|
|
239
|
+
#Easy3wMFormPage .adm-stepper {
|
|
240
|
+
width: 100%;
|
|
241
|
+
}
|
|
236
242
|
#Easy3wMGridPage .easy3wMGridPageStepper {
|
|
237
243
|
display: -ms-flexbox;
|
|
238
244
|
display: flex;
|
|
239
|
-
-ms-flex-direction:
|
|
240
|
-
flex-direction:
|
|
241
|
-
-ms-flex-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
+
-ms-flex-direction: row;
|
|
246
|
+
flex-direction: row;
|
|
247
|
+
-ms-flex-pack: justify;
|
|
248
|
+
justify-content: space-between;
|
|
249
|
+
-ms-flex-align: center;
|
|
250
|
+
align-items: center;
|
|
251
|
+
background: #fff;
|
|
245
252
|
}
|
|
246
253
|
#Easy3wMGridPage .adm-collapse-panel-content > .adm-collapse-panel-content-inner > .adm-list-item > .adm-list-item-content > .adm-list-item-content-main {
|
|
247
254
|
-ms-flex: auto;
|
package/assets/mFormPage.css
CHANGED
package/assets/mGridPage.css
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#Easy3wMGridPage .easy3wMGridPageStepper {
|
|
2
2
|
display: -ms-flexbox;
|
|
3
3
|
display: flex;
|
|
4
|
-
-ms-flex-direction:
|
|
5
|
-
flex-direction:
|
|
6
|
-
-ms-flex-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
-ms-flex-direction: row;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
-ms-flex-pack: justify;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
-ms-flex-align: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
background: #fff;
|
|
10
11
|
}
|
|
11
12
|
#Easy3wMGridPage .adm-collapse-panel-content > .adm-collapse-panel-content-inner > .adm-list-item > .adm-list-item-content > .adm-list-item-content-main {
|
|
12
13
|
-ms-flex: auto;
|
|
@@ -31,91 +31,91 @@ var _antdMobile = require('antd-mobile');
|
|
|
31
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
32
32
|
|
|
33
33
|
var Easy3wMCaptcha = function (_Component) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
34
|
+
(0, _inherits3['default'])(Easy3wMCaptcha, _Component);
|
|
35
|
+
|
|
36
|
+
function Easy3wMCaptcha(props) {
|
|
37
|
+
(0, _classCallCheck3['default'])(this, Easy3wMCaptcha);
|
|
38
|
+
|
|
39
|
+
var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props));
|
|
40
|
+
|
|
41
|
+
_this.renderCode = function () {
|
|
42
|
+
var expression = '';
|
|
43
|
+
var result = '';
|
|
44
|
+
if (_this.props.captchaType === 'Calculation') {
|
|
45
|
+
// 计算
|
|
46
|
+
result = 0;
|
|
47
|
+
var Calpre = Math.round(Math.random() * 100);
|
|
48
|
+
var Calafter = Math.round(Math.random() * 100);
|
|
49
|
+
var codeCal = ['-', '+', 'x'];
|
|
50
|
+
var i = Math.round(Math.random() * 2);
|
|
51
|
+
switch (codeCal[i]) {
|
|
52
|
+
case '-':
|
|
53
|
+
expression = Calpre + '-' + Calafter;
|
|
54
|
+
result = Calpre - Calafter;
|
|
55
|
+
break;
|
|
56
|
+
case '+':
|
|
57
|
+
expression = Calpre + '+' + Calafter;
|
|
58
|
+
result = Calpre + Calafter;
|
|
59
|
+
break;
|
|
60
|
+
case 'x':
|
|
61
|
+
expression = Calpre + 'x' + Calafter;
|
|
62
|
+
result = Calpre * Calafter;
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
} else if (_this.props.captchaType === 'Normal') {
|
|
68
|
+
// 正常
|
|
69
|
+
result = '';
|
|
70
|
+
var strBx = 'ABCDEFGHJKMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz23456789';
|
|
71
|
+
var codeNormal = strBx.split('');
|
|
72
|
+
for (var _i = 0; _i < _this.props.csize; _i += 1) {
|
|
73
|
+
result += codeNormal[Math.round(Math.random() * (strBx.length - 1))];
|
|
74
|
+
}
|
|
75
|
+
expression = result.toLowerCase(); // 表达式小写化
|
|
76
|
+
}
|
|
77
|
+
_this.props.touchCaptchaResult(expression); // 将验证码返回给调用组件
|
|
78
|
+
_this.setState({
|
|
79
|
+
expression: expression
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
_this.state = {
|
|
84
|
+
expression: '' // 表达示
|
|
85
|
+
};
|
|
86
|
+
return _this;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
Easy3wMCaptcha.prototype.componentDidMount = function componentDidMount() {
|
|
90
|
+
this.renderCode();
|
|
91
|
+
};
|
|
92
|
+
// 生成随机码
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
Easy3wMCaptcha.prototype.render = function render() {
|
|
96
|
+
var expression = this.state.expression;
|
|
97
|
+
|
|
98
|
+
return _react2['default'].createElement(
|
|
99
|
+
_button2['default'],
|
|
100
|
+
{
|
|
101
|
+
size: 'small',
|
|
102
|
+
onClick: this.renderCode,
|
|
103
|
+
htmlType: 'button'
|
|
104
|
+
},
|
|
105
|
+
expression
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return Easy3wMCaptcha;
|
|
110
110
|
}(_react.Component);
|
|
111
111
|
|
|
112
112
|
Easy3wMCaptcha.defaultProps = {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
csize: 4, // 验证码长度
|
|
114
|
+
captchaType: 'Normal' // 正常验证码类型
|
|
115
115
|
};
|
|
116
116
|
Easy3wMCaptcha.propTypes = { // 限制变量类型
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
csize: _propTypes2['default'].number,
|
|
118
|
+
captchaType: _propTypes2['default'].oneOf(['Calculation', 'Normal'])
|
|
119
119
|
};
|
|
120
120
|
exports['default'] = Easy3wMCaptcha;
|
|
121
121
|
module.exports = exports['default'];
|