Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!

Fullstack Vue PDF 下载


分享到:
时间:2024-07-06 11:55来源:http://www.java1234.com 作者:转载  侵权举报
Fullstack Vue
失效链接处理
Fullstack Vue PDF 下载

 
 
相关截图:
 


主要内容:
 
Making the view data-driven
Driving the template with data will allow us to dynamically render the view based upon the data
that we give it. Let’s familiarize ourselves with the applications data model.
The data model
Within our app directory, we’ve included a file called seed.jsseed.js contains sample data for a
list of submissions (it seeds our application with data). The seed.js file contains a JavaScript object
called Seed.submissionsSeed.submissions is an array of JavaScript objects where each represents
a sample submission object:
const submissions [
{
id: 1,
title'Yellow Pail',
description'On-demand sand castle construction expertise.',
url'#',
votes: 16,
avatar'../public/images/avatars/daniel.jpg',
submissionImage'../public/images/submissions/image-yellow.png',
},
// ...
]
Each submission has a unique id and a series of properties including titledescriptionvotes, etc.
Since we only have a single submission displayed in our view, we’ll first focus on getting the data
from a single submission object (i.e. submissions[0]) on to the template.
The Vue Instance
The Vue instance is the starting point of all Vue applications. A Vue instance accepts an options
object which can contain details of the instance such as its template, data, methods, etc. Root level
Vue instances allow us to reference the DOM with which the instance is to be mounted/attached to.
Let’s see an example of this by setting up the Vue instance for our application. We’ll write all our
Vue code for the rest of this chapter inside the main.js file. Let’s open main.js and create the Vue
instance using the Vue function:
 


 
 
 
------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐