|
@@ -38,6 +38,7 @@ import {
|
|
DownloadOutlined,
|
|
DownloadOutlined,
|
|
} from "@ant-design/icons";
|
|
} from "@ant-design/icons";
|
|
import { ReactSortable } from "react-sortablejs";
|
|
import { ReactSortable } from "react-sortablejs";
|
|
|
|
+import TextArea from "antd/es/input/TextArea";
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
id: number;
|
|
id: number;
|
|
@@ -51,6 +52,7 @@ function WallAdd({ id, closeMoalFu, tableType }: Props) {
|
|
FormBoxRef.current?.setFieldsValue({
|
|
FormBoxRef.current?.setFieldsValue({
|
|
name: res.data.entity.name,
|
|
name: res.data.entity.name,
|
|
display: res.data.entity.display,
|
|
display: res.data.entity.display,
|
|
|
|
+ description:res.data.entity.description
|
|
});
|
|
});
|
|
setTopType(res.data.entity.type);
|
|
setTopType(res.data.entity.type);
|
|
|
|
|
|
@@ -216,7 +218,7 @@ function WallAdd({ id, closeMoalFu, tableType }: Props) {
|
|
|
|
|
|
// 通过校验点击确定
|
|
// 通过校验点击确定
|
|
const onFinish = useCallback(
|
|
const onFinish = useCallback(
|
|
- async (value: { name: string; display: 1 | 0 }) => {
|
|
|
|
|
|
+ async (value: { name: string; display: 1 | 0; description: string }) => {
|
|
console.log("通过校验,点击确定");
|
|
console.log("通过校验,点击确定");
|
|
setImgCheck(true);
|
|
setImgCheck(true);
|
|
|
|
|
|
@@ -238,6 +240,7 @@ function WallAdd({ id, closeMoalFu, tableType }: Props) {
|
|
layout: imgList.length,
|
|
layout: imgList.length,
|
|
thumb: cover,
|
|
thumb: cover,
|
|
display: value.display,
|
|
display: value.display,
|
|
|
|
+ description: value.description,
|
|
};
|
|
};
|
|
|
|
|
|
const res = await setWallSave(obj);
|
|
const res = await setWallSave(obj);
|
|
@@ -255,7 +258,7 @@ function WallAdd({ id, closeMoalFu, tableType }: Props) {
|
|
|
|
|
|
return (
|
|
return (
|
|
<div className={styles.WallAdd}>
|
|
<div className={styles.WallAdd}>
|
|
- <div className="main">
|
|
|
|
|
|
+ <div className="main mySorrl">
|
|
<Form
|
|
<Form
|
|
ref={FormBoxRef}
|
|
ref={FormBoxRef}
|
|
name="basic"
|
|
name="basic"
|
|
@@ -287,6 +290,22 @@ function WallAdd({ id, closeMoalFu, tableType }: Props) {
|
|
>
|
|
>
|
|
<Input maxLength={25} showCount placeholder="请输入内容" />
|
|
<Input maxLength={25} showCount placeholder="请输入内容" />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
|
+
|
|
|
|
+ {topType === "img" ? (
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="简介"
|
|
|
|
+ name="description"
|
|
|
|
+ // getValueFromEvent={(e) => e.target.value.trim()}
|
|
|
|
+ >
|
|
|
|
+ <TextArea
|
|
|
|
+ rows={4}
|
|
|
|
+ placeholder="请输入内容"
|
|
|
|
+ showCount
|
|
|
|
+ maxLength={500}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ ) : null}
|
|
|
|
+
|
|
{/* 封面图上传 */}
|
|
{/* 封面图上传 */}
|
|
<div className="myformBox myformBoxOne">
|
|
<div className="myformBox myformBoxOne">
|
|
<div className="label">
|
|
<div className="label">
|