mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 22:58:15 +00:00
use registerSetter from lowcode-editor-core
This commit is contained in:
parent
56ae5ad5f5
commit
7a77c55167
@ -40,7 +40,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"componentName": "Div",
|
"componentName": "Card",
|
||||||
|
"npm": {
|
||||||
|
"package": "@alifd/next",
|
||||||
|
"version": "1.19.18",
|
||||||
|
"destructuring": true,
|
||||||
|
"exportName": "Card"
|
||||||
|
},
|
||||||
"title": "容器",
|
"title": "容器",
|
||||||
"configure": {
|
"configure": {
|
||||||
"component": {
|
"component": {
|
||||||
@ -197,6 +203,10 @@
|
|||||||
"exportName": "Input"
|
"exportName": "Input"
|
||||||
},
|
},
|
||||||
"props": [{
|
"props": [{
|
||||||
|
"name": "value",
|
||||||
|
"propType": "string",
|
||||||
|
"description": ""
|
||||||
|
},{
|
||||||
"name": "label",
|
"name": "label",
|
||||||
"propType": "node",
|
"propType": "node",
|
||||||
"description": "label"
|
"description": "label"
|
||||||
@ -1503,7 +1513,7 @@
|
|||||||
"children": [{
|
"children": [{
|
||||||
"componentName": "Button",
|
"componentName": "Button",
|
||||||
"title": "按钮",
|
"title": "按钮",
|
||||||
"icon": "",
|
"icon": "add",
|
||||||
"package": "@alife/next",
|
"package": "@alife/next",
|
||||||
"library": "Next",
|
"library": "Next",
|
||||||
"snippets": [{
|
"snippets": [{
|
||||||
@ -1532,7 +1542,8 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"componentName": "Button",
|
"componentName": "Button",
|
||||||
"props": {
|
"props": {
|
||||||
"type": "normal"
|
"type": "normal",
|
||||||
|
"value": "normal"
|
||||||
},
|
},
|
||||||
"children": "normal"
|
"children": "normal"
|
||||||
}
|
}
|
||||||
@ -1588,7 +1599,7 @@
|
|||||||
"title": "其他",
|
"title": "其他",
|
||||||
"icon": "",
|
"icon": "",
|
||||||
"children": [{
|
"children": [{
|
||||||
"componentName": "Div",
|
"componentName": "Card",
|
||||||
"library": "Next",
|
"library": "Next",
|
||||||
"title": "容器",
|
"title": "容器",
|
||||||
"icon": "",
|
"icon": "",
|
||||||
@ -1596,7 +1607,7 @@
|
|||||||
"title": "默认",
|
"title": "默认",
|
||||||
"screenshot": "",
|
"screenshot": "",
|
||||||
"schema": {
|
"schema": {
|
||||||
"componentName": "Div",
|
"componentName": "Card",
|
||||||
"props": {}
|
"props": {}
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { render } from 'react-dom';
|
import { render } from 'react-dom';
|
||||||
import GeneralWorkbench from '@ali/lowcode-editor-preset-general';
|
import GeneralWorkbench, { editor } from '../../../editor-preset-general/src';
|
||||||
import config from './config';
|
import config from './config';
|
||||||
import components from './components';
|
import components from './components';
|
||||||
import './global.scss';
|
import './global.scss';
|
||||||
|
|||||||
@ -48,7 +48,7 @@ export class Transducer {
|
|||||||
if (typeof setter === 'string') {
|
if (typeof setter === 'string') {
|
||||||
setter = getSetter(setter)?.component;
|
setter = getSetter(setter)?.component;
|
||||||
if (!setter) {
|
if (!setter) {
|
||||||
debugger;
|
// debugger;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,10 @@ export default function GeneralWorkbench(props: any) {
|
|||||||
...props,
|
...props,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
window.__ctx = {
|
||||||
|
editor,
|
||||||
|
appHelper: editor,
|
||||||
|
};
|
||||||
export function init(container?: Element) {
|
export function init(container?: Element) {
|
||||||
if (!container) {
|
if (!container) {
|
||||||
container = document.createElement('div');
|
container = document.createElement('div');
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { registerSetter } from '@ali/lowcode-globals';
|
import { registerSetter } from '@ali/lowcode-editor-core';
|
||||||
import { DatePicker, Input, Radio, Select, Switch, NumberPicker } from '@alifd/next';
|
import { DatePicker, Input, Radio, Select, Switch, NumberPicker } from '@alifd/next';
|
||||||
import ExpressionSetter from './expression-setter';
|
import ExpressionSetter from './expression-setter';
|
||||||
import ColorSetter from './color-setter';
|
import ColorSetter from './color-setter';
|
||||||
|
|||||||
@ -58,7 +58,7 @@ export default class SourceEditor extends Component<{
|
|||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const { editor } = this.props;
|
const { editor } = this.props;
|
||||||
editor.on('leftPanel.show', (key: String) => {
|
editor.on('leftPanel.show', (key: String) => {
|
||||||
debugger;
|
// debugger;
|
||||||
if (key === 'sourceEditor' && !this.monocoEditor) {
|
if (key === 'sourceEditor' && !this.monocoEditor) {
|
||||||
this.setState({
|
this.setState({
|
||||||
isShow: true,
|
isShow: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user