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