vap1 0.1.3 → 0.1.4
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/components/Box/Box.js
CHANGED
|
@@ -96,6 +96,11 @@ exports.Box = (0, react_1.forwardRef)((props, ref) => {
|
|
|
96
96
|
style.height = '100%';
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
+
(0, react_1.useEffect)(() => {
|
|
100
|
+
if (state && state.height && contextRef && contextRef.current) {
|
|
101
|
+
contextRef.current.style.height = (state.height + 'px');
|
|
102
|
+
}
|
|
103
|
+
}, [state === null || state === void 0 ? void 0 : state.height]);
|
|
99
104
|
const resize = () => {
|
|
100
105
|
if (props.mode == undefined || props.mode == 'common' || app == null) {
|
|
101
106
|
if (state === null)
|
|
@@ -137,11 +137,13 @@ const _VTable = (0, react_1.forwardRef)((props, ref) => {
|
|
|
137
137
|
// if (props.mode == undefined || props.mode == 'common') return;
|
|
138
138
|
// let height = state?.height;
|
|
139
139
|
// if (!height) return;
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
//
|
|
143
|
-
//
|
|
144
|
-
//
|
|
140
|
+
// // VAP1.5 scroll table bug
|
|
141
|
+
// root.current.style.height = height + 'px';
|
|
142
|
+
// // setTimeout(() => {
|
|
143
|
+
// // height -= getHeightByTagName(root.current, 'thead');
|
|
144
|
+
// // setScroll({ y: Math.ceil(height), x: true })
|
|
145
|
+
// // }, 2);
|
|
146
|
+
// }, [state?.height]);
|
|
145
147
|
// @ts-ignore
|
|
146
148
|
const effectKey = props.model.effect;
|
|
147
149
|
(0, react_1.useEffect)(() => {
|
|
@@ -40,8 +40,6 @@ const react_1 = __importStar(require("react"));
|
|
|
40
40
|
const lodash_1 = __importDefault(require("lodash"));
|
|
41
41
|
const utils_1 = require("../../utils");
|
|
42
42
|
const antd_1 = require("antd");
|
|
43
|
-
const Row_1 = require("../_adapt/Row");
|
|
44
|
-
const Col_1 = require("../_adapt/Col");
|
|
45
43
|
const Popconfirm_1 = require("../_adapt/Popconfirm");
|
|
46
44
|
const Popover_1 = require("../_adapt/Popover");
|
|
47
45
|
const Button_1 = require("../_adapt/Button");
|
|
@@ -220,7 +218,7 @@ const renderFormField = (state, field, form, update, data) => {
|
|
|
220
218
|
itemProps.wrapperCol = { span: 24 - label };
|
|
221
219
|
}
|
|
222
220
|
}
|
|
223
|
-
return react_1.default.createElement(
|
|
221
|
+
return react_1.default.createElement(antd_1.Col, Object.assign({}, colProps),
|
|
224
222
|
react_1.default.createElement(antd_1.Form.Item, Object.assign({}, itemProps), form.getFieldDecorator(field.field, options)(react_1.default.createElement(input.component, {
|
|
225
223
|
form,
|
|
226
224
|
field,
|
|
@@ -239,10 +237,10 @@ const renderFormActions = (state, buttons, form, initRef) => {
|
|
|
239
237
|
if (btns.length == 0)
|
|
240
238
|
return utils_1.Const.NONE;
|
|
241
239
|
var labelWidth = (state.labelSpan / 24) * (1 / state.cols) * 100;
|
|
242
|
-
return react_1.default.createElement(
|
|
243
|
-
react_1.default.createElement(
|
|
244
|
-
react_1.default.createElement(
|
|
245
|
-
react_1.default.createElement(
|
|
240
|
+
return react_1.default.createElement(antd_1.Col, { span: 24, className: 'c-form-buttons' },
|
|
241
|
+
react_1.default.createElement(antd_1.Row, null,
|
|
242
|
+
react_1.default.createElement(antd_1.Col, { style: { width: utils_1.Format.formatPercent(labelWidth) } }),
|
|
243
|
+
react_1.default.createElement(antd_1.Col, { style: { width: utils_1.Format.formatPercent(99 - labelWidth) }, className: 'c-form-actions' }, btns.map(btn => {
|
|
246
244
|
if (btn.roleCode && !utils_1.PageUtil.hasRole(btn.roleCode))
|
|
247
245
|
return utils_1.Const.NONE;
|
|
248
246
|
let onClick;
|
|
@@ -394,7 +392,7 @@ const _FormGroup = (props) => {
|
|
|
394
392
|
if (group == null || group === false)
|
|
395
393
|
return utils_1.Const.NONE;
|
|
396
394
|
return react_1.default.createElement(react_1.default.Fragment, null,
|
|
397
|
-
react_1.default.createElement(
|
|
395
|
+
react_1.default.createElement(antd_1.Col, { span: 24, className: "c-form-group-title" }, utils_1.i18n.getText(group.ik, group.title)),
|
|
398
396
|
group.fields.map(field => {
|
|
399
397
|
if (field == null || field === false)
|
|
400
398
|
return utils_1.Const.NONE;
|
package/components/_adapt/Col.js
CHANGED
|
@@ -40,7 +40,9 @@ const Col = (props) => {
|
|
|
40
40
|
if (props.className) {
|
|
41
41
|
clazz.push(props.className);
|
|
42
42
|
}
|
|
43
|
-
if (lodash_1.default.has(props, 'span') || lodash_1.default.has(props, 'width') || lodash_1.default.has(props, 'height')
|
|
43
|
+
if (lodash_1.default.has(props, 'span') || lodash_1.default.has(props, 'width') || lodash_1.default.has(props, 'height')
|
|
44
|
+
|| lodash_1.default.has(props, 'sm') || lodash_1.default.has(props, 'md') || lodash_1.default.has(props, 'lg')
|
|
45
|
+
|| (lodash_1.default.has(props, 'style') && (lodash_1.default.has(props.style, 'width') || lodash_1.default.has(props.style, 'height')))) {
|
|
44
46
|
clazz.push('v-col-fix');
|
|
45
47
|
}
|
|
46
48
|
else {
|
package/components/_adapt/Row.js
CHANGED
|
@@ -8,7 +8,7 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const antd_1 = require("antd");
|
|
9
9
|
const Global_1 = require("../../utils/Global");
|
|
10
10
|
const Row = (props) => {
|
|
11
|
-
let clazz = ['v-row'];
|
|
11
|
+
let clazz = ['ant-row', 'v-row'];
|
|
12
12
|
if (props.className)
|
|
13
13
|
clazz.push(props.className);
|
|
14
14
|
if (props.wrap)
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"vap1","version":"0.1.
|
|
1
|
+
{"name":"vap1","version":"0.1.4","description":"vap1, Both support MicroService and SAP FrameWork, Support IE>9","main":"index.js","author":"Xiang da","license":"ISC"}
|