master
Joe 1 year ago
parent f822083f5f
commit 34f08fadcf

@ -155,6 +155,7 @@ const UserList: React.FC<{}> = () => {
const [data, handleDataChange] = useState<TableListItem[]>([]); const [data, handleDataChange] = useState<TableListItem[]>([]);
const [loading, handleLoadChange] = useState<boolean>(false); const [loading, handleLoadChange] = useState<boolean>(false);
const [page, handlePageChange] = useState<PaginationProps>({ const [page, handlePageChange] = useState<PaginationProps>({
showQuickJumper: true,
total: 0, total: 0,
pageSize: 10, pageSize: 10,
current: 1, current: 1,
@ -181,9 +182,14 @@ const UserList: React.FC<{}> = () => {
handleLoadChange(false); handleLoadChange(false);
handleDataChange(res.data); handleDataChange(res.data);
handlePageChange({ handlePageChange({
showQuickJumper: true,
total: res.total, total: res.total,
pageSize: pagination.pageSize, pageSize: pagination.pageSize,
current: pagination.current, current: pagination.current,
pageSizeOptions: ['10'],
showTotal: (total: number) => {
return `${total}`;
},
}); });
}; };
@ -209,6 +215,11 @@ const UserList: React.FC<{}> = () => {
}; };
const columns: ColumnsType<TableListItem> = [ const columns: ColumnsType<TableListItem> = [
{
title: 'ID',
dataIndex: 'id',
key: 'id',
},
{ {
title: '名称', title: '名称',
dataIndex: 'title', dataIndex: 'title',

@ -144,8 +144,8 @@ const updateForm: React.FC<BasicLayoutProps> = (prop: any) => {
videoArr.push({ videoArr.push({
uid: item.uid, uid: item.uid,
name: item.name, name: item.name,
status: item.response && item.response.location ? 'done' : item.response && item.response.code == 2001 ? 'error' : 'uploading', status: item.response && item.response.location || item.status === 'done' ? 'done' : item.response && item.response.code == 2001 ? 'error' : 'uploading',
url: item.response ? item.response.location : item.response, url: item.url ? item.url : item.response ? item.response.location : item.response,
}); });
}); });
setVideoContent(JSON.stringify(videoArr)); setVideoContent(JSON.stringify(videoArr));
@ -294,7 +294,7 @@ const updateForm: React.FC<BasicLayoutProps> = (prop: any) => {
valuePropName="fileList" valuePropName="fileList"
getValueFromEvent={normFile} getValueFromEvent={normFile}
> >
<Upload name="file" action="http://localhost:8899/oss/fileUpload"> <Upload name="file" action="http://47.92.229.12:8888/oss/fileUpload">
<Button icon={<UploadOutlined />}></Button> <Button icon={<UploadOutlined />}></Button>
</Upload> </Upload>
</Form.Item> </Form.Item>
@ -310,7 +310,7 @@ const updateForm: React.FC<BasicLayoutProps> = (prop: any) => {
branding: false, // 去掉右下角的水印 branding: false, // 去掉右下角的水印
// language_url: '/tinymce/langs/zh-Hans.js',//注意大小写 // language_url: '/tinymce/langs/zh-Hans.js',//注意大小写
language: 'zh-Hans', //注意大小写 language: 'zh-Hans', //注意大小写
images_upload_url: 'http://localhost:8899/oss/imgUpload', images_upload_url: 'http://47.92.229.12:8888/oss/imgUpload',
plugins: [ plugins: [
'advlist', 'advlist',
'autolink', 'autolink',

Loading…
Cancel
Save