Explorar el Código

修改视频管理标题字段长度

shaogen1995 hace 2 semanas
padre
commit
36240e261a
Se han modificado 3 ficheros con 11 adiciones y 4 borrados
  1. 3 2
      src/pages/B4video/B4add/index.tsx
  2. 2 2
      src/pages/B4video/index.tsx
  3. 6 0
      src/utils/tableData.ts

+ 3 - 2
src/pages/B4video/B4add/index.tsx

@@ -1,7 +1,7 @@
 import React, { useCallback, useEffect, useRef, useState } from 'react'
 import styles from './index.module.scss'
 import { B1ListType } from '@/pages/B1panorama/data'
-import { Button, Form, FormInstance, Input, InputNumber, Modal, Select } from 'antd'
+import { Button, Form, FormInstance, InputNumber, Modal, Select } from 'antd'
 import { MessageFu } from '@/utils/message'
 import { B1_APIsave } from '@/store/action/B1panorama'
 import { useDispatch, useSelector } from 'react-redux'
@@ -9,6 +9,7 @@ import { B4_APIgetDictList } from '@/store/action/B4video'
 import { RootState } from '@/store'
 import ZupOne from '@/components/ZupOne'
 import MyPopconfirm from '@/components/MyPopconfirm'
+import TextArea from 'antd/es/input/TextArea'
 
 type Props = {
   info: B1ListType
@@ -128,7 +129,7 @@ function B4add({ info, closeFu, addTableFu, upTableFu }: Props) {
             name='name'
             rules={[{ required: true, message: '请输入标题' }]}
           >
-            <Input maxLength={20} showCount placeholder='请输入内容' />
+            <TextArea maxLength={300} showCount placeholder='请输入内容' />
           </Form.Item>
 
           <Form.Item label='板块' name='type' rules={[{ required: true, message: '请选择板块' }]}>

+ 2 - 2
src/pages/B4video/index.tsx

@@ -8,7 +8,7 @@ import { MessageFu } from '@/utils/message'
 import { Button, Select } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import MyTable from '@/components/MyTable'
-import { B1tableC } from '@/utils/tableData'
+import { B4tableC } from '@/utils/tableData'
 import B4dict from './B4dict'
 import { B4_APIgetDictList } from '@/store/action/B4video'
 import B4add from './B4add'
@@ -116,7 +116,7 @@ function B4video() {
           widthSet={{ content: 800 }}
           yHeight={617}
           list={tableInfo.list}
-          columnsTemp={B1tableC.filter((v, i) => i !== 0)}
+          columnsTemp={B4tableC}
           frontBtn={frontBtn}
           lastBtn={tableLastBtn}
           pageNum={fromData.pageNum}

+ 6 - 0
src/utils/tableData.ts

@@ -42,6 +42,12 @@ export const B2tableC = [
   ['txt', '排序值', 'sort']
 ]
 
+export const B4tableC = [
+  ['text', '标题', 'name', 50],
+  ['img', '图片', 'thumb'],
+  ['txt', '排序值', 'sort']
+]
+
 export const Z1tableC = [
   ['txt', '用户名', 'userName'],
   ['txtChange', '角色', 'isAdmin', { 1: '管理员', 0: '普通成员' }],