fix:精选描述

This commit is contained in:
yy
2025-04-24 18:37:17 +08:00
parent e420f518b5
commit 6ce4e857ab
3 changed files with 399 additions and 374 deletions

View File

@@ -7,7 +7,7 @@ import {
ProFormSelect, ProFormSelect,
ProFormText, ProFormText,
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
import { Form } from 'antd'; import { Form,Input } from 'antd';
import { DictValueEnumObj } from '@/components/DictTag'; import { DictValueEnumObj } from '@/components/DictTag';
export type ListFormProps = { export type ListFormProps = {
@@ -121,6 +121,18 @@ const listEdit: React.FC<ListFormProps> = (props) => {
width="md" width="md"
/> />
</ProForm.Group> </ProForm.Group>
<ProForm.Item
name="description"
label="精选描述"
>
<Input.TextArea
placeholder="请输入卡片精选描述最多200字"
maxLength={200}
showCount
rows={4}
style={{ resize: 'none' }}
/>
</ProForm.Item>
</ModalForm> </ModalForm>
); );
}; };

View File

@@ -1,6 +1,6 @@
import React, { Fragment, useEffect, useRef, useState } from 'react'; import React, { Fragment, useEffect, useRef, useState } from 'react';
import { useAccess } from '@umijs/max'; import { useAccess } from '@umijs/max';
import { Button, FormInstance, message, Modal, Switch } from 'antd'; import { Button, FormInstance, message, Modal, Switch, Tooltip } from 'antd';
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components'; import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
import { DeleteOutlined, FormOutlined, PieChartFilled, PlusOutlined } from '@ant-design/icons'; import { DeleteOutlined, FormOutlined, PieChartFilled, PlusOutlined } from '@ant-design/icons';
import EditCompanyListRow from './edit'; import EditCompanyListRow from './edit';
@@ -99,6 +99,17 @@ function ManagementList() {
<Switch checked={record.status === 1} onChange={changeStatus.bind(null, record)} /> <Switch checked={record.status === 1} onChange={changeStatus.bind(null, record)} />
), ),
}, },
{
title: '精选描述',
dataIndex: 'description',
ellipsis: true,
render: (text) => (
<Tooltip title={text} placement="topLeft">
<span>{text || '-'}</span>
</Tooltip>
),
hideInSearch: true,
},
{ {
title: '操作', title: '操作',
hideInSearch: true, hideInSearch: true,
@@ -147,6 +158,7 @@ function ManagementList() {
</Button>, </Button>,
], ],
}, },
]; ];
return ( return (
<Fragment> <Fragment>

View File

@@ -8,8 +8,9 @@ declare namespace API.ApplicationProducts {
export interface Product { export interface Product {
createTime: string; createTime: string;
companyCardId: number; companyCardId?: number;
name: string; name: string;
description?:string;
companyNature: string; companyNature: string;
backgroudColor: string; backgroudColor: string;
status: number; status: number;