Browse Source

Update PageManager TS

pull/5214/head
Artur Arseniev 3 years ago
parent
commit
7f8567b294
  1. 7
      src/pages/index.ts

7
src/pages/index.ts

@ -49,7 +49,7 @@ import { createId } from '../utils/mixins';
import { ModuleModel } from '../abstract'; import { ModuleModel } from '../abstract';
import { ItemManagerModule, ModuleConfig } from '../abstract/Module'; import { ItemManagerModule, ModuleConfig } from '../abstract/Module';
import Pages from './model/Pages'; import Pages from './model/Pages';
import Page from './model/Page'; import Page, { PageProperties } from './model/Page';
import EditorModel from '../editor/model/Editor'; import EditorModel from '../editor/model/Editor';
import ComponentWrapper from '../dom_components/model/ComponentWrapper'; import ComponentWrapper from '../dom_components/model/ComponentWrapper';
import { AddOptions, RemoveOptions, SetOptions } from '../common'; import { AddOptions, RemoveOptions, SetOptions } from '../common';
@ -171,10 +171,7 @@ export default class PageManager extends ItemManagerModule<PageManagerConfig, Pa
* component: '<div class="my-class">My element</div>', // or a JSON of components * component: '<div class="my-class">My element</div>', // or a JSON of components
* }); * });
*/ */
add( add(props: PageProperties, opts: AddOptions & SelectOption & AbortOption = {}) {
props: any, //{ id?: string; styles: string; component: string },
opts: AddOptions & SelectOption & AbortOption = {}
) {
const { em } = this; const { em } = this;
props.id = props.id || this._createId(); props.id = props.id || this._createId();
const add = () => { const add = () => {

Loading…
Cancel
Save