Browse Source

fix: cascader、tagInput validateStatus type check lack success (#746)

rojer 3 years ago
parent
commit
be4d42e6f3

+ 1 - 1
packages/semi-foundation/cascader/constants.ts

@@ -7,7 +7,7 @@ const cssClasses = {
 
 const strings = {
     SIZE_SET: ['small', 'large', 'default'],
-    VALIDATE_STATUS: ['default', 'error', 'warning'] as const,
+    VALIDATE_STATUS: ['success', 'default', 'error', 'warning'] as const,
     IS_KEY: 'isKey',
     IS_VALUE: 'isValue',
     SHOW_NEXT_BY_CLICK: 'click',

+ 1 - 1
packages/semi-foundation/tagInput/constants.ts

@@ -6,7 +6,7 @@ const cssClasses = {
 
 const strings = {
     SIZE_SET: ['large', 'default', 'small'],
-    STATUS: ["default", "error", "warning"],
+    STATUS: ["success", "default", "error", "warning"],
 } as const;
 
 export {

+ 9 - 0
packages/semi-ui/form/_story/demo.jsx

@@ -283,6 +283,15 @@ class BasicDemoWithInit extends Component {
                             </Form.AutoComplete>
                         </Col>
                     </Row>
+                    <Row>
+                        <Col span={12}>
+                            <Form.TagInput
+                                field='tags'
+                                label='tags'
+                            />
+                        </Col>
+                        
+                    </Row>
                 </Form.Section>
                 <Form.Section text='资源详情'>