Skip to content

Commit 91f4105

Browse files
g-fengchenwb-fc932227
andauthored
钉钉组件入参默认值完善 (#48)
Co-authored-by: wb-fc932227 <[email protected]>
1 parent ef7cc11 commit 91f4105

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/dingtalk-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@serverless-cd/dingtalk-ui",
3-
"version": "0.0.8",
3+
"version": "0.0.9",
44
"scripts": {
55
"start": "dumi dev",
66
"docs:build": "dumi build",

packages/dingtalk-ui/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { forwardRef, useImperativeHandle } from 'react';
2-
import { isEmpty } from 'lodash';
2+
import { isEmpty, noop } from 'lodash';
33
import { Form, Input, Switch, Select, Field } from '@alicloud/console-components';
44
import { FORM_CUSTOM_MIDDLE_LABEL_LEFT, IProps, HELP_TYPE } from './types';
55
import { HELP_RENDER } from './constants';
@@ -13,7 +13,7 @@ const dataSource = [
1313
];
1414

1515
const DingTalk = (props: IProps, ref) => {
16-
const { value, onChange, className = {}, isPreview } = props;
16+
const { value = {}, onChange = noop, className = {}, isPreview } = props;
1717
const field = Field.useField({
1818
onChange: () => {
1919
onChange(getValues());

0 commit comments

Comments
 (0)