0.0.2 • Published 7 years ago

egg-view-vue-es7 v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

egg-view-vue

NPM version build status Test coverage David deps Known Vulnerabilities npm download

egg view plugin for vue.

Install

$ npm i egg-view-vue-es7 -S

Usage

// {app_root}/config/plugin.js
exports.vue = {
  enable: true,
  package: 'egg-view-vue-es7',
};
// {app_root}/config/config.default.js
exports.vue = {
  // cache: {
  //  max: 1000,
  //  maxAge: 1000 * 3600 * 24 * 7,
  //},
};

Render in controller

// {app_root}/app/controller/test.js
exports.home = async ctx => {
  await ctx.render('home/home.js', { name: 'vue view' });
};

Configuration

see config/config.default.js for more detail.

Questions & Suggestions

Please open an issue here.

License

MIT