新增数据,编辑数据初步完善
This commit is contained in:
@@ -3,9 +3,10 @@ import React from 'react';
|
||||
interface ActionButtonsProps {
|
||||
onSave?: () => void;
|
||||
onSaveDraft?: () => void;
|
||||
isEditMode?: boolean;
|
||||
}
|
||||
|
||||
export function ActionButtons({ onSave, onSaveDraft }: ActionButtonsProps) {
|
||||
export function ActionButtons({ onSave, onSaveDraft, isEditMode }: ActionButtonsProps) {
|
||||
return (
|
||||
<div className="flex justify-center space-x-4 mt-8 mb-4">
|
||||
<button
|
||||
@@ -13,14 +14,14 @@ export function ActionButtons({ onSave, onSaveDraft }: ActionButtonsProps) {
|
||||
className="ant-btn ant-btn-primary min-w-[120px]"
|
||||
onClick={onSave}
|
||||
>
|
||||
<i className="ri-save-line mr-1"></i> 保存
|
||||
<i className="ri-save-line mr-1"></i> {isEditMode ? '保存修改' : '保存'}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="ant-btn ant-btn-default min-w-[120px]"
|
||||
onClick={onSaveDraft}
|
||||
>
|
||||
<i className="ri-draft-line mr-1"></i> 保存草稿
|
||||
<i className="ri-draft-line mr-1"></i> {isEditMode ? '另存为草稿' : '保存草稿'}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user