فهرست منبع

fix 一点bug

lanxin 2 هفته پیش
والد
کامیت
94f5a83d53

+ 3 - 0
src/assets/styles/base.css

@@ -192,3 +192,6 @@ textarea {
 .ant-select-item-option-selected {
   background-color: rgba(0, 0, 0, 0.04) !important;
 }
+.ant-tooltip-inner {
+  width: 400px;
+}

+ 9 - 1
src/components/MyTable/index.module.scss

@@ -7,7 +7,15 @@
       .ant-table-row {
         .ant-table-cell {
           padding: 10px;
-
+          .txtclamp3 {
+            cursor: pointer;
+            -webkit-line-clamp: 3;
+            line-clamp: 3;
+            text-overflow: ellipsis;
+            overflow: hidden;
+            display: -webkit-box;
+            -webkit-box-orient: vertical;
+          }
           a {
             color: var(--themeColor) !important;
           }

+ 13 - 2
src/components/MyTable/index.tsx

@@ -1,6 +1,6 @@
 import React, { useCallback, useEffect, useMemo } from 'react'
 import styles from './index.module.scss'
-import { Table, Button } from 'antd'
+import { Table, Button, Tooltip } from 'antd'
 import ImageLazy from '../ImageLazy'
 import { A1_moveUp, A1_moveDown } from '../../store/action/A1banner'
 import { useDispatch } from 'react-redux'
@@ -89,7 +89,18 @@ function MyTable({
         index: (_: any, __: any, index: number) => index + 1 + (pageNum - 1) * pageSize,
         txtNormal: (item: any) => item[v[2]] || isNull,
         txt: (item: any) => {
-          return item.status === 0 ? item[v[3]] || isNull : item[v[2]] || isNull
+          return (
+            <Tooltip
+              placement='bottom'
+              trigger={['click']}
+              color='rgba(81, 70, 55, 1)'
+              title={item.status === 0 ? item[v[3]] || <></> : item[v[2]] || <></>}
+            >
+              <div className='txtclamp3'>
+                {item.status === 0 ? item[v[3]] || isNull : item[v[2]] || isNull}
+              </div>
+            </Tooltip>
+          )
         },
         img: (item: any) => {
           console.log(item, '---------------------')

+ 5 - 1
src/pages/A2introduction/index.tsx

@@ -109,7 +109,11 @@ const A2introduction = () => {
               >
                 预览
               </Button>
-              <Button type='primary' onClick={() => publishFu(data.contextId)}>
+              <Button
+                type='primary'
+                disabled={data.status === 1}
+                onClick={() => publishFu(data.contextId)}
+              >
                 发布
               </Button>
             </div>

+ 1 - 1
src/pages/A4news/A4add/index.tsx

@@ -195,7 +195,7 @@ function A4add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
             name='title'
             rules={[{ required: true, message: '请输入标题!' }]}
           >
-            <Input placeholder='请输入内容,不超过30个字' maxLength={30} showCount />
+            <Input placeholder='请输入内容,不超过50个字' maxLength={50} showCount />
           </Form.Item>
 
           <Form.Item

+ 1 - 1
src/pages/A5activity/A5add/index.tsx

@@ -226,7 +226,7 @@ function A5add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
             name='title'
             rules={[{ required: true, message: '请输入标题!' }]}
           >
-            <Input placeholder='请输入内容,不超过30个字' maxLength={30} showCount />
+            <Input placeholder='请输入内容,不超过50个字' maxLength={50} showCount />
           </Form.Item>
 
           <Form.Item

+ 2 - 2
src/pages/A7collection/A7add/index.tsx

@@ -232,7 +232,7 @@ function A7add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
             name='title'
             rules={[{ required: true, message: '请输入标题!' }]}
           >
-            <Input placeholder='请输入内容,最多20字' maxLength={20} showCount />
+            <Input placeholder='请输入内容,最多50字' maxLength={50} showCount />
           </Form.Item>
 
           <Form.Item label='类别' name='type' initialValue={4}>
@@ -240,7 +240,7 @@ function A7add({ editInfo, closeFu, addTableFu, editTableFu }: Props) {
               defaultValue={0}
               placeholder='请选择类别'
               options={[
-                { label: '织绣', value: 1 },
+                { label: '棉麻丝绸', value: 1 },
                 { label: '铁器、其他金属器', value: 2 },
                 { label: '文物、宣传品', value: 3 },
                 { label: '其他', value: 4 }

+ 1 - 1
src/pages/A7collection/index.tsx

@@ -162,7 +162,7 @@ function A7collection() {
               defaultValue={0}
               options={[
                 { label: '全部', value: 0 },
-                { label: '织绣', value: 1 },
+                { label: '棉麻丝绸', value: 1 },
                 { label: '铁器、其他金属器', value: 2 },
                 { label: '文物、宣传品', value: 3 },
                 { label: '其他', value: 4 }

+ 6 - 1
src/utils/tableData.ts

@@ -43,7 +43,12 @@ export const A6tableC = [
 
 export const A7tableC = [
   ['txt', '标题', 'title', 'titleB'],
-  ['txtChange', '类别', 'type', { 1: '织绣', 2: '铁器、其他金属器', 3: '文物、宣传品', 4: '其他' }],
+  [
+    'txtChange',
+    '类别',
+    'type',
+    { 1: '棉麻丝绸', 2: '铁器、其他金属器', 3: '文物、宣传品', 4: '其他' }
+  ],
   ['txt', '级别', 'level', 'levelB'],
   ['txt', '质地', 'texture', 'textureB'],
   ['txt', '年代', 'era', 'eraB'],