feat(editor): improve UI

This commit is contained in:
MrWindlike 2022-02-11 10:31:18 +08:00
parent 7d06ca61e1
commit 5fededd409
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import { ComponentSchema } from '@sunmao-ui/core';
import { Api } from './Api';
import { State } from './State';
import { EditorServices } from '../../types';
import { ToolMenuTabs } from '../../services/enum';
export enum DataSourceType {
API = 'Api',
@ -46,6 +47,7 @@ export const DataSource: React.FC<Props> = props => {
const onStateItemClick = (state: ComponentSchema) => {
editorStore.setActiveDataSource(state);
editorStore.setActiveDataSourceType(DataSourceType.STATE);
editorStore.setToolMenuTab(ToolMenuTabs.INSPECT);
};
const onApiItemRemove = (api: ComponentSchema) => {
editorStore.removeDataSource(api);

View File

@ -184,7 +184,6 @@ export const Editor: React.FC<Props> = observer(
zIndex="2"
>
<Tabs
align="center"
height="100%"
display="flex"
flexDirection="column"