Browse Source

调整列宽

main
dark 3 months ago
parent
commit
e7ba7d7dd1
  1. 35
      src/pages/cms/collect/index.tsx
  2. 25
      src/pages/cms/video/index.tsx
  3. 24
      src/pages/cms/video_cloud/index.tsx
  4. 24
      src/pages/cms/video_magnet/index.tsx
  5. 5
      src/pages/videos/list/index.tsx

35
src/pages/cms/collect/index.tsx

@ -40,9 +40,11 @@ const Collect = () => {
{ {
'title': t(`${i18nPrefix}.columns.name`, '站点名称'), 'title': t(`${i18nPrefix}.columns.name`, '站点名称'),
'dataIndex': 'name', 'dataIndex': 'name',
onHeaderCell: () => ({
fixed: 'left',
width: 200, width: 200,
}),
fieldProps: {
style: { width: '100%' }
},
ellipsis: true, ellipsis: true,
formItemProps: { formItemProps: {
width: undefined, width: undefined,
@ -55,17 +57,19 @@ const Collect = () => {
'title': t(`${i18nPrefix}.columns.weights`, '权重'), 'title': t(`${i18nPrefix}.columns.weights`, '权重'),
'dataIndex': 'weights', 'dataIndex': 'weights',
valueType: 'digit', valueType: 'digit',
onHeaderCell: () => ({
width: 80,
}),
width: 100,
fieldProps: {
style: { width: '100%' }
},
}, },
{ {
'title': t(`${i18nPrefix}.columns.site_auth`, '搜片认证站点'), 'title': t(`${i18nPrefix}.columns.site_auth`, '搜片认证站点'),
'dataIndex': 'site_auth', 'dataIndex': 'site_auth',
valueType: 'switch', valueType: 'switch',
onHeaderCell: () => ({
width: 100, width: 100,
}),
fieldProps: {
style: { width: '100%' }
},
render: (_dom, record) => { render: (_dom, record) => {
return <Switch value={record.site_auth} size={'small'}/> return <Switch value={record.site_auth} size={'small'}/>
} }
@ -74,9 +78,10 @@ const Collect = () => {
'title': t(`${i18nPrefix}.columns.site_cooperation`, '搜片合作优质站点'), 'title': t(`${i18nPrefix}.columns.site_cooperation`, '搜片合作优质站点'),
'dataIndex': 'site_cooperation', 'dataIndex': 'site_cooperation',
valueType: 'switch', valueType: 'switch',
onHeaderCell: () => ({
width: 130, width: 130,
}),
fieldProps: {
style: { width: '100%' }
},
colProps: { colProps: {
span: 8 span: 8
}, },
@ -88,9 +93,10 @@ const Collect = () => {
{ {
'title': t(`${i18nPrefix}.columns.icon_cdn`, '站点图标'), 'title': t(`${i18nPrefix}.columns.icon_cdn`, '站点图标'),
'dataIndex': 'icon_cdn', 'dataIndex': 'icon_cdn',
onHeaderCell: () => ({
width: 80, width: 80,
}),
fieldProps: {
style: { width: '100%' }
},
render: (_text, record) => { render: (_text, record) => {
return <img src={record.icon_cdn} style={{ width: 20, height: 20 }}/> return <img src={record.icon_cdn} style={{ width: 20, height: 20 }}/>
}, },
@ -98,9 +104,10 @@ const Collect = () => {
{ {
'title': t(`${i18nPrefix}.columns.url`, '站点URL'), 'title': t(`${i18nPrefix}.columns.url`, '站点URL'),
'dataIndex': 'url', 'dataIndex': 'url',
onHeaderCell: () => ({
width: 150,
}),
width: 200,
fieldProps: {
style: { width: '100%' }
},
ellipsis: true, ellipsis: true,
copyable: true, copyable: true,
}, },

25
src/pages/cms/video/index.tsx

@ -55,15 +55,17 @@ const Video = () => {
hideInSearch: true, hideInSearch: true,
hideInSetting: true, hideInSetting: true,
formItemProps: { hidden: true }, formItemProps: { hidden: true },
}, },
{ {
'title': t(`${i18nPrefix}.columns.title`, 'Title'), 'title': t(`${i18nPrefix}.columns.title`, 'Title'),
'dataIndex': 'title', 'dataIndex': 'title',
onHeaderCell: () => {
return {
width: 200,
}
fixed: 'left',
ellipsis: true,
width: 250,
fieldProps: {
style: { width: '100%' }
}, },
colProps: { colProps: {
span: 12 span: 12
@ -78,10 +80,10 @@ const Video = () => {
{ {
'title': t(`${i18nPrefix}.columns.title_sub`, 'TitleSub'), 'title': t(`${i18nPrefix}.columns.title_sub`, 'TitleSub'),
'dataIndex': 'title_sub', 'dataIndex': 'title_sub',
onHeaderCell: () => {
return {
width: 200,
}
ellipsis: true,
width: 250,
fieldProps: {
style: { width: '100%' }
}, },
colProps: { colProps: {
span: 12 span: 12
@ -104,10 +106,9 @@ const Video = () => {
'dataIndex': 'source_url', 'dataIndex': 'source_url',
ellipsis: true, ellipsis: true,
copyable: true, copyable: true,
onHeaderCell: () => {
return {
width: 200, width: 200,
}
fieldProps: {
style: { width: '100%' }
}, },
hideInSearch: true, hideInSearch: true,
}, },
@ -676,7 +677,7 @@ const Video = () => {
] ]
}} }}
scroll={{ scroll={{
x: 3500, y: 'calc(100vh - 290px)'
x: 3800, y: 'calc(100vh - 290px)'
}} }}
onRow={(record) => { onRow={(record) => {
return { return {

24
src/pages/cms/video_cloud/index.tsx

@ -65,10 +65,11 @@ const VideoCloud = () => {
{ {
'title': t(`${i18nPrefix}.columns.title`, 'Title'), 'title': t(`${i18nPrefix}.columns.title`, 'Title'),
'dataIndex': 'title', 'dataIndex': 'title',
onHeaderCell: () => {
return {
width: 200,
}
fixed: 'left',
ellipsis: true,
width: 250,
fieldProps: {
style: { width: '100%' }
}, },
colProps: { colProps: {
span: 12 span: 12
@ -83,10 +84,10 @@ const VideoCloud = () => {
{ {
'title': t(`${i18nPrefix}.columns.title_sub`, 'TitleSub'), 'title': t(`${i18nPrefix}.columns.title_sub`, 'TitleSub'),
'dataIndex': 'title_sub', 'dataIndex': 'title_sub',
onHeaderCell: () => {
return {
width: 200,
}
ellipsis: true,
width: 250,
fieldProps: {
style: { width: '100%' }
}, },
colProps: { colProps: {
span: 12 span: 12
@ -109,10 +110,9 @@ const VideoCloud = () => {
'dataIndex': 'source_url', 'dataIndex': 'source_url',
ellipsis: true, ellipsis: true,
copyable: true, copyable: true,
onHeaderCell: () => {
return {
width: 200, width: 200,
}
fieldProps: {
style: { width: '100%' }
}, },
hideInSearch: true, hideInSearch: true,
}, },
@ -682,7 +682,7 @@ const VideoCloud = () => {
}} }}
scroll={{ scroll={{
x: 3500, y: 'calc(100vh - 290px)'
x: 3800, y: 'calc(100vh - 290px)'
}} }}
onRow={(record) => { onRow={(record) => {
return { return {

24
src/pages/cms/video_magnet/index.tsx

@ -65,10 +65,11 @@ const VideoMagnet = () => {
{ {
'title': t(`${i18nPrefix}.columns.title`, 'Title'), 'title': t(`${i18nPrefix}.columns.title`, 'Title'),
'dataIndex': 'title', 'dataIndex': 'title',
onHeaderCell: () => {
return {
width: 200,
}
fixed: 'left',
ellipsis: true,
width: 250,
fieldProps: {
style: { width: '100%' }
}, },
colProps: { colProps: {
span: 12 span: 12
@ -83,10 +84,10 @@ const VideoMagnet = () => {
{ {
'title': t(`${i18nPrefix}.columns.title_sub`, 'TitleSub'), 'title': t(`${i18nPrefix}.columns.title_sub`, 'TitleSub'),
'dataIndex': 'title_sub', 'dataIndex': 'title_sub',
onHeaderCell: () => {
return {
width: 200,
}
ellipsis: true,
width: 250,
fieldProps: {
style: { width: '100%' }
}, },
colProps: { colProps: {
span: 12 span: 12
@ -109,10 +110,9 @@ const VideoMagnet = () => {
'dataIndex': 'source_url', 'dataIndex': 'source_url',
ellipsis: true, ellipsis: true,
copyable: true, copyable: true,
onHeaderCell: () => {
return {
width: 200, width: 200,
}
fieldProps: {
style: { width: '100%' }
}, },
hideInSearch: true, hideInSearch: true,
}, },
@ -681,7 +681,7 @@ const VideoMagnet = () => {
] ]
}} }}
scroll={{ scroll={{
x: 3500, y: 'calc(100vh - 290px)'
x: 3800, y: 'calc(100vh - 290px)'
}} }}
onRow={(record) => { onRow={(record) => {
return { return {

5
src/pages/videos/list/index.tsx

@ -63,6 +63,8 @@ const Video = () => {
{ {
'title': t(`${i18nPrefix}.columns.title`, 'Title'), 'title': t(`${i18nPrefix}.columns.title`, 'Title'),
'dataIndex': 'title', 'dataIndex': 'title',
fixed: 'left',
ellipsis: true,
width: 200, width: 200,
fieldProps: { fieldProps: {
style: { width: '100%' } style: { width: '100%' }
@ -80,6 +82,7 @@ const Video = () => {
{ {
'title': t(`${i18nPrefix}.columns.title_sub`, 'TitleSub'), 'title': t(`${i18nPrefix}.columns.title_sub`, 'TitleSub'),
'dataIndex': 'title_sub', 'dataIndex': 'title_sub',
ellipsis: true,
width: 200, width: 200,
fieldProps: { fieldProps: {
style: { width: '100%' } style: { width: '100%' }
@ -367,7 +370,7 @@ const Video = () => {
const url = `/api/v1/videos/image/${record.video_id}` const url = `/api/v1/videos/image/${record.video_id}`
return <Image src={`${url}?width=60&height=80`} alt="cover" preview={{ return <Image src={`${url}?width=60&height=80`} alt="cover" preview={{
src: url, src: url,
}} style={{ width: 80 }}/>
}} style={{ height: 40 }}/>
}, },
}, },
{ {

Loading…
Cancel
Save