easy3wui 1.5.68 → 1.5.70-beta1
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/formPage.css +7 -7
- package/assets/index.css +7 -7
- package/lib/Easy3wFormPage/index.js +4 -3
- package/lib/Easy3wModal/index.js +131 -26
- package/package.json +1 -1
package/assets/formPage.css
CHANGED
|
@@ -13,13 +13,6 @@
|
|
|
13
13
|
.e3wFormPageWrap .e3wFormItem .ant-form-item {
|
|
14
14
|
margin-bottom: 8px;
|
|
15
15
|
}
|
|
16
|
-
.e3wFormPageWrap .e3wFormItem input.ant-input-number-input {
|
|
17
|
-
text-align: right;
|
|
18
|
-
padding-right: 22px;
|
|
19
|
-
}
|
|
20
|
-
.e3wFormPageWrap .e3wFormItem .rightText {
|
|
21
|
-
text-align: right;
|
|
22
|
-
}
|
|
23
16
|
.e3wFormPageWrap .inputNumberFormat {
|
|
24
17
|
display: -ms-flexbox;
|
|
25
18
|
display: flex;
|
|
@@ -38,6 +31,13 @@
|
|
|
38
31
|
.e3wFormPageWrap .inputNumberFormat .inputNumberBtns .e3wFootBtn {
|
|
39
32
|
margin: 0;
|
|
40
33
|
}
|
|
34
|
+
input.ant-input-number-input {
|
|
35
|
+
text-align: right;
|
|
36
|
+
padding-right: 22px;
|
|
37
|
+
}
|
|
38
|
+
.rightText {
|
|
39
|
+
text-align: right;
|
|
40
|
+
}
|
|
41
41
|
.bf-container.read-only .bf-content {
|
|
42
42
|
height: auto;
|
|
43
43
|
}
|
package/assets/index.css
CHANGED
|
@@ -2404,13 +2404,6 @@ s {
|
|
|
2404
2404
|
.e3wFormPageWrap .e3wFormItem .ant-form-item {
|
|
2405
2405
|
margin-bottom: 8px;
|
|
2406
2406
|
}
|
|
2407
|
-
.e3wFormPageWrap .e3wFormItem input.ant-input-number-input {
|
|
2408
|
-
text-align: right;
|
|
2409
|
-
padding-right: 22px;
|
|
2410
|
-
}
|
|
2411
|
-
.e3wFormPageWrap .e3wFormItem .rightText {
|
|
2412
|
-
text-align: right;
|
|
2413
|
-
}
|
|
2414
2407
|
.e3wFormPageWrap .inputNumberFormat {
|
|
2415
2408
|
display: -ms-flexbox;
|
|
2416
2409
|
display: flex;
|
|
@@ -2429,6 +2422,13 @@ s {
|
|
|
2429
2422
|
.e3wFormPageWrap .inputNumberFormat .inputNumberBtns .e3wFootBtn {
|
|
2430
2423
|
margin: 0;
|
|
2431
2424
|
}
|
|
2425
|
+
input.ant-input-number-input {
|
|
2426
|
+
text-align: right;
|
|
2427
|
+
padding-right: 22px;
|
|
2428
|
+
}
|
|
2429
|
+
.rightText {
|
|
2430
|
+
text-align: right;
|
|
2431
|
+
}
|
|
2432
2432
|
.bf-container.read-only .bf-content {
|
|
2433
2433
|
height: auto;
|
|
2434
2434
|
}
|
|
@@ -220,14 +220,14 @@ var _ref = _comonConfig.objEasy3wUIConfig || {},
|
|
|
220
220
|
var _ref2 = objEasy3wFormPage || {},
|
|
221
221
|
projectType = _ref2.projectType;
|
|
222
222
|
|
|
223
|
-
var
|
|
223
|
+
var objOptions = {
|
|
224
224
|
defaultRows: 3, // 默认行数
|
|
225
225
|
defaultColumns: 3, // 默认列数
|
|
226
226
|
withDropdown: false, // 插入表格前是否弹出下拉菜单
|
|
227
227
|
columnResizable: false, // 是否允许拖动调整列宽, 默认false
|
|
228
228
|
exportAttrString: 'style="border: 1"' // 指定输出HTML时附加到table标签上的属性字符串
|
|
229
229
|
};
|
|
230
|
-
_braftEditor2['default'].use((0, _table2['default'])(
|
|
230
|
+
_braftEditor2['default'].use((0, _table2['default'])(objOptions)); // 表格
|
|
231
231
|
|
|
232
232
|
_moment2['default'].locale('zh-cn');
|
|
233
233
|
|
|
@@ -3450,7 +3450,8 @@ var Easy3wFormPageTight = function (_Component2) {
|
|
|
3450
3450
|
onPressEnter: function onPressEnter(e) {
|
|
3451
3451
|
return _this2.numberInputonBlur(e, item);
|
|
3452
3452
|
},
|
|
3453
|
-
rules: [{ pattern: /^\d+(\.\d+)?$/, message: '数字' }]
|
|
3453
|
+
rules: [{ pattern: /^\d+(\.\d+)?$/, message: '数字' }],
|
|
3454
|
+
className: (0, _classnames2['default'])(['rightText'])
|
|
3454
3455
|
}, cmptPros, {
|
|
3455
3456
|
size: 'small'
|
|
3456
3457
|
}));
|
package/lib/Easy3wModal/index.js
CHANGED
|
@@ -6,6 +6,10 @@ var _extends2 = require('babel-runtime/helpers/extends');
|
|
|
6
6
|
|
|
7
7
|
var _extends3 = _interopRequireDefault(_extends2);
|
|
8
8
|
|
|
9
|
+
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
10
|
+
|
|
11
|
+
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
12
|
+
|
|
9
13
|
var _notification2 = require('antd/lib/notification');
|
|
10
14
|
|
|
11
15
|
var _notification3 = _interopRequireDefault(_notification2);
|
|
@@ -77,13 +81,12 @@ var Easy3wModal = function (_Component) {
|
|
|
77
81
|
return _react2['default'].createElement(
|
|
78
82
|
_button2['default'],
|
|
79
83
|
{
|
|
84
|
+
type: 'primary',
|
|
85
|
+
className: (0, _classnames2['default'])(['e3wFootBtn']),
|
|
86
|
+
loading: obj.loading,
|
|
80
87
|
onClick: function onClick(e) {
|
|
81
88
|
return _this.onClickFunc(e, obj.func);
|
|
82
|
-
}
|
|
83
|
-
type: 'primary',
|
|
84
|
-
className: (0, _classnames2['default'])(['e3wFootBtn'])
|
|
85
|
-
// loading={obj.loading}
|
|
86
|
-
, loading: obj.loading === undefined ? _this.props.loadingFlag.global : obj.loading
|
|
89
|
+
}
|
|
87
90
|
},
|
|
88
91
|
obj.cName
|
|
89
92
|
);
|
|
@@ -100,26 +103,124 @@ var Easy3wModal = function (_Component) {
|
|
|
100
103
|
);
|
|
101
104
|
}, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
|
|
102
105
|
}
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
//
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
//
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
106
|
+
// 获取loading状态
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
// 供脚手架index存store
|
|
110
|
+
Easy3wModal.setGetLoading = function setGetLoading(fn) {
|
|
111
|
+
Easy3wModal.getLoading = fn;
|
|
112
|
+
};
|
|
113
|
+
// 统一的 loading 检查
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
Easy3wModal.checkLoadingAndRun = function checkLoadingAndRun(callback) {
|
|
117
|
+
var loadingFlag = Easy3wModal.getLoading();
|
|
118
|
+
if (loadingFlag) {
|
|
119
|
+
_notification3['default'].warning({
|
|
120
|
+
message: '温馨提示',
|
|
121
|
+
description: '操作正在进行中,请稍后!',
|
|
122
|
+
duration: 3
|
|
123
|
+
});
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (typeof callback === 'function') {
|
|
127
|
+
return callback();
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
// confirm
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
Easy3wModal.confirm = function confirm() {
|
|
134
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
135
|
+
var _onOk = props.onOk,
|
|
136
|
+
restProps = (0, _objectWithoutProperties3['default'])(props, ['onOk']);
|
|
137
|
+
|
|
138
|
+
return _modal2['default'].confirm((0, _extends3['default'])({}, restProps, {
|
|
139
|
+
onOk: function onOk() {
|
|
140
|
+
var loadingFlag = Easy3wModal.getLoading();
|
|
141
|
+
if (loadingFlag) {
|
|
142
|
+
_notification3['default'].warning({
|
|
143
|
+
message: '温馨提示',
|
|
144
|
+
description: '操作正在进行中,请稍后!',
|
|
145
|
+
duration: 3
|
|
146
|
+
});
|
|
147
|
+
return Promise.reject(); // 阻止 Modal 自动关闭
|
|
148
|
+
}
|
|
149
|
+
if (typeof _onOk === 'function') {
|
|
150
|
+
return _onOk();
|
|
151
|
+
}
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
};
|
|
156
|
+
// info
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
Easy3wModal.info = function info() {
|
|
160
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
161
|
+
|
|
162
|
+
// 判断类型
|
|
163
|
+
var options = typeof props === 'string' || typeof props === 'number' ? { content: props } : props;
|
|
164
|
+
var _onOk2 = options.onOk,
|
|
165
|
+
restProps = (0, _objectWithoutProperties3['default'])(options, ['onOk']);
|
|
166
|
+
|
|
167
|
+
return _modal2['default'].info((0, _extends3['default'])({}, restProps, {
|
|
168
|
+
onOk: function onOk() {
|
|
169
|
+
return Easy3wModal.checkLoadingAndRun(_onOk2);
|
|
170
|
+
}
|
|
171
|
+
}));
|
|
172
|
+
};
|
|
173
|
+
// success
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
Easy3wModal.success = function success() {
|
|
177
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
178
|
+
|
|
179
|
+
// 判断类型
|
|
180
|
+
var options = typeof props === 'string' || typeof props === 'number' ? { content: props } : props;
|
|
181
|
+
var _onOk3 = options.onOk,
|
|
182
|
+
restProps = (0, _objectWithoutProperties3['default'])(options, ['onOk']);
|
|
183
|
+
|
|
184
|
+
return _modal2['default'].success((0, _extends3['default'])({}, restProps, {
|
|
185
|
+
onOk: function onOk() {
|
|
186
|
+
return Easy3wModal.checkLoadingAndRun(_onOk3);
|
|
187
|
+
}
|
|
188
|
+
}));
|
|
189
|
+
};
|
|
190
|
+
// error
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
Easy3wModal.error = function error() {
|
|
194
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
195
|
+
|
|
196
|
+
// 判断类型
|
|
197
|
+
var options = typeof props === 'string' || typeof props === 'number' ? { content: props } : props;
|
|
198
|
+
var _onOk4 = options.onOk,
|
|
199
|
+
restProps = (0, _objectWithoutProperties3['default'])(options, ['onOk']);
|
|
200
|
+
|
|
201
|
+
return _modal2['default'].error((0, _extends3['default'])({}, restProps, {
|
|
202
|
+
onOk: function onOk() {
|
|
203
|
+
return Easy3wModal.checkLoadingAndRun(_onOk4);
|
|
204
|
+
}
|
|
205
|
+
}));
|
|
206
|
+
};
|
|
207
|
+
// warning
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
Easy3wModal.warning = function warning() {
|
|
211
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
212
|
+
|
|
213
|
+
// 判断类型
|
|
214
|
+
var options = typeof props === 'string' || typeof props === 'number' ? { content: props } : props;
|
|
215
|
+
var _onOk5 = options.onOk,
|
|
216
|
+
restProps = (0, _objectWithoutProperties3['default'])(options, ['onOk']);
|
|
217
|
+
|
|
218
|
+
return _modal2['default'].warning((0, _extends3['default'])({}, restProps, {
|
|
219
|
+
onOk: function onOk() {
|
|
220
|
+
return Easy3wModal.checkLoadingAndRun(_onOk5);
|
|
221
|
+
}
|
|
222
|
+
}));
|
|
223
|
+
};
|
|
123
224
|
|
|
124
225
|
Easy3wModal.prototype.render = function render() {
|
|
125
226
|
var _props = this.props,
|
|
@@ -144,7 +245,7 @@ var Easy3wModal = function (_Component) {
|
|
|
144
245
|
width: width,
|
|
145
246
|
destroyOnClose: true,
|
|
146
247
|
maskClosable: false,
|
|
147
|
-
style: { top: 20 }
|
|
248
|
+
style: { top: 20, zIndex: 99998 }
|
|
148
249
|
}, this.props, {
|
|
149
250
|
afterClose: function afterClose() {
|
|
150
251
|
document.body.style.overflow = '';
|
|
@@ -157,6 +258,10 @@ var Easy3wModal = function (_Component) {
|
|
|
157
258
|
return Easy3wModal;
|
|
158
259
|
}(_react.Component);
|
|
159
260
|
|
|
261
|
+
Easy3wModal.getLoading = function () {
|
|
262
|
+
return false;
|
|
263
|
+
};
|
|
264
|
+
|
|
160
265
|
exports['default'] = (0, _dva.connect)(function (state) {
|
|
161
266
|
return {
|
|
162
267
|
loadingFlag: state.loading
|