当前位置: 首页 > news >正文

湘潭做网站 搜搜磐石网络wordpress如何换图片

湘潭做网站 搜搜磐石网络,wordpress如何换图片,做外贸用什么浏览国外网站,网站开发吧需求说明 现有的设置单元列表,每个带有虚线加号的可以看做是一组设置单元,点击加号可以添加一组设置单元.点击设置单元右上角可以删除对应的设置单元. 实现思路说明 利用数组元素添加或是删除的方式实现页面数量动态变化.由于每个设置单元内容都相同所以单独封装了一个子组件.…

需求说明

    现有的设置单元列表,每个带有虚线加号的可以看做是一组设置单元,点击加号可以添加一组设置单元.点击设置单元右上角可以删除对应的设置单元.在这里插入图片描述

实现思路说明

    利用数组元素添加或是删除的方式实现页面数量动态变化.由于每个设置单元内容都相同所以单独封装了一个子组件.下面是实现过程:
父页面

<template><view class="out"><view class="content"><view class="setting"><setFriend class="addUnit" v-for="unitIndex in unitList" :unitList="unitList"></setFriend><view class="addUnitClass" @click="addUnit"><image class="add_unit_img" src="../../static/add_unit.png"></image></view></view></view></view>
</template><script>export default {data() {return {// 自定义数组,元素可以随便写unitList:[1,2,3]}},methods: {addUnit(){// 添加添加按钮,数组添加一个元素,元素内容可以任意this.unitList.push(1)}}}
</script><style lang="scss">uni-page-body,page {height:100%;background-color: rgb(242, 242,242);}.out{display: flex;justify-content: center;align-items: center;width: 90%;margin: auto;.content{width: 100%;// height: 400px;display: flex;justify-content: center;align-items: center;flex-direction: column;.setting{width: 100%;display: flex;justify-content: flex-start;align-items: center;flex-direction: row;flex-wrap:wrap;.addUnit{width: 50%;height: 150px;margin-bottom: 15px;}.addUnitClass{position: relative;top: 10px;margin-left: 7px;width: 45%;height: 150px;margin-bottom: 15px;background-color: white;display: flex;justify-content: center;align-items: center;border-radius: 5px;.add_unit_img{width: 80%;height: 80%;}}}}}		</style>

设置单元子组件

<template><view><view class="unit"><image class="close_img" src="../../static/close_button.png" @click="closeUnit"></image><view class="uni_item"><image class="upload_img" src="../../static/upload_img.png"></image></view></view></view>
</template><script>export default {name:"setFriend",data() {return {};},// 设置属性unitListprops:{unitList: {type: Array,default: [1,2],required: false}},methods:{closeUnit(){// 点击关闭按钮,数组减一处理if(this.unitList.length != 0){this.unitList.splice(0, 1);}}}}
</script><style lang="scss">uni-page-body,page {height:100%;background-color: rgb(242, 242,242);}.unit{width: 90%;height: 150px;background-color: white;margin-top: 9px;margin-left: 5px;border-radius: 5px;position: relative;left: 1px;.close_img{width: 20px;height: 20px;position: absolute;left:140px;top:-8px;}.uni_item{width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;flex-direction: column;.upload_img{width:65px;height: 65px;margin-bottom: 10px;}}}}</style>
http://www.yayakq.cn/news/660420/

相关文章:

  • 如何对网站做优化云南省建设考试中心网站
  • 海南省建设考试网站首页个人网页空间
  • 嘉兴网站建设需要多少钱wordpress 菜单 调用
  • 企业展厅建筑外观北京做seo的公司
  • 购买网站平台如何做分录可以做围棋习题的网站
  • 2017网站制作报价单seo网站课程
  • 云南九泰建设工程有限公司官方网站调用wordpress数据库id
  • 做文明人网站专题江门 网站设计
  • 投资网站模板太原建站模板网站
  • 淘宝联盟 wordpress网站推广seo优化
  • 上海建个人网站比较好的公司网站服务器位置查询
  • 大气的网站模板公司网站建设价格贵吗
  • 设置自己的网站wordpress4.8中文版
  • 99设计网站精美的php个人网站源码
  • 如何攻克网站深圳网站开发外包
  • 网站建设可行性的分析xampp 做网站
  • 域名需要购买吗静态网站优化
  • 张店区网站建设特点有哪些 谢谢如何用手机制作网页链接
  • 衡水网站建设最新报价网站建设业务员主动话术
  • 网站建设的基本流程是怎样的wordpress语法高亮
  • 扬州建设安装网站网站百度不到验证码怎么办啊
  • 实力网站建设电话电子商务和网站建设区别
  • 品牌高端网站设计长春网站推广方式
  • 爬知乎文章做网站消息网站怎么做
  • 学校网站建设的意义与途径青岛网站建设¥青岛博采网络
  • 做网站代管理三年金山郑州阳网站建设
  • 台州网站建设互联网平台营销
  • 网站建设 租赁汽车服务网站建设方案
  • 京东网站建设步骤不关闭网站 备案
  • 怎么让公司网站随便就搜的到jsp做网站好不好