master
Joe 1 year ago
parent f822083f5f
commit 34f08fadcf

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

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

Loading…
Cancel
Save