码云基础操作

1、在需要上传的本地项目中执行:git init  // 初始化仓库
2、输入  git remote add origin 码云仓库地址    例如:git remote add origin https://gitee.com/你的码云用户名/你创建的仓库名.git ,比我的x项目仓库地址:https://gitee.com/sunny_ayb/newProject.git

3、继续输入 git pull origin master 命令,将码云上的仓库pull到本地文件夹

4、将需要上传的文件项目放到此目录下
5、输入  git add . (. 表示所有的)或者  git add + 文件名 (此命令可以将文件保存到缓存区) 注意:不要忘记 敲空格
6、输入   git commit -m "此处填写上传文件描述"   ,此命令主要是为了添加文件描述
7、输入 git push origin master   ,将本地代码push到码云仓库
至此就将本地项目文件上传到git仓库

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
好的,以下是一个实现你要求的基本示例代码: ```html <template> <div> <el-card v-for="(item, index) in items" :key="index" class="card" :style="{ marginLeft: index % 5 !== 0 ? '20px' : '0' }"> <img :src="item.imgUrl" class="card-img"> <div class="card-body"> <div class="card-title">{{ item.title }}</div> <div class="card-text">{{ item.content }}</div> </div> <div class="card-footer"> <el-button type="primary" size="small" @click="handleClick(item)">操作</el-button> </div> </el-card> <div class="pagination"> <el-pagination :page-size="pageSize" :total="total" layout="prev, pager, next" @current-change="handlePageChange" /> </div> </div> </template> <script> export default { data() { return { items: [ { imgUrl: 'https://picsum.photos/id/11/200/300', title: 'Card 1', content: 'Content for card 1', }, { imgUrl: 'https://picsum.photos/id/12/200/300', title: 'Card 2', content: 'Content for card 2', }, // ... 以下省略 ], currentPage: 1, pageSize: 10, total: 20, }; }, methods: { handleClick(item) { console.log('Clicked:', item); }, handlePageChange(page) { console.log('Current page:', page); this.currentPage = page; }, }, }; </script> <style scoped> .card { width: calc(20% - 20px); margin-bottom: 20px; display: inline-block; vertical-align: top; } .card-img { width: 100%; height: 200px; object-fit: cover; } .card-title { font-size: 18px; font-weight: bold; margin-bottom: 10px; } .card-text { font-size: 14px; color: #333; margin-bottom: 10px; } .card-footer { text-align: right; } .pagination { margin-top: 20px; text-align: center; } </style> ``` 这个示例中,我们使用 `v-for` 循环生成 `el-card` 组件,使用了 `calc()` 函数来计算卡片的宽度,以实现自动适应屏幕。为了让每行显示五个卡片,我们使用了 `display: inline-block` 和 `vertical-align: top` 属性来将卡片水平排列,并且使用了 `:style` 绑定来动态设置卡片的 `marginLeft` 样式,以在需要换行时设置正确的值。在底部,我们使用了 `el-pagination` 组件生成分页控件,并在 `@current-change` 事件中处理页码变化的逻辑。 注意,这个示例中的数据是死数据,如果你要从后端获取数据,你需要在适当的时机调用后端接口来获取数据,并将数据渲染到页面上。这个示例中的分页控件也只是简单的展示,如果你需要使用更复杂的分页功能,你需要根据具体的需求进行定制。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

再见梅丽

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值