form-driver 0.3.12 → 0.3.13
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/dist/m3.js +1 -1
- package/es/m3.js +7 -1
- package/lib/m3.js +7 -1
- package/package.json +1 -1
- package/src/framework/MViewer.tsx +4 -0
- package/types/framework/MViewer.d.ts +1 -0
package/es/m3.js
CHANGED
|
@@ -21322,7 +21322,13 @@ function SubmitBar(props) {
|
|
|
21322
21322
|
return /*#__PURE__*/React.createElement("div", {
|
|
21323
21323
|
style: style,
|
|
21324
21324
|
onClick: props.children ? onClick : undefined
|
|
21325
|
-
}, props.
|
|
21325
|
+
}, props.onCancel ? /*#__PURE__*/React.createElement(Button, {
|
|
21326
|
+
style: {
|
|
21327
|
+
width: "40%",
|
|
21328
|
+
marginRight: '20px'
|
|
21329
|
+
},
|
|
21330
|
+
onClick: props.onCancel
|
|
21331
|
+
}, "\u8FD4\u56DE") : null, props.children ? _.isFunction(props.children) ? props.children(loading) : props.children : /*#__PURE__*/React.createElement(Button, {
|
|
21326
21332
|
style: {
|
|
21327
21333
|
width: "40%"
|
|
21328
21334
|
},
|
package/lib/m3.js
CHANGED
|
@@ -21344,7 +21344,13 @@ function SubmitBar(props) {
|
|
|
21344
21344
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21345
21345
|
style: style,
|
|
21346
21346
|
onClick: props.children ? onClick : undefined
|
|
21347
|
-
}, props.
|
|
21347
|
+
}, props.onCancel ? /*#__PURE__*/React__default["default"].createElement(antd.Button, {
|
|
21348
|
+
style: {
|
|
21349
|
+
width: "40%",
|
|
21350
|
+
marginRight: '20px'
|
|
21351
|
+
},
|
|
21352
|
+
onClick: props.onCancel
|
|
21353
|
+
}, "\u8FD4\u56DE") : null, props.children ? ___default["default"].isFunction(props.children) ? props.children(loading) : props.children : /*#__PURE__*/React__default["default"].createElement(antd.Button, {
|
|
21348
21354
|
style: {
|
|
21349
21355
|
width: "40%"
|
|
21350
21356
|
},
|
package/package.json
CHANGED
|
@@ -135,6 +135,7 @@ export class MViewer extends React.Component<MViewerProp, State> {
|
|
|
135
135
|
export function SubmitBar(props: {
|
|
136
136
|
style?: React.CSSProperties,
|
|
137
137
|
onSubmit?: (finalData: any) => Promise<any>,
|
|
138
|
+
onCancel?: () => void,
|
|
138
139
|
children?: React.ReactNode | ((loading: boolean) => React.ReactNode)
|
|
139
140
|
}): JSX.Element {
|
|
140
141
|
|
|
@@ -178,6 +179,9 @@ export function SubmitBar(props: {
|
|
|
178
179
|
}
|
|
179
180
|
};
|
|
180
181
|
return <div style={style} onClick={props.children ? onClick : undefined}>
|
|
182
|
+
{
|
|
183
|
+
props.onCancel ? <Button style={{ width: "40%", marginRight: '20px' }} onClick={props.onCancel}>返回</Button> : null
|
|
184
|
+
}
|
|
181
185
|
{
|
|
182
186
|
props.children
|
|
183
187
|
? (_.isFunction(props.children) ? props.children(loading) : props.children)
|
|
@@ -74,6 +74,7 @@ export declare class MViewer extends React.Component<MViewerProp, State> {
|
|
|
74
74
|
export declare function SubmitBar(props: {
|
|
75
75
|
style?: React.CSSProperties;
|
|
76
76
|
onSubmit?: (finalData: any) => Promise<any>;
|
|
77
|
+
onCancel?: () => void;
|
|
77
78
|
children?: React.ReactNode | ((loading: boolean) => React.ReactNode);
|
|
78
79
|
}): JSX.Element;
|
|
79
80
|
export declare function useM3Database(initValue: any): [any, React.Dispatch<any>];
|