mirror of
https://github.com/PlayEdu/backend
synced 2025-06-21 08:32:42 +08:00
上传图片按钮文案替换
This commit is contained in:
parent
d2ca3f535f
commit
060d686cee
@ -36,6 +36,7 @@ interface ImageItem {
|
||||
}
|
||||
|
||||
interface PropsInterface {
|
||||
text: any;
|
||||
onSelected: (url: string) => void;
|
||||
}
|
||||
|
||||
@ -83,7 +84,7 @@ export const UploadImageButton = (props: PropsInterface) => {
|
||||
setShowModal(true);
|
||||
}}
|
||||
>
|
||||
上传图片
|
||||
{props.text ? props.text : "上传图片"}
|
||||
</Button>
|
||||
|
||||
{showModal && (
|
||||
|
@ -574,6 +574,7 @@ export const CourseCreate: React.FC<PropInterface> = ({
|
||||
</div>
|
||||
<div className="d-flex">
|
||||
<UploadImageButton
|
||||
text="更换封面"
|
||||
onSelected={(url) => {
|
||||
setThumb(url);
|
||||
form.setFieldsValue({ thumb: url });
|
||||
|
@ -330,6 +330,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
||||
</div>
|
||||
<div className="d-flex">
|
||||
<UploadImageButton
|
||||
text="更换封面"
|
||||
onSelected={(url) => {
|
||||
setThumb(url);
|
||||
form.setFieldsValue({ thumb: url });
|
||||
|
@ -129,6 +129,7 @@ export const MemberCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
|
||||
)}
|
||||
<div className="d-flex">
|
||||
<UploadImageButton
|
||||
text="更换头像"
|
||||
onSelected={(url) => {
|
||||
setAvatar(url);
|
||||
form.setFieldsValue({ avatar: url });
|
||||
|
@ -163,6 +163,7 @@ export const MemberUpdate: React.FC<PropInterface> = ({
|
||||
)}
|
||||
<div className="d-flex">
|
||||
<UploadImageButton
|
||||
text="更换头像"
|
||||
onSelected={(url) => {
|
||||
setAvatar(url);
|
||||
form.setFieldsValue({ avatar: url });
|
||||
|
@ -198,6 +198,7 @@ const SystemConfigPage = () => {
|
||||
<Image preview={false} height={40} src={logo} />
|
||||
<div className="d-flex ml-24">
|
||||
<UploadImageButton
|
||||
text="更换Logo"
|
||||
onSelected={(url) => {
|
||||
setLogo(url);
|
||||
form.setFieldsValue({ "system.logo": url });
|
||||
@ -219,6 +220,7 @@ const SystemConfigPage = () => {
|
||||
<div className="d-flex">
|
||||
<div className="d-flex ml-24">
|
||||
<UploadImageButton
|
||||
text="更换Logo"
|
||||
onSelected={(url) => {
|
||||
setLogo(url);
|
||||
form.setFieldsValue({ "system.logo": url });
|
||||
@ -363,6 +365,7 @@ const SystemConfigPage = () => {
|
||||
/>
|
||||
<div className="d-flex ml-24">
|
||||
<UploadImageButton
|
||||
text="更换封面"
|
||||
onSelected={(url) => {
|
||||
setThumb(url);
|
||||
form.setFieldsValue({ "player.poster": url });
|
||||
@ -384,6 +387,7 @@ const SystemConfigPage = () => {
|
||||
<div className="d-flex">
|
||||
<div className="d-flex">
|
||||
<UploadImageButton
|
||||
text="更换封面"
|
||||
onSelected={(url) => {
|
||||
setThumb(url);
|
||||
form.setFieldsValue({ "player.poster": url });
|
||||
|
Loading…
x
Reference in New Issue
Block a user