@nokecy/qc-ui 0.4.3 → 0.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nokecy/qc-ui",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/esm/index.d.ts",
@@ -1,15 +0,0 @@
1
- interface FormLayoutModeProps {
2
- formId: string;
3
- schema: {
4
- form: any;
5
- schema: any;
6
- };
7
- SchemaField: any;
8
- close: () => void;
9
- history: any;
10
- useModel: any;
11
- dropByCacheKey: (key: string) => void;
12
- targetUrl?: string;
13
- }
14
- declare const FormLayoutMode: (props: FormLayoutModeProps) => JSX.Element;
15
- export default FormLayoutMode;
@@ -1,69 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _antdV = require("@formily/antd-v5");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- var FormLayoutMode = function FormLayoutMode(props) {
15
- var formId = props.formId,
16
- schema = props.schema,
17
- SchemaField = props.SchemaField,
18
- close = props.close,
19
- history = props.history,
20
- useModel = props.useModel,
21
- dropByCacheKey = props.dropByCacheKey,
22
- targetUrl = props.targetUrl;
23
-
24
- var _useModel = useModel('useEditModeModel'),
25
- editModeState = _useModel.editModeState;
26
-
27
- var url = '/appSYS/appExtraObjectForm/extraObjectFormSchema/designer';
28
- var styles = {
29
- container: {
30
- border: "2px solid #1890FF",
31
- position: 'relative'
32
- },
33
- editLabel: {
34
- position: 'absolute',
35
- top: 0,
36
- right: 0,
37
- backgroundColor: '#1890FF',
38
- borderRadius: 4,
39
- margin: 4,
40
- color: '#fff',
41
- cursor: 'pointer',
42
- textAlign: 'center',
43
- width: 45,
44
- height: 20,
45
- zIndex: 9999
46
- }
47
- };
48
-
49
- var handleEditClick = function handleEditClick() {
50
- close();
51
- dropByCacheKey(targetUrl || url);
52
- history.push({
53
- pathname: targetUrl || url,
54
- search: "?name=".concat(formId)
55
- });
56
- };
57
-
58
- return /*#__PURE__*/_react.default.createElement("div", {
59
- style: editModeState ? styles.container : undefined
60
- }, /*#__PURE__*/_react.default.createElement(_antdV.FormLayout, schema.form, /*#__PURE__*/_react.default.createElement(SchemaField, {
61
- schema: schema.schema
62
- })), editModeState && /*#__PURE__*/_react.default.createElement("div", {
63
- style: styles.editLabel,
64
- onClick: handleEditClick
65
- }, "\u7F16\u8F91"));
66
- };
67
-
68
- var _default = FormLayoutMode;
69
- exports.default = _default;
@@ -1,2 +0,0 @@
1
- import FormLayoutMode from "./editFormMode";
2
- export { FormLayoutMode };
@@ -1,15 +0,0 @@
1
- interface FormLayoutModeProps {
2
- formId: string;
3
- schema: {
4
- form: any;
5
- schema: any;
6
- };
7
- SchemaField: any;
8
- close: () => void;
9
- history: any;
10
- useModel: any;
11
- dropByCacheKey: (key: string) => void;
12
- targetUrl?: string;
13
- }
14
- declare const FormLayoutMode: (props: FormLayoutModeProps) => JSX.Element;
15
- export default FormLayoutMode;
@@ -1,58 +0,0 @@
1
- import React from "react";
2
- import { FormLayout } from '@formily/antd-v5';
3
-
4
- var FormLayoutMode = function FormLayoutMode(props) {
5
- var formId = props.formId,
6
- schema = props.schema,
7
- SchemaField = props.SchemaField,
8
- close = props.close,
9
- history = props.history,
10
- useModel = props.useModel,
11
- dropByCacheKey = props.dropByCacheKey,
12
- targetUrl = props.targetUrl;
13
-
14
- var _useModel = useModel('useEditModeModel'),
15
- editModeState = _useModel.editModeState;
16
-
17
- var url = '/appSYS/appExtraObjectForm/extraObjectFormSchema/designer';
18
- var styles = {
19
- container: {
20
- border: "2px solid #1890FF",
21
- position: 'relative'
22
- },
23
- editLabel: {
24
- position: 'absolute',
25
- top: 0,
26
- right: 0,
27
- backgroundColor: '#1890FF',
28
- borderRadius: 4,
29
- margin: 4,
30
- color: '#fff',
31
- cursor: 'pointer',
32
- textAlign: 'center',
33
- width: 45,
34
- height: 20,
35
- zIndex: 9999
36
- }
37
- };
38
-
39
- var handleEditClick = function handleEditClick() {
40
- close();
41
- dropByCacheKey(targetUrl || url);
42
- history.push({
43
- pathname: targetUrl || url,
44
- search: "?name=".concat(formId)
45
- });
46
- };
47
-
48
- return /*#__PURE__*/React.createElement("div", {
49
- style: editModeState ? styles.container : undefined
50
- }, /*#__PURE__*/React.createElement(FormLayout, schema.form, /*#__PURE__*/React.createElement(SchemaField, {
51
- schema: schema.schema
52
- })), editModeState && /*#__PURE__*/React.createElement("div", {
53
- style: styles.editLabel,
54
- onClick: handleEditClick
55
- }, "\u7F16\u8F91"));
56
- };
57
-
58
- export default FormLayoutMode;
@@ -1,2 +0,0 @@
1
- import FormLayoutMode from "./editFormMode";
2
- export { FormLayoutMode };
@@ -1,2 +0,0 @@
1
- import FormLayoutMode from "./editFormMode";
2
- export { FormLayoutMode };