vue中使用v-for:起到循环的作用
如果一个盒子框架相同,内容不同,可以用到v-for
在组件中添加v-for="(member,index) in members" :key="index"
data
做表格内容相同时,可以在data中,return一个member数组
data() {
return {
members: [
{
id:1,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:2,
name: '周勇',
account: '18500000000',
operation: '总经理',
},
{
id:3,
name: '张野',
account: '18500000000',
operation:'',
},
{
id:4,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:5,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:6,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:7,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:8,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:9,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
]
}
},
只需要做一行表格,剩下的依次重复就可以
{{ member.name }}
{{ member.account }}
编辑
删除
如果一个盒子框架相同,内容不同,可以用到v-for
在组件中添加v-for="(member,index) in members" :key="index"
data
做表格内容相同时,可以在data中,return一个member数组
data() {
return {
members: [
{
id:1,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:2,
name: '周勇',
account: '18500000000',
operation: '总经理',
},
{
id:3,
name: '张野',
account: '18500000000',
operation:'',
},
{
id:4,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:5,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:6,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:7,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:8,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
{
id:9,
name: '冯骏',
account: '18500000000',
operation: '项目经理',
},
]
}
},
只需要做一行表格,剩下的依次重复就可以
{{ member.name }}
{{ member.account }}
编辑
删除
英国曼彻斯特大学最新资讯:
以下课程现已关闭2021入学申请:
PGCE - Secondary (Mathematics)
MSc Management and Information Systems: Change and Development
MA Digital Technologies, Communication and Education
以下课程即将关闭2021入学申请,有兴趣的小伙伴请尽快递交申请哈~
BAECon Accounting and Finance
BAEcon Development Studies
BA Development Studies and Social Statistics
BAEcon Economics
BSc Economics
BAEcon Economics and Finance
BAEcon Economics and Philosophy
BAEcon Economics and Politics
BA Economics and Social Statistics
BA Economics and Sociology
BAEcon Finance
BSocSc Politics and International Relations
LLB Law
LLB Law with International Study
BA Law & Politics
BA Law & Criminology
BA Criminology with International Study
另外各位同学请注意,曼彻斯特大学于4月1日(星期四)至4月7日(星期三)是复活节假期。
#英国留学# #曼彻斯特大学# #育见顶流#
以下课程现已关闭2021入学申请:
PGCE - Secondary (Mathematics)
MSc Management and Information Systems: Change and Development
MA Digital Technologies, Communication and Education
以下课程即将关闭2021入学申请,有兴趣的小伙伴请尽快递交申请哈~
BAECon Accounting and Finance
BAEcon Development Studies
BA Development Studies and Social Statistics
BAEcon Economics
BSc Economics
BAEcon Economics and Finance
BAEcon Economics and Philosophy
BAEcon Economics and Politics
BA Economics and Social Statistics
BA Economics and Sociology
BAEcon Finance
BSocSc Politics and International Relations
LLB Law
LLB Law with International Study
BA Law & Politics
BA Law & Criminology
BA Criminology with International Study
另外各位同学请注意,曼彻斯特大学于4月1日(星期四)至4月7日(星期三)是复活节假期。
#英国留学# #曼彻斯特大学# #育见顶流#
#微博领学官计划# #留学申请季# #留学百问# 约克大学下列授课型硕士课程将于4月5日停止接受国际学生的申请。
Management (MSc)
International Business and Strategic Management (MSc)
International Business (MSc)
International Strategic Management (MSc)
Human Resource Management (MSc)
Accounting and Financial Management (MSc)
Management with Business Finance (MSc)
Global Marketing (MSc)
Social Media and Management (MSc)
Management (MSc)
International Business and Strategic Management (MSc)
International Business (MSc)
International Strategic Management (MSc)
Human Resource Management (MSc)
Accounting and Financial Management (MSc)
Management with Business Finance (MSc)
Global Marketing (MSc)
Social Media and Management (MSc)
✋热门推荐