Options
All
  • Public
  • Public/Protected
  • All
Menu
description

This class handles layout templates and the creation thereof. Typically, a layout instance is created with a set of Template parts that are assembled from an indexed list of templates.

Each template part can be passed either as a predefined template or as an arrow function that returns a string typed template. Those are called template generators. Please make sure to always use Vue's syntax when you use this feature because this class does not handle validation of the underlying templates.

The currently supported layout as of this version of the software are the following:

  • {@link Component}: Uses a single component page, e.g. a log-in widget.
  • {@link Flex}: Uses flexible components, i.e. position of card depends on size of previous cards.
  • {@link Grid}: Uses a components grid, i.e. uses a 12-columns grid of cards.

example

Using the Layout class

  // create a new layout
const layout = new Layout([{
body: "<template>...</template>"
}]);

// or using a generator
const layout = new Layout([{ generator: () => {
// doing some magic tricks here
// and here also

// then return as string
return "<template></template>";
}}])



Properties

param templates

The template parts that are assembled to build the layout.

since

v0.1.0

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Properties

templates: Template[]

The template parts that are assembled to build the layout. Template parts are concatenated in a sequential process where the indexes define the order of assembly.

var

{Template[]}

Methods

  • render(): string

Generated using TypeDoc