1 Star 0 Fork 0

animalcoder/Vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Son1.vue 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
animalcoder 提交于 2020-03-17 14:52 +08:00 . Vueinit
<template>
<div>
<h2>son1</h2>
<el-row :gutter="24">
<el-col :span="12">
<el-card shadow="hover">鼠标悬浮时显示</el-card>
</el-col>
<el-col :span="12">
<el-card shadow="hover">鼠标悬浮时显示</el-card>
</el-col>
</el-row>
<el-row :gutter="24">
<ul>
<li v-for="(item,idx) in pageLists" :key="idx" style="color:black;"> <!-- for 绑定 lists + 绑定下标 -->
<!-- {{item.title1}}-{{item.content1}} -->
<el-col :span="12" >
<el-card shadow="hover" >
<span>{{item.title1}}</span>
<el-divider></el-divider>
<span>{{item.content1}}</span>
</el-card>
</el-col>
</li>
</ul>
</el-row>
</div>
</template>
<style scoped>
body {
color: black;
}
ul{
list-style: none;
margin:0;padding:0;
}
li{
display:inline
}
.el-col{
margin-bottom: 20px;
}
</style>
<script>
import store from '@/store' //取出存储器里面的lists
export default {
name:'List',
store,
computed:{ //动态监听变化
pageLists(){
return store.state.lists
}
},
}
</script>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/animalcoder/Vue.git
git@gitee.com:animalcoder/Vue.git
animalcoder
Vue
Vue
master

搜索帮助