Commit a9097cad by zhaochengxiang

资产草稿详情提供对外接口

parent e519385d
...@@ -8,7 +8,7 @@ import { $hostParams, ContextPath, generateUUID } from './util'; ...@@ -8,7 +8,7 @@ import { $hostParams, ContextPath, generateUUID } from './util';
import loadable from "./util/loadable"; import loadable from "./util/loadable";
import localStorage from 'local-storage'; import localStorage from 'local-storage';
import { AssetBrowseReference, AssetMountReference } from './util/constant'; import { AssetBrowseReference, AssetDraftReference, AssetMountReference } from './util/constant';
export const AppContext = React.createContext(); export const AppContext = React.createContext();
export const appId = generateUUID(); export const appId = generateUUID();
...@@ -105,6 +105,24 @@ export class App extends React.Component { ...@@ -105,6 +105,24 @@ export class App extends React.Component {
); );
} }
if (message === 'showAssetDetailDraft') {
return (
<AppContext.Provider value={{
env: hostParams?.env,
user: hostParams?.user,
setGlobalState,
onGlobalStateChange
}}>
<AssetAction reference={AssetDraftReference} id={id} permissionId={hostParams?.permissionId} action='detail' terms={terms} readonly={true} />
{/* <AssetDetail
reference='full-search'
id={id}
terms={terms}
/> */}
</AppContext.Provider>
);
}
if (message === 'showAssetTree') { if (message === 'showAssetTree') {
return ( return (
<AssetTree <AssetTree
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment