• This project
    • Loading...
  • Sign in

Зуев Егор / wiki.dev

Logo belkanton
Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • wiki.dev
  • resources
  • assets
  • js
  • vues
  • vues.js
  • Dan Brown's avatar
    Added chapter search · dcde5997 ...
    dcde5997 Browse Files
    Migrated book search to vue-based system.
    Updated old tag seached.
    Made chapter page layout widths same as book page.
    Closes #344
    Dan Brown authored 2017-04-15 19:16:07 +0100
vues.js 383 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
const Vue = require("vue");

function exists(id) {
    return document.getElementById(id) !== null;
}

let vueMapping = {
    'search-system': require('./search'),
    'entity-dashboard': require('./entity-search'),
};

Object.keys(vueMapping).forEach(id => {
    if (exists(id)) {
        let config = vueMapping[id];
        config.el = '#' + id;
        new Vue(config);
    }
});