Skip to content

Commit

Permalink
feat: ✨ 新增查询表单组件
Browse files Browse the repository at this point in the history
  • Loading branch information
G committed Dec 11, 2023
1 parent 6c8a152 commit 6ba1645
Show file tree
Hide file tree
Showing 9 changed files with 944 additions and 42 deletions.
2 changes: 1 addition & 1 deletion packages/gbeata/src/GForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import React, {
useState,
} from 'react';
import { convertChildrenToField } from '../GFields/convertFields';
import { MwSearchField } from '../GSearch/g-search';
import MwCard from '../MwCard';
import { MwSearchField } from '../MwSearch/mw-search';
import { MwSearchTableField } from '../MwSearchTable/mw-search-table';
import { theme } from '../Theme';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { GFormField } from '../GForm/g-form';
import { ExtendField } from '../MwSearchTable/mw-search-table';
import { AnyKeyProps } from '../types/AnyKeyProps';

export interface MwSearchProps {
export interface GSearchProps {
fields: Array<MwSearchField>;
onConfirm?(values: AnyKeyProps): void;
onReset?(): void;
Expand All @@ -22,7 +22,7 @@ export interface MwSearchProps {
[key: string]: any;
}

export interface MwSearchField extends GFormField {
export interface GSearchField extends GFormField {
search?: ExtendField;
span?: {
large: number;
Expand Down
7 changes: 7 additions & 0 deletions packages/gbeata/src/GSearch/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { GSearchProps } from './g-search';

declare const MwSearch: React.ForwardRefExoticComponent<
GSearchProps & React.RefAttributes<HTMLDivElement>
>;

export default MwSearch;
Loading

0 comments on commit 6ba1645

Please sign in to comment.