How to use the apostrophe/vue function in apostrophe

To help you get started, we’ve selected a few apostrophe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apostrophecms / apostrophe / lib / modules / apostrophe-areas / src / apos / apps / ApostropheAreas.js View on Github external
const options = JSON.parse(el.getAttribute('data-options'));
    const data = JSON.parse(el.getAttribute('data'));
    const choices = JSON.parse(el.getAttribute('data-choices'));
    el.removeAttribute('data-apos-area-newly-editable');

    const component = window.apos.areas.components.editor;

    const docId = data._docId;
    const dotPath = data._dotPath;
    const parts = dotPath.split('.');
    const areaName = parts[parts.length - 1];
    const parentId = data._parentId;
    extantDocIds[docId] = true;

    return new Vue({
      el: el,
      data: {
        options: options,
        items: data.items,
        choices: choices,
        docId: docId,
        parentId: parentId,
        areaName: areaName
      },
      mounted() {
        updateParentIdMap(this, data.items, options);
      },
      methods: {
        changed(items) {
          updateParentIdMap(this, items);
          save();

apostrophe

The Apostrophe Content Management System.

MIT
Latest version published 4 days ago

Package Health Score

90 / 100
Full package analysis