sav-vue-demo
Version:
sav vue demo
38 lines (34 loc) • 516 B
JavaScript
import {get} from 'sav-router'
import {gen, props} from 'sav-decorator'
let posts = [
{
id: 1,
title: 'post 1 title',
content: 'post 1 content'
},
{
id: 2,
title: 'post 2 title',
content: 'post 2 content'
}
]
export class Article {
posts () {
return {
title: '文章列表',
posts
}
}
post ({params}) {
return {
title: '文章预览',
post: posts[params.postId - 1]
}
}
}