mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2024-11-21 03:15:49 +08:00
feat(editor): improve UI
This commit is contained in:
parent
7d06ca61e1
commit
5fededd409
@ -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);
|
||||
|
@ -184,7 +184,6 @@ export const Editor: React.FC<Props> = observer(
|
||||
zIndex="2"
|
||||
>
|
||||
<Tabs
|
||||
align="center"
|
||||
height="100%"
|
||||
display="flex"
|
||||
flexDirection="column"
|
||||
|
Loading…
Reference in New Issue
Block a user