@hzab/flowlong-designer 1.0.7-beta2 → 1.0.7-beta3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # @hzab/flowlong-designer@1.0.8
2
+
3
+ feat:二次确认配置是否展示
4
+
1
5
  # @hzab/flowlong-designer@1.0.7
2
6
 
3
7
  feat:审核人、抄送人添加直接主管配置
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/flowlong-designer",
3
- "version": "1.0.7-beta2",
3
+ "version": "1.0.7-beta3",
4
4
  "description": "自定义审批流配置组件",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -11,7 +11,7 @@ import "./index.less";
11
11
  import SignatureConfiguration from "../../components/SignatureConfiguration";
12
12
 
13
13
  export const Approver = (props) => {
14
- const { modelValue = {}, onChange, disable, readOnly } = props;
14
+ const { modelValue = {}, onChange, disable, readOnly, showSignature } = props;
15
15
  const [form, setForm] = useState({
16
16
  nodeName: "",
17
17
  setType: undefined,
@@ -581,11 +581,13 @@ export const Approver = (props) => {
581
581
  </Form.Item>
582
582
  ) : null}
583
583
  </Form>
584
- <SignatureConfiguration
585
- ref={signatureConfigurationRef}
586
- formData={form}
587
- type="approver"
588
- ></SignatureConfiguration>
584
+ {showSignature && (
585
+ <SignatureConfiguration
586
+ ref={signatureConfigurationRef}
587
+ formData={form}
588
+ type="approver"
589
+ ></SignatureConfiguration>
590
+ )}
589
591
  </Drawer>
590
592
  </div>
591
593
  </div>
@@ -10,7 +10,7 @@ import SignatureConfiguration from "../../components/SignatureConfiguration";
10
10
 
11
11
  export const Promoter = (props) => {
12
12
  const selectorCtx = useContext(SelectContext);
13
- const { modelValue: nodeConfig = {}, onChange, disable, readOnly } = props;
13
+ const { modelValue: nodeConfig = {}, onChange, disable, readOnly, showSignature } = props;
14
14
 
15
15
  const [drawer, setDrawer] = useState(false);
16
16
  const [isEditTitle, setIsEditTitle] = useState(false);
@@ -194,7 +194,9 @@ export const Promoter = (props) => {
194
194
  {!form.nodeAssigneeList || form.nodeAssigneeList?.length <= 0 ? (
195
195
  <Alert message="不指定则默认所有人都可发起此审批" type="info" />
196
196
  ) : null}
197
- <SignatureConfiguration ref={signatureConfigurationRef} formData={form}></SignatureConfiguration>
197
+ {showSignature && (
198
+ <SignatureConfiguration ref={signatureConfigurationRef} formData={form}></SignatureConfiguration>
199
+ )}
198
200
  </Drawer>
199
201
  </div>
200
202
  </div>
package/src/index.tsx CHANGED
@@ -49,7 +49,17 @@ function copy(str) {
49
49
  }
50
50
 
51
51
  function FlowlongDesigner(props, ref) {
52
- const { value, flowName, roleListConfig, listConfig, initiatorListConfig, isShowJson, disable, readOnly } = props;
52
+ const {
53
+ value,
54
+ flowName,
55
+ roleListConfig,
56
+ listConfig,
57
+ initiatorListConfig,
58
+ isShowJson,
59
+ disable,
60
+ readOnly,
61
+ showSignature,
62
+ } = props;
53
63
  const [drawer, setDrawer] = useState(false);
54
64
  const [zoom, setZoom] = useState(1);
55
65
  const [data, setData] = useState(Object.keys(value || {}).length > 0 ? value : getInitNodeData({ name: flowName }));
@@ -131,6 +141,7 @@ function FlowlongDesigner(props, ref) {
131
141
  modelValue={data.nodeConfig}
132
142
  disable={disable}
133
143
  readOnly={readOnly}
144
+ showSignature={showSignature}
134
145
  onChange={(val) => {
135
146
  setData((d) => {
136
147
  d.nodeConfig = val;