关于我们({{ msg }})
9 | 10 |This is foo!
' 34 | }) 35 | 36 | var Bar = Vue.extend({ 37 | template: 'This is bar!
' 38 | }) 39 | 40 | // 路由器需要一个根组件。 41 | // 出于演示的目的,这里使用一个空的组件,直接使用 HTML 作为应用的模板 42 | var Apptest = Vue.extend({}) 43 | 44 | // 创建一个路由器实例 45 | // 创建实例时可以传入配置参数进行定制,为保持简单,这里使用默认配置 46 | var router = new VueRouter() 47 | 48 | // 定义路由规则 49 | // 每条路由规则应该映射到一个组件。这里的“组件”可以是一个使用 Vue.extend 50 | // 创建的组件构造函数,也可以是一个组件选项对象。 51 | // 稍后我们会讲解嵌套路由 52 | router.map({ 53 | '/index': { 54 | component: Index 55 | } 56 | }) 57 | 58 | // 现在我们可以启动应用了! 59 | // 路由器会创建一个 App 实例,并且挂载到选择符 #app 匹配的元素上。 60 | router.start(Apptest, '#test') 61 | 62 | Vue.config.devtools = true 63 | -------------------------------------------------------------------------------- /src/components/vue-touch.vue: -------------------------------------------------------------------------------- 1 | 2 |touch事件名称:{{event}}
17 |This is foo!
' 40 | }) 41 | 42 | var Bar = Vue.extend({ 43 | template: 'This is bar!
' 44 | }) 45 | 46 | // 路由器需要一个根组件。 47 | // 出于演示的目的,这里使用一个空的组件,直接使用 HTML 作为应用的模板 48 | var Apptest = Vue.extend({}) 49 | 50 | // 创建一个路由器实例 51 | // 创建实例时可以传入配置参数进行定制,为保持简单,这里使用默认配置 52 | var router = new VueRouter() 53 | 54 | // 定义路由规则 55 | // 每条路由规则应该映射到一个组件。这里的“组件”可以是一个使用 Vue.extend 56 | // 创建的组件构造函数,也可以是一个组件选项对象。 57 | // 稍后我们会讲解嵌套路由 58 | router.map({ 59 | '/index': { 60 | component: Index 61 | }, 62 | '/blogmanage': { 63 | component: blogManage 64 | }, 65 | '/blog': { 66 | component: blog 67 | }, 68 | '/works': { 69 | component: works 70 | }, 71 | '/form': { 72 | component: formValidate 73 | }, 74 | '/touch': { 75 | component: vueTouch 76 | }, 77 | '/editor': { 78 | component: vueEditor 79 | } 80 | }) 81 | 82 | // 现在我们可以启动应用了! 83 | // 路由器会创建一个 App 实例,并且挂载到选择符 #app 匹配的元素上。 84 | router.start(Apptest, '#test') 85 | 86 | Vue.config.devtools = true 87 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "coder-yin", 3 | "version": "1.0.0", 4 | "description": "personal website", 5 | "author": "yinxiaofei2015.12-2016.03
45 |{{item.name}}
49 || # | 14 |文章名 | 15 |时间 | 16 |内容 | 17 |操作 | 18 |
|---|---|---|---|---|
| {{ $index+1 }} | 23 |{{item.title}} | 24 |{{item.date}} | 25 |{{item.content}} | 26 |27 | |