0.5.13 • Published 3 years ago

@goldpage/vue v0.5.13

Weekly downloads
16
License
-
Repository
github
Last release
3 years ago

Goldpage + Vue = :heart:

@goldpage/vue

Use Goldpage with Vue.

Usage

Install @goldpage/vue.

$ npm install @goldpage/vue

The plugin is automatically loaded and the view property of your page configs is now rendered with Vue.

Example

// ./example/pages/hello.page.js

import Hello from './Hello.vue';

export default {
  route: '/hello/:name',
  addInitialProps,
  view: Hello,
  title,
  renderToHtml: true,
};

async function addInitialProps({name}) {
  // We simulate a network request delay
  await sleep(0.5);

  const nameReversed = name.split('').reverse().join('');
  return {nameReversed};
}

function title({name}) {
  return 'Hi '+name;
}

function sleep(seconds) {
  let resolve;
  const promise = new Promise(r => resolve=r);
  setTimeout(resolve, seconds*1000);
  return promise;
}
0.5.12

3 years ago

0.5.13

3 years ago

0.5.11

4 years ago

0.5.10

4 years ago

0.5.9

4 years ago

0.5.8

4 years ago

0.5.7

4 years ago

0.5.6

4 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago