mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-11 10:26:03 +00:00
fix device
This commit is contained in:
commit
2d7b37e4c5
@ -31,12 +31,13 @@
|
|||||||
|
|
||||||
&-device-iphone6 {
|
&-device-iphone6 {
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 368px;
|
width: 378px;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
background: url(https://img.alicdn.com/tps/TB12GetLpXXXXXhXFXXXXXXXXXX-756-1544.png) no-repeat top;
|
background: url(https://img.alicdn.com/tps/TB12GetLpXXXXXhXFXXXXXXXXXX-756-1544.png) no-repeat top;
|
||||||
background-size: 378px 772px;
|
background-size: 378px 772px;
|
||||||
top: 8px;
|
top: 8px;
|
||||||
.@{scope}-canvas-viewport {
|
.@{scope}-canvas-viewport {
|
||||||
|
width: auto;
|
||||||
top: 114px;
|
top: 114px;
|
||||||
left: 25px;
|
left: 25px;
|
||||||
right: 25px;
|
right: 25px;
|
||||||
|
|||||||
@ -78,7 +78,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
|||||||
readonly designer = this.document.designer;
|
readonly designer = this.document.designer;
|
||||||
|
|
||||||
@computed get device(): string | undefined {
|
@computed get device(): string | undefined {
|
||||||
return this.get('device') || 'default';
|
return this.get('device') || 'mobile';
|
||||||
}
|
}
|
||||||
|
|
||||||
@computed get deviceClassName(): string | undefined {
|
@computed get deviceClassName(): string | undefined {
|
||||||
|
|||||||
@ -108,7 +108,7 @@ export class LiveEditing {
|
|||||||
onSaveContent(setterPropElement!.innerText, prop);
|
onSaveContent(setterPropElement!.innerText, prop);
|
||||||
};
|
};
|
||||||
|
|
||||||
const keydown = (e: KeyboardEvent) {
|
const keydown = (e: KeyboardEvent) => {
|
||||||
console.info(e.code);
|
console.info(e.code);
|
||||||
// esc
|
// esc
|
||||||
// enter
|
// enter
|
||||||
|
|||||||
@ -162,7 +162,7 @@ export default class Engine extends PureComponent {
|
|||||||
debug('entry.render');
|
debug('entry.render');
|
||||||
const { componentName } = schema;
|
const { componentName } = schema;
|
||||||
const allComponents = { ...ENGINE_COMPS, ...components };
|
const allComponents = { ...ENGINE_COMPS, ...components };
|
||||||
let Comp = allComponents[componentName];
|
let Comp = allComponents[componentName] || ENGINE_COMPS[`${componentName}Engine`];
|
||||||
if (Comp && Comp.prototype) {
|
if (Comp && Comp.prototype) {
|
||||||
const proto = Comp.prototype;
|
const proto = Comp.prototype;
|
||||||
if (!(Comp.prototype instanceof BaseEngine)) {
|
if (!(Comp.prototype instanceof BaseEngine)) {
|
||||||
|
|||||||
@ -57,6 +57,9 @@ const pages = Object.assign(project, {
|
|||||||
},
|
},
|
||||||
onCurrentPageChange(fn: (page: DocumentModel) => void) {
|
onCurrentPageChange(fn: (page: DocumentModel) => void) {
|
||||||
return project.onCurrentDocumentChange(fn);
|
return project.onCurrentDocumentChange(fn);
|
||||||
|
},
|
||||||
|
toData() {
|
||||||
|
return project.documents.map(doc => doc.toData());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user