mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-10 18:06:02 +00:00
feat: 新增settings pane切换事件
This commit is contained in:
parent
cfde6e49b9
commit
6279079cc8
@ -118,6 +118,7 @@ export class SettingsPrimaryPane extends Component<{ editor: Editor; config: any
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { settings } = this.main;
|
const { settings } = this.main;
|
||||||
|
const editor = globalContext.get(Editor);
|
||||||
if (!settings) {
|
if (!settings) {
|
||||||
// 未选中节点,提示选中 或者 显示根节点设置
|
// 未选中节点,提示选中 或者 显示根节点设置
|
||||||
return (
|
return (
|
||||||
@ -140,7 +141,7 @@ export class SettingsPrimaryPane extends Component<{ editor: Editor; config: any
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!settings.isSameComponent) {
|
if (!settings.isSameComponent) {
|
||||||
// todo: future support 获取设置项交集编辑
|
// TODO: future support 获取设置项交集编辑
|
||||||
return (
|
return (
|
||||||
<div className="lc-settings-main">
|
<div className="lc-settings-main">
|
||||||
<div className="lc-settings-notice">
|
<div className="lc-settings-notice">
|
||||||
@ -179,7 +180,19 @@ export class SettingsPrimaryPane extends Component<{ editor: Editor; config: any
|
|||||||
matched = true;
|
matched = true;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Tab.Item className="lc-settings-tab-item" title={<Title title={field.title} />} key={field.name}>
|
<Tab.Item
|
||||||
|
className="lc-settings-tab-item"
|
||||||
|
title={<Title title={field.title} />}
|
||||||
|
key={field.name}
|
||||||
|
onClick={
|
||||||
|
() => {
|
||||||
|
editor?.emit('skeleton.settingsPane.change', {
|
||||||
|
name: field.name,
|
||||||
|
title: field.title,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
<SkeletonContext.Consumer>
|
<SkeletonContext.Consumer>
|
||||||
{(skeleton) => {
|
{(skeleton) => {
|
||||||
if (skeleton) {
|
if (skeleton) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user