Skip to content

Commit

Permalink
✨ feat(ims-view-pc): add CommonEditTable
Browse files Browse the repository at this point in the history
  • Loading branch information
eternallycyf committed Oct 29, 2023
1 parent 60b32cb commit 81e9f63
Show file tree
Hide file tree
Showing 20 changed files with 1,292 additions and 33 deletions.
4 changes: 2 additions & 2 deletions packages/ims-view-pc/src/components/AccessBtn/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const AccessBtn: React.FC<IAccessBtnProps> = (props) => {
const accessCodeList = accessCollection.map((item) => item);

const btnEleList = (btnList || []).map((btn, index) => {
const { type, code, buttonType, element, visible, itemProps } = btn;
const { type = 'default', code, buttonType, element, visible, itemProps } = btn;
const buttonProps = (btn?.itemProps?.buttonProps as IButtonItemProps['buttonProps']) || {};
const buttonGroupProps = btn?.itemProps?.buttonGroupProps || {};
const popConfirmProps = btn?.itemProps?.popConfirmProps || {};
Expand Down Expand Up @@ -79,7 +79,7 @@ const AccessBtn: React.FC<IAccessBtnProps> = (props) => {
return (
<Button
key={`access-${code || index}${getUUID()}`}
size={size || 'middle'}
size={size || 'small'}
type={buttonType || 'primary'}
{...buttonProps}
>
Expand Down
8 changes: 5 additions & 3 deletions packages/ims-view-pc/src/components/AccessBtn/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface IButtonItemProps extends IButtonDeleteProps, IButtonGroupProps
popConfirmProps?: PopconfirmProps;
}

export interface IButtonProps {
export interface IBaseButtonProps {
element?: ReactNode;
type?: IAccessBtnType;
buttonType?: ButtonProps['type'];
Expand All @@ -51,9 +51,11 @@ export interface IButtonProps {
itemProps?: IButtonItemProps;
}

export interface IAccessBtnProps {
export type IButtonProps<Rest = Record<string, unknown>> = Rest & IBaseButtonProps;

export interface IAccessBtnProps<Rest = Record<string, unknown>> {
className?: string;
accessCollection?: string[];
children?: React.ReactNode;
btnList?: IButtonProps[];
btnList?: IButtonProps<Rest>[];
}
2 changes: 1 addition & 1 deletion packages/ims-view-pc/src/components/AudioPlayer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 音频播放器: 提供音频文件的播放、控制等
toc: content
group:
title: 文件
order: 2
order: 4
demo:
cols: 2
---
Expand Down
2 changes: 1 addition & 1 deletion packages/ims-view-pc/src/components/CommonCard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 卡片布局
toc: content
group:
title: 布局
order: 1
order: 3
demo:
cols: 2
---
Expand Down
Loading

0 comments on commit 81e9f63

Please sign in to comment.