aldehyde 0.2.64 → 0.2.65
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/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.js +3 -3
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts +2 -2
- package/lib/custom-page/dtmpl-custom-edit-modal-page.js +2 -2
- package/lib/custom-page/dtmpl-custom-edit-modal-page.js.map +1 -1
- package/lib/detail/button/bottom-submit-button-bar.d.ts +13 -0
- package/lib/detail/button/bottom-submit-button-bar.d.ts.map +1 -0
- package/lib/detail/button/bottom-submit-button-bar.js +30 -0
- package/lib/detail/button/bottom-submit-button-bar.js.map +1 -0
- package/lib/detail/button/fix-right-submit-button-bar.d.ts +15 -0
- package/lib/detail/button/fix-right-submit-button-bar.d.ts.map +1 -0
- package/lib/detail/button/fix-right-submit-button-bar.js +88 -0
- package/lib/detail/button/fix-right-submit-button-bar.js.map +1 -0
- package/lib/detail/button/submit-button-bar.d.ts +4 -3
- package/lib/detail/button/submit-button-bar.d.ts.map +1 -1
- package/lib/detail/button/submit-button-bar.js +8 -90
- package/lib/detail/button/submit-button-bar.js.map +1 -1
- package/lib/detail/edit/dtmpl-edit.js.map +1 -1
- package/lib/detail/edit/row-editor.d.ts.map +1 -1
- package/lib/detail/edit/row-editor.js +1 -1
- package/lib/detail/edit/row-editor.js.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.js +1 -1
- package/lib/detail/view/modal-dtmpl-view.js.map +1 -1
- package/lib/module/dtmpl-edit-page.d.ts +2 -2
- package/lib/module/dtmpl-edit-page.js +2 -2
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/module/dtmpl-view-drawer.d.ts +2 -2
- package/lib/module/dtmpl-view-drawer.js +3 -3
- package/lib/module/dtmpl-view-drawer.js.map +1 -1
- package/lib/module/dtmpl-view-modal.d.ts +2 -2
- package/lib/module/dtmpl-view-modal.js +3 -3
- package/lib/module/dtmpl-view-modal.js.map +1 -1
- package/lib/module/ltmpl-drawer.d.ts +1 -1
- package/lib/module/ltmpl-drawer.js +3 -3
- package/lib/module/ltmpl-drawer.js.map +1 -1
- package/lib/module/ltmpl-modal.d.ts +2 -2
- package/lib/module/ltmpl-modal.d.ts.map +1 -1
- package/lib/module/ltmpl-modal.js +5 -6
- package/lib/module/ltmpl-modal.js.map +1 -1
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +2 -2
- package/lib/table/relation-table.js.map +1 -1
- package/lib/tmpl/interface.d.ts +2 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/entity-select/entity-select.tsx +2 -4
- package/src/aldehyde/custom-page/dtmpl-custom-edit-modal-page.tsx +2 -2
- package/src/aldehyde/detail/button/bottom-submit-button-bar.tsx +55 -0
- package/src/aldehyde/detail/button/fix-right-submit-button-bar.tsx +130 -0
- package/src/aldehyde/detail/button/submit-button-bar.tsx +13 -119
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +1 -1
- package/src/aldehyde/detail/edit/row-editor.tsx +0 -1
- package/src/aldehyde/detail/view/modal-dtmpl-view.tsx +1 -1
- package/src/aldehyde/module/dtmpl-edit-page.tsx +2 -2
- package/src/aldehyde/module/dtmpl-view-drawer.tsx +3 -3
- package/src/aldehyde/module/dtmpl-view-modal.tsx +3 -3
- package/src/aldehyde/module/ltmpl-drawer.tsx +3 -3
- package/src/aldehyde/module/ltmpl-modal.tsx +6 -8
- package/src/aldehyde/table/relation-table.tsx +0 -2
- package/src/aldehyde/tmpl/interface.tsx +3 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import React, {RefObject} from 'react'
|
|
2
|
+
import './index.css'
|
|
3
|
+
import {ActionConfig, ButtonName, DtmplConfig, TmplBase} from "../../../aldehyde/tmpl/interface";
|
|
4
|
+
import {Affix, Button, Popconfirm, Popover} from "antd";
|
|
5
|
+
import {LeftOutlined, SaveOutlined} from '@ant-design/icons';
|
|
6
|
+
import Action from "../../controls/action";
|
|
7
|
+
import {SubmitButtonProps} from "./submit-button-bar";
|
|
8
|
+
|
|
9
|
+
interface FixRightSubmitButtonProps extends SubmitButtonProps{
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
interface FixRightSubmitButtonState {
|
|
15
|
+
// stateSerial:number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class FixRightSubmitButtonBar extends React.PureComponent<FixRightSubmitButtonProps, FixRightSubmitButtonState> {
|
|
19
|
+
|
|
20
|
+
state={
|
|
21
|
+
// stateSerial:0,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
calcOffsetBottom = (buttons: ButtonName[], actions: ActionConfig[]) => {
|
|
25
|
+
let buttonSize:number=0;
|
|
26
|
+
if(actions ){
|
|
27
|
+
buttonSize=buttonSize+actions.length;
|
|
28
|
+
}
|
|
29
|
+
if((buttons && buttons.includes('dtmplSave')) ){
|
|
30
|
+
buttonSize=buttonSize+1;
|
|
31
|
+
}
|
|
32
|
+
if (buttonSize>=3) {
|
|
33
|
+
return 120;
|
|
34
|
+
} else if (buttonSize==2){
|
|
35
|
+
return 86;
|
|
36
|
+
}else{
|
|
37
|
+
return 80;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
render() {
|
|
42
|
+
const {}=this.state;
|
|
43
|
+
const {dtmplConfig, doSubmit,formRef,serial,serverKey} = this.props
|
|
44
|
+
const {buttons, actions} = dtmplConfig;
|
|
45
|
+
const cardList: TmplBase[] = [];
|
|
46
|
+
|
|
47
|
+
//console.log(" submit-button-bar serial:",serial);
|
|
48
|
+
// console.log(" submit-button-bar stateSerial:",stateSerial);
|
|
49
|
+
|
|
50
|
+
if (dtmplConfig.premises && dtmplConfig.premises.length > 0) {
|
|
51
|
+
cardList.push({
|
|
52
|
+
id: '1', title: '默认字段',
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
dtmplConfig.groups.forEach(g => {
|
|
56
|
+
cardList.push({
|
|
57
|
+
title: g.title,
|
|
58
|
+
id: g.id,
|
|
59
|
+
});
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
let content
|
|
63
|
+
if (actions && actions.length > 1) {
|
|
64
|
+
content = (
|
|
65
|
+
<div className="btns">
|
|
66
|
+
{actions.map((item, index) => {
|
|
67
|
+
if (index > 1) {
|
|
68
|
+
// return <Popconfirm key={item.id} placement="top" title={"确定要保存修改并执行此操作吗?"}
|
|
69
|
+
// onConfirm={() => doSubmit(item.id)} okText="确定" cancelText="取消">
|
|
70
|
+
// <Button
|
|
71
|
+
// type="primary"
|
|
72
|
+
// >{item.title}</Button>
|
|
73
|
+
// </Popconfirm>
|
|
74
|
+
return <Action serverKey={serverKey} iconType={'icon-title'} hiddenType={'disabled'} buttonType={'primary'} serial={serial} key={item.id} formRef={formRef} actionConfig={item} doAction={doSubmit}></Action>
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<Affix
|
|
85
|
+
//style={{position: 'absolute', right: 10, maxHeight: 100}}
|
|
86
|
+
// offsetBottom={this.calcOffsetBottom(buttons, actions)}>
|
|
87
|
+
style={{position: 'absolute',bottom:60,right: 15,}} offsetBottom={this.calcOffsetBottom(buttons, actions)}
|
|
88
|
+
>
|
|
89
|
+
<div className={'submitButtonBar'} >
|
|
90
|
+
<ul>
|
|
91
|
+
{buttons.includes('dtmplSave') ? <li key={100}>
|
|
92
|
+
<Button
|
|
93
|
+
onClick={() => doSubmit()}
|
|
94
|
+
type='primary'
|
|
95
|
+
icon={<SaveOutlined/>}
|
|
96
|
+
key="btn" block
|
|
97
|
+
>保 存</Button>
|
|
98
|
+
</li> : ""
|
|
99
|
+
}
|
|
100
|
+
{//处理前两个
|
|
101
|
+
actions ? actions.map((item, index) => {
|
|
102
|
+
if (index < 2) {
|
|
103
|
+
return <li key={index}>
|
|
104
|
+
{/*<Popconfirm placement="left" title={"确定要保存修改并执行此操作吗?"} onConfirm={() => doSubmit(item.id)} okText="确定" cancelText="取消">*/}
|
|
105
|
+
{/*<Button block*/}
|
|
106
|
+
{/* type={'primary'}>{item.title}</Button>*/}
|
|
107
|
+
{/*</Popconfirm>*/}
|
|
108
|
+
<Action serverKey={serverKey} hiddenType={'disabled'} buttonType={'primary-block'} serial={serial} key={item.id} formRef={formRef} actionConfig={item} doAction={doSubmit}></Action>
|
|
109
|
+
</li>
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
) : ""
|
|
113
|
+
}
|
|
114
|
+
{//处理后面的
|
|
115
|
+
actions && actions.length > 2 ?
|
|
116
|
+
<Popover placement="leftTop" content={content} trigger="hover">
|
|
117
|
+
<Button block>
|
|
118
|
+
<LeftOutlined/>{'更多'}
|
|
119
|
+
</Button>
|
|
120
|
+
</Popover> : ""
|
|
121
|
+
}
|
|
122
|
+
</ul>
|
|
123
|
+
</div>
|
|
124
|
+
</Affix>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export default FixRightSubmitButtonBar;
|
|
130
|
+
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React, {RefObject} from 'react'
|
|
2
2
|
import './index.css'
|
|
3
|
-
import {ActionConfig, ButtonName, DtmplConfig, TmplBase} from "../../../aldehyde/tmpl/interface";
|
|
3
|
+
import {ActionConfig, ButtonName, ButtonPosition, DtmplConfig, TmplBase} from "../../../aldehyde/tmpl/interface";
|
|
4
4
|
import {Affix, Button, Popconfirm, Popover} from "antd";
|
|
5
5
|
import {LeftOutlined, SaveOutlined} from '@ant-design/icons';
|
|
6
6
|
import Action from "../../controls/action";
|
|
7
|
+
import FixRightSubmitButtonBar from './fix-right-submit-button-bar'
|
|
7
8
|
import {FormInstance} from "antd/lib/form/hooks/useForm";
|
|
9
|
+
import BottomSubmitButtonBar from "./bottom-submit-button-bar";
|
|
8
10
|
|
|
9
|
-
interface SubmitButtonProps {
|
|
11
|
+
export interface SubmitButtonProps {
|
|
10
12
|
serverKey?:string,
|
|
11
13
|
dtmplConfig: DtmplConfig,
|
|
12
|
-
|
|
14
|
+
position?:ButtonPosition,
|
|
13
15
|
doSubmit: (actionId?: string,codes?:string[],params?:object) => void;
|
|
14
16
|
formRef: RefObject<FormInstance>,
|
|
15
17
|
serial:number,
|
|
@@ -27,126 +29,18 @@ class SubmitButtonBar extends React.PureComponent<SubmitButtonProps, SubmitButto
|
|
|
27
29
|
// stateSerial:0,
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
let buttonSize:number=0;
|
|
32
|
-
if(actions ){
|
|
33
|
-
buttonSize=buttonSize+actions.length;
|
|
34
|
-
}
|
|
35
|
-
if((buttons && buttons.includes('dtmplSave')) ){
|
|
36
|
-
buttonSize=buttonSize+1;
|
|
37
|
-
}
|
|
38
|
-
if (buttonSize>=3) {
|
|
39
|
-
return 120;
|
|
40
|
-
} else if (buttonSize==2){
|
|
41
|
-
return 86;
|
|
42
|
-
}else{
|
|
43
|
-
return 80;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// async componentDidMount() {
|
|
48
|
-
// console.log("SubmitButtonBar this.loadData()");
|
|
49
|
-
//
|
|
50
|
-
// console.log("SubmitButtonBar this.loadData()1");
|
|
51
|
-
// // if(code!=preCode || (!code && preCode)){
|
|
52
|
-
// // await this.loadData();
|
|
53
|
-
// // }else{
|
|
54
|
-
// // formRef.current.resetFields();
|
|
55
|
-
// // }
|
|
56
|
-
// }
|
|
32
|
+
static defaultProps={
|
|
57
33
|
|
|
58
|
-
|
|
59
|
-
// console.log("SubmitButtonBar this.loadData()2");
|
|
60
|
-
// this.setState({
|
|
61
|
-
// stateSerial: this.state.stateSerial + 1,
|
|
62
|
-
// })
|
|
63
|
-
// }
|
|
34
|
+
}
|
|
64
35
|
|
|
65
36
|
render() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const {buttons, actions} = dtmplConfig;
|
|
69
|
-
const cardList: TmplBase[] = [];
|
|
70
|
-
|
|
71
|
-
//console.log(" submit-button-bar serial:",serial);
|
|
72
|
-
// console.log(" submit-button-bar stateSerial:",stateSerial);
|
|
73
|
-
|
|
74
|
-
if (dtmplConfig.premises && dtmplConfig.premises.length > 0) {
|
|
75
|
-
cardList.push({
|
|
76
|
-
id: '1', title: '默认字段',
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
dtmplConfig.groups.forEach(g => {
|
|
80
|
-
cardList.push({
|
|
81
|
-
title: g.title,
|
|
82
|
-
id: g.id,
|
|
83
|
-
});
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
let content
|
|
87
|
-
if (actions && actions.length > 1) {
|
|
88
|
-
content = (
|
|
89
|
-
<div className="btns">
|
|
90
|
-
{actions.map((item, index) => {
|
|
91
|
-
if (index > 1) {
|
|
92
|
-
// return <Popconfirm key={item.id} placement="top" title={"确定要保存修改并执行此操作吗?"}
|
|
93
|
-
// onConfirm={() => doSubmit(item.id)} okText="确定" cancelText="取消">
|
|
94
|
-
// <Button
|
|
95
|
-
// type="primary"
|
|
96
|
-
// >{item.title}</Button>
|
|
97
|
-
// </Popconfirm>
|
|
98
|
-
return <Action serverKey={serverKey} iconType={'icon-title'} hiddenType={'disabled'} buttonType={'primary'} serial={serial} key={item.id} formRef={formRef} actionConfig={item} doAction={doSubmit}></Action>
|
|
99
|
-
}
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
</div>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
37
|
+
const {position, doSubmit, serial, dtmplConfig, formRef} = this.props;
|
|
38
|
+
let posi = position ? position : dtmplConfig.buttonPosition ? dtmplConfig.buttonPosition : undefined
|
|
106
39
|
|
|
107
|
-
return
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
style={{position: 'absolute',bottom:60,right: 15,}} offsetBottom={this.calcOffsetBottom(buttons, actions)}
|
|
112
|
-
>
|
|
113
|
-
<div className={'submitButtonBar'} >
|
|
114
|
-
<ul>
|
|
115
|
-
{buttons.includes('dtmplSave') ? <li key={100}>
|
|
116
|
-
<Button
|
|
117
|
-
onClick={() => doSubmit()}
|
|
118
|
-
type='primary'
|
|
119
|
-
icon={<SaveOutlined/>}
|
|
120
|
-
key="btn" block
|
|
121
|
-
>保 存</Button>
|
|
122
|
-
</li> : ""
|
|
123
|
-
}
|
|
124
|
-
{//处理前两个
|
|
125
|
-
actions ? actions.map((item, index) => {
|
|
126
|
-
if (index < 2) {
|
|
127
|
-
return <li key={index}>
|
|
128
|
-
{/*<Popconfirm placement="left" title={"确定要保存修改并执行此操作吗?"} onConfirm={() => doSubmit(item.id)} okText="确定" cancelText="取消">*/}
|
|
129
|
-
{/*<Button block*/}
|
|
130
|
-
{/* type={'primary'}>{item.title}</Button>*/}
|
|
131
|
-
{/*</Popconfirm>*/}
|
|
132
|
-
<Action serverKey={serverKey} hiddenType={'disabled'} buttonType={'primary-block'} serial={serial} key={item.id} formRef={formRef} actionConfig={item} doAction={doSubmit}></Action>
|
|
133
|
-
</li>
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
) : ""
|
|
137
|
-
}
|
|
138
|
-
{//处理后面的
|
|
139
|
-
actions && actions.length > 2 ?
|
|
140
|
-
<Popover placement="leftTop" content={content} trigger="hover">
|
|
141
|
-
<Button block>
|
|
142
|
-
<LeftOutlined/>{'更多'}
|
|
143
|
-
</Button>
|
|
144
|
-
</Popover> : ""
|
|
145
|
-
}
|
|
146
|
-
</ul>
|
|
147
|
-
</div>
|
|
148
|
-
</Affix>
|
|
149
|
-
)
|
|
40
|
+
return <>{!posi || posi == 'fixedBottomRight' ?
|
|
41
|
+
<FixRightSubmitButtonBar doSubmit={doSubmit} serial={serial} dtmplConfig={dtmplConfig} formRef={formRef}/>
|
|
42
|
+
: <BottomSubmitButtonBar position={posi} doSubmit={doSubmit} serial={serial} dtmplConfig={dtmplConfig} formRef={formRef}/>
|
|
43
|
+
}</>
|
|
150
44
|
}
|
|
151
45
|
}
|
|
152
46
|
|
|
@@ -210,7 +210,7 @@ export default class DtmplEdit extends React.PureComponent<DtmplEditProps, Dtmpl
|
|
|
210
210
|
{showRightNav ?
|
|
211
211
|
<RightBar parentId={id} dtmplConfig={dtmplConfig}/> : ""
|
|
212
212
|
}
|
|
213
|
-
<SubmitButtonBar serverKey={serverKey} serial={serial} dtmplConfig={dtmplConfig} doSubmit={this.doSubmit}
|
|
213
|
+
<SubmitButtonBar serverKey={serverKey} serial={serial} dtmplConfig={dtmplConfig} doSubmit={this.doSubmit} formRef={this.formRef}></SubmitButtonBar>
|
|
214
214
|
<CqueryButtonBar serverKey={serverKey} dtmplConfig={dtmplConfig} mainCode={code}></CqueryButtonBar>
|
|
215
215
|
<PostResult
|
|
216
216
|
open={showPostResult}
|
|
@@ -39,8 +39,8 @@ export default class DtmplEditPage extends React.PureComponent<ModalEditorProps,
|
|
|
39
39
|
}
|
|
40
40
|
static defaultProps = {
|
|
41
41
|
showConfirm: true,
|
|
42
|
-
height:
|
|
43
|
-
width:
|
|
42
|
+
height: '76vh',
|
|
43
|
+
width:'76vw',
|
|
44
44
|
bodyWidth:'100%',
|
|
45
45
|
//antd modal
|
|
46
46
|
forceRender: true,
|
|
@@ -25,8 +25,8 @@ class DtmplViewDrawer extends React.PureComponent<DtmplViewDrawerProps, DtmplVie
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
static defaultProps = {
|
|
28
|
-
height:
|
|
29
|
-
width:
|
|
28
|
+
height: "82vh",
|
|
29
|
+
width:"82vw",
|
|
30
30
|
forceRender: true,
|
|
31
31
|
cancelText: "关闭",
|
|
32
32
|
placement:'left',
|
|
@@ -49,7 +49,7 @@ class DtmplViewDrawer extends React.PureComponent<DtmplViewDrawerProps, DtmplVie
|
|
|
49
49
|
open={open}
|
|
50
50
|
width={width}
|
|
51
51
|
style={{
|
|
52
|
-
maxWidth:
|
|
52
|
+
maxWidth: "92vh",
|
|
53
53
|
}}
|
|
54
54
|
extra={
|
|
55
55
|
<Space>
|
|
@@ -22,8 +22,8 @@ class DtmplViewModal extends React.PureComponent<DtmplViewModalProps, DtmplViewM
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
static defaultProps = {
|
|
25
|
-
height:
|
|
26
|
-
width:
|
|
25
|
+
height: "82vh",
|
|
26
|
+
width:"82vw",
|
|
27
27
|
forceRender: true,
|
|
28
28
|
style: {maxWidth: 'calc(100vw - 60px)', maxHeight: 'calc(100vh - 50px)'},
|
|
29
29
|
open:false,
|
|
@@ -44,7 +44,7 @@ class DtmplViewModal extends React.PureComponent<DtmplViewModalProps, DtmplViewM
|
|
|
44
44
|
centered
|
|
45
45
|
onCancel={onClose}
|
|
46
46
|
>
|
|
47
|
-
<Scrollbars
|
|
47
|
+
<Scrollbars autoHide autoHideTimeout={1000}>
|
|
48
48
|
<DtmplViewCard codeSource={codeSource} serverKey={serverKey} sourceId={sourceId} code={code}></DtmplViewCard>
|
|
49
49
|
</Scrollbars>
|
|
50
50
|
</Modal>
|
|
@@ -19,9 +19,9 @@ export default class LtmplDrawer extends React.PureComponent<LtmplDrawPageProps,
|
|
|
19
19
|
|
|
20
20
|
static defaultProps = {
|
|
21
21
|
showConfirm: true,
|
|
22
|
-
width:
|
|
22
|
+
width:'76vw',
|
|
23
23
|
forceRender: true,
|
|
24
|
-
style: {maxWidth: '
|
|
24
|
+
style: {maxWidth: '92vw', maxHeight: '92vh'},
|
|
25
25
|
okText: "确定",
|
|
26
26
|
cancelText: "取消",
|
|
27
27
|
placement:'left',
|
|
@@ -43,7 +43,7 @@ export default class LtmplDrawer extends React.PureComponent<LtmplDrawPageProps,
|
|
|
43
43
|
open={open}
|
|
44
44
|
width={width}
|
|
45
45
|
style={{
|
|
46
|
-
maxWidth:
|
|
46
|
+
maxWidth: '92vw',
|
|
47
47
|
}}
|
|
48
48
|
// extra={
|
|
49
49
|
// <Space>{this.getFooter()}</Space>
|
|
@@ -19,8 +19,8 @@ export default class LtmplDrawer extends React.PureComponent<LtmplDrawPageProps,
|
|
|
19
19
|
|
|
20
20
|
static defaultProps = {
|
|
21
21
|
showConfirm: true,
|
|
22
|
-
height:
|
|
23
|
-
width:
|
|
22
|
+
height:'82vh' ,
|
|
23
|
+
width:'82vw',
|
|
24
24
|
forceRender: true,
|
|
25
25
|
style: {maxWidth: 'calc(100vw - 60px)', maxHeight: 'calc(100vh - 50px)',padding:10},
|
|
26
26
|
okText: "确定",
|
|
@@ -39,17 +39,15 @@ export default class LtmplDrawer extends React.PureComponent<LtmplDrawPageProps,
|
|
|
39
39
|
width={width}
|
|
40
40
|
title={title}
|
|
41
41
|
closable={false}
|
|
42
|
-
bodyStyle={{height: height, overflow: 'auto',padding:6}}
|
|
42
|
+
bodyStyle={{height: height, overflow: 'auto',padding:"6 0 6 6"}}
|
|
43
43
|
destroyOnClose={true}
|
|
44
44
|
centered
|
|
45
45
|
onOk={onCancel}
|
|
46
46
|
onCancel={onCancel}
|
|
47
|
-
footer={[<Button onClick={onCancel}>关 闭</Button>]}
|
|
48
|
-
|
|
49
|
-
<Card bordered={false} bodyStyle={{padding:'4px
|
|
50
|
-
|
|
47
|
+
footer={[<Button onClick={onCancel}>关 闭</Button>]}>
|
|
48
|
+
<Scrollbars autoHide autoHideTimeout={1000}>
|
|
49
|
+
<Card bordered={false} bodyStyle={{padding:'4px 10px 0 0'}} >
|
|
51
50
|
<LtmplTable {...other}></LtmplTable>
|
|
52
|
-
|
|
53
51
|
</Card>
|
|
54
52
|
</Scrollbars>
|
|
55
53
|
</Modal>
|
|
@@ -190,7 +190,6 @@ class RelationTable extends React.PureComponent<RelationTableProps, RelationTabl
|
|
|
190
190
|
{dtmplEdit ?
|
|
191
191
|
<Button disabled={disabled}
|
|
192
192
|
title="编辑当实体"
|
|
193
|
-
type='primary'
|
|
194
193
|
icon={<FormOutlined/>}
|
|
195
194
|
size="small"
|
|
196
195
|
onClick={() => this.showEditDtmplModel(record)}
|
|
@@ -470,7 +469,6 @@ class RelationTable extends React.PureComponent<RelationTableProps, RelationTabl
|
|
|
470
469
|
{buttons.includes('dtmplAdd') ?
|
|
471
470
|
<Button
|
|
472
471
|
disabled={buttonDisabled}
|
|
473
|
-
type='primary'
|
|
474
472
|
icon={<PlusSquareOutlined/>}
|
|
475
473
|
size="small"
|
|
476
474
|
onClick={this.showAddDtmplModel}
|
|
@@ -110,6 +110,8 @@ export interface ColumnConfig extends FieldConfig {
|
|
|
110
110
|
|
|
111
111
|
export type CodeSource = 'new'|'listop'|'listop-new'|undefined;
|
|
112
112
|
|
|
113
|
+
export type ButtonPosition = 'fixedBottomRight'|'bottomLeft'|'bottomCenter'|'bottomRight'|undefined;
|
|
114
|
+
|
|
113
115
|
export type FieldGroupType = 'relation' | 'fieldGroup' ;
|
|
114
116
|
|
|
115
117
|
export type ButtonName = 'rowAdd' | 'rowEdit' | 'batchDelete'|'singleDelete'| 'selectAdd' | 'dtmplAdd' | 'dtmplEdit' | 'copy'|
|
|
@@ -148,6 +150,7 @@ export interface DtmplConfig extends TmplBase {
|
|
|
148
150
|
actions: ActionConfig[];
|
|
149
151
|
premises: FieldConfig[];
|
|
150
152
|
groups: FieldGroupConfig[];
|
|
153
|
+
buttonPosition:ButtonPosition;
|
|
151
154
|
onValuesChange:(changedValues,allValues:DtmplData,formInstance:FormInstance)=>void
|
|
152
155
|
}
|
|
153
156
|
|