|
|
|
@@ -16,6 +16,7 @@ import { |
|
|
|
} from '@/services/developmentEnvironment'; |
|
|
|
import themes from '@/styles/theme.less'; |
|
|
|
import { to } from '@/utils/promise'; |
|
|
|
import { editorUrl, setSessionStorageItem } from '@/utils/sessionStorage'; |
|
|
|
import { modalConfirm } from '@/utils/ui'; |
|
|
|
import { useNavigate } from '@umijs/max'; |
|
|
|
import { |
|
|
|
@@ -128,6 +129,16 @@ function EditorList() { |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
// 跳转编辑器页面 |
|
|
|
const gotoEditorPage = (e: React.MouseEvent, record: EditorData) => { |
|
|
|
e.stopPropagation(); |
|
|
|
setSessionStorageItem(editorUrl, record.url); |
|
|
|
navigate(`/developmentEnvironment/editor`); |
|
|
|
setCacheState({ |
|
|
|
pagination, |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
// 分页切换 |
|
|
|
const handleTableChange: TableProps['onChange'] = (pagination, filters, sorter, { action }) => { |
|
|
|
if (action === 'paginate') { |
|
|
|
@@ -143,9 +154,7 @@ function EditorList() { |
|
|
|
width: '30%', |
|
|
|
render: (text, record) => |
|
|
|
record.url ? ( |
|
|
|
<a href={record.url} target="_blank" rel="noreferrer"> |
|
|
|
{text} |
|
|
|
</a> |
|
|
|
<a onClick={(e) => gotoEditorPage(e, record)}>{text}</a> |
|
|
|
) : ( |
|
|
|
<span>{text ?? '--'}</span> |
|
|
|
), |
|
|
|
|