mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
joint trunk-pane
This commit is contained in:
parent
f15c0ad0ff
commit
a21490a379
@ -488,6 +488,9 @@ export class Node {
|
||||
insertBefore(node: Node, ref?: Node) {
|
||||
this.children?.insert(node, ref ? ref.index : null);
|
||||
}
|
||||
insertAfter(node: Node, ref?: Node) {
|
||||
this.children?.insert(node, ref ? (ref.index + 1) : null);
|
||||
}
|
||||
getParent() {
|
||||
return this.parent;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { I18nData } from './i18n';
|
||||
import { ReactNode, ReactElement } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export interface TipConfig {
|
||||
className?: string;
|
||||
@ -8,4 +8,4 @@ export interface TipConfig {
|
||||
direction?: 'top' | 'bottom' | 'left' | 'right';
|
||||
}
|
||||
|
||||
export type TipContent = string | I18nData | ReactElement | TipConfig;
|
||||
export type TipContent = string | I18nData | ReactNode | TipConfig;
|
||||
|
||||
@ -58,7 +58,7 @@ const builtinSetters = {
|
||||
DateRangeSetter,
|
||||
EventsSetter,
|
||||
// StyleSetter,
|
||||
ColorSetter,
|
||||
// ColorSetter,
|
||||
JsonSetter,
|
||||
};
|
||||
|
||||
|
||||
@ -10,10 +10,27 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
|
||||
shouldComponentUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private dispose?: () => void;
|
||||
componentDidMount() {
|
||||
const { area } = this.props;
|
||||
const triggerClose = () => area.setVisible(false);
|
||||
area.skeleton.editor.on('designer.dragstart', triggerClose);
|
||||
this.dispose = () => {
|
||||
area.skeleton.editor.removeListener('designer.dragstart', triggerClose);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.dispose?.();
|
||||
}
|
||||
|
||||
render() {
|
||||
const { area } = this.props;
|
||||
// TODO: add focusingManager
|
||||
// TODO: dragstart close
|
||||
// focusin set focus (push|replace)
|
||||
// focusout remove focus
|
||||
// onEsc
|
||||
return (
|
||||
<div
|
||||
className={classNames('lc-left-float-pane', {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ReactElement, ComponentType } from 'react';
|
||||
import { TitleContent, IconType, I18nData } from '@ali/lowcode-globals';
|
||||
import { TitleContent, IconType, I18nData, TipContent } from '@ali/lowcode-globals';
|
||||
|
||||
export interface IWidgetBaseConfig {
|
||||
type: string;
|
||||
@ -30,7 +30,7 @@ export interface DockProps {
|
||||
icon?: IconType;
|
||||
size?: 'small' | 'medium' | 'large';
|
||||
className?: string;
|
||||
description?: string | I18nData;
|
||||
description?: TipContent;
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user