mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
style(core,schema): 完善dsl定义
This commit is contained in:
parent
7a13cd851b
commit
238762dd0f
@ -19,7 +19,7 @@
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
import { DataSource } from '@tmagic/data-source';
|
||||
import type { AppCore, EventConfig, MComponent, MContainer, MPage, MPageFragment } from '@tmagic/schema';
|
||||
import type { AppCore, EventConfig, MComponent, MContainer, MNode, MPage, MPageFragment } from '@tmagic/schema';
|
||||
import { HookCodeType, HookType } from '@tmagic/schema';
|
||||
|
||||
import type App from './App';
|
||||
@ -27,14 +27,14 @@ import type Page from './Page';
|
||||
import Store from './Store';
|
||||
|
||||
interface NodeOptions {
|
||||
config: MComponent | MContainer;
|
||||
config: MNode;
|
||||
page?: Page;
|
||||
parent?: Node;
|
||||
app: App;
|
||||
}
|
||||
class Node extends EventEmitter {
|
||||
public data!: MComponent | MContainer | MPage | MPageFragment;
|
||||
public style?: {
|
||||
public data!: MNode;
|
||||
public style!: {
|
||||
[key: string]: any;
|
||||
};
|
||||
public events: EventConfig[] = [];
|
||||
|
@ -131,6 +131,10 @@ export interface MComponent {
|
||||
className?: string;
|
||||
/* 关联事件集合 */
|
||||
events?: EventConfig[];
|
||||
/** 是否隐藏 */
|
||||
visible?: boolean;
|
||||
/** 显示条件中配置的数据源条件的编译结果 */
|
||||
condResult?: boolean;
|
||||
/** 组件根Dom的style */
|
||||
style?: {
|
||||
[key: string]: any;
|
||||
@ -198,7 +202,7 @@ export interface PastePosition {
|
||||
top?: number;
|
||||
}
|
||||
|
||||
export type MNode = MComponent | MContainer | MPage | MApp;
|
||||
export type MNode = MComponent | MContainer | MPage | MApp | MPageFragment;
|
||||
|
||||
export enum HookType {
|
||||
/** 代码块钩子标识 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user