Merge branch 'polyfill/vision' of gitlab.alibaba-inc.com:ali-lowcode/ali-lowcode-engine into polyfill/vision

This commit is contained in:
zmq248570 2020-05-05 17:26:28 +08:00
commit 41769d08c2
6 changed files with 19 additions and 29 deletions

View File

@ -358,7 +358,7 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
@computed hasCondition() {
const v = this.getExtraProp('condition', false)?.getValue();
return v != null && v !== '';
return v != null && v !== '' && v !== true;
}
@computed hasLoop() {

View File

@ -46,7 +46,7 @@ export default function(metadata: TransformedComponentMetadata): TransformedComp
const supportedLifecycles =
events.supportedLifecycles ||
(isRoot
? [
? /*[
{
description: '初始化时',
name: 'constructor',
@ -63,7 +63,7 @@ export default function(metadata: TransformedComponentMetadata): TransformedComp
description: '卸载时',
name: 'componentWillUnmount',
},
]
]*/ null
: null);
if (supportedLifecycles) {
eventsDefinition.push({
@ -81,6 +81,7 @@ export default function(metadata: TransformedComponentMetadata): TransformedComp
}
// 通用设置
const propsGroup = props || [];
/*
propsGroup.push({
name: '#generals',
title: { type: 'i18n', 'zh-CN': '通用', 'en-US': 'General' },
@ -101,14 +102,14 @@ export default function(metadata: TransformedComponentMetadata): TransformedComp
title: 'Ref',
setter: 'StringSetter',
},
/*
{
name: '!more',
title: '更多',
setter: 'PropertiesSetter',
},*/
},
],
});
*/
const combined: FieldConfig[] = [
{
title: { type: 'i18n', 'zh-CN': '属性', 'en-US': 'Props' },

View File

@ -39,7 +39,7 @@ export default class WidgetContainer<T extends WidgetItem = any, G extends Widge
if (nameOrItem && typeof nameOrItem === 'string') {
item = this.get(nameOrItem);
}
if (!isActiveable(nameOrItem)) {
if (!isActiveable(item)) {
item = null;
}
@ -63,7 +63,7 @@ export default class WidgetContainer<T extends WidgetItem = any, G extends Widge
if (nameOrItem && typeof nameOrItem === 'string') {
item = this.get(nameOrItem);
}
if (!isActiveable(nameOrItem)) {
if (!isActiveable(item)) {
item = null;
}
if (this._current === item) {

View File

@ -2,17 +2,14 @@ import { isJSBlock, isJSSlot } from '@ali/lowcode-types';
import { isPlainObject } from '@ali/lowcode-utils';
import { globalContext, Editor } from '@ali/lowcode-editor-core';
import { Designer, TransformStage, addBuiltinComponentAction } from '@ali/lowcode-designer';
import { registerSetters } from '@ali/lowcode-setters';
// import Outline from '@ali/lowcode-plugin-outline-pane';
// import { registerSetters } from '@ali/lowcode-setters';
import Outline from '@ali/lowcode-plugin-outline-pane';
import DesignerPlugin from '@ali/lowcode-plugin-designer';
import { Skeleton, SettingsPrimaryPane } from '@ali/lowcode-editor-skeleton';
import Preview from '@ali/lowcode-plugin-sample-preview';
// import SourceEditor from '@ali/lowcode-plugin-source-editor';
import { i18nReducer } from './i18n-reducer';
import { InstanceNodeSelector } from './components';
import { Divider } from '@alifd/next';
export const editor = new Editor();
globalContext.register(editor, Editor);
@ -81,24 +78,14 @@ skeleton.add({
type: 'Panel',
content: SettingsPrimaryPane,
});
// skeleton.add({
// area: 'leftArea',
// name: 'outlinePane',
// type: 'PanelDock',
// content: Outline,
// panelProps: {
// area: 'leftFixedArea',
// },
// });
skeleton.add({
area: 'topArea',
type: 'Dock',
name: 'preview',
props: {
align: 'right',
area: 'leftArea',
name: 'outlinePane',
type: 'PanelDock',
content: Outline,
panelProps: {
area: 'leftFixedArea',
},
content: Preview,
});
// skeleton.add({

View File

@ -98,6 +98,7 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin
newConfig.content = contents.map(({ title, content, tip }) => {
return {
type: "Panel",
name: title,
content,
props: {
title,

View File

@ -92,7 +92,8 @@ html.engine-blur #engine {
.next-checkbox-group,.next-date-picker,.next-input,.next-month-picker,
.next-number-picker,.next-radio-group,.next-range,.next-range-picker,
.next-rating,.next-select,.next-switch,.next-time-picker,.next-upload,
.next-year-picker {
.next-year-picker,
.next-breadcrumb-item,.next-calendar-header,.next-calendar-table {
pointer-events: auto !important;
}
}