Cell 组件一


<style lang="scss">.cell {padding-top: 15px;padding-bottom: 15px;color: #333;img {display: block;margin-right: 15px;}}
</style><template><Group><cell class="cell" title="钱包" :border-intent="false" :is-link="false"><img slot="icon" width="26" :src="require('@/assets/images/imgs/dog1.png')"></cell><cell class="cell" title="表情" :link="{path:'./index'}" :border-intent="false"><img slot="icon" width="26" :src="require('@/assets/images/imgs/dog1.png')"></cell><cell class="cell" title="设置" :link="{path:'./index'}" :border-intent="false"><img slot="icon" width="26" :src="require('@/assets/images/imgs/dog1.png')"></cell></Group>
</template><script>
import { Group, Cell } from "vux";
export default {name: "index",components: {  Group, Cell },
};
</script>
复制代码

Cell 组件二

<style lang="scss">.cell {padding-top: 15px;padding-bottom: 15px;.cell-img {display: block;margin-right: 15px;}.name,,desc{text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden; }.name {color: #000;margin-bottom: 4px;}.desc {color: #aaa;font-size: 12px;}}
</style><template><Group><cell class="cell" v-for="(item,index) in cellList" :key="index" :link="{path:'./index'}" value-align="left"><img class="cell-img" slot="icon" width="40" :src="item.icon"><p class="name">{{item.name}}</p><p class="desc">{{item.desc}}</p></cell></Group>
</template><script>
import { Group, Cell } from "vux";
export default {name: "index",components: {  Group, Cell },data() {return {cellList: [{name: "朋友圈",desc: "点击进入朋友圈",icon: require("../../assets/images/imgs/dog1.png"),},{name: "扫一扫",desc: "点击进入扫一扫",icon: require("../../assets/images/imgs/dog2.png")},{name: "摇一摇",desc: "点击进入摇一摇",icon: require("../../assets/images/imgs/dog3.png"),},{name: "看一看",desc: "点击进入看一看",icon: require("../../assets/images/imgs/dog4.png")}],}}
};
</script>
复制代码

Cell 组件三 模仿微信

<style lang="scss">.cell {padding-top: 10px;padding-bottom: 10px;position: relative;&:active {background-color: #ddd;}.cell-img {display: block;margin-right: 15px;}.badge {width: 10px;height: 10px;border-radius: 50%;background-color: red;position: absolute;top: 6px;left: 59px;z-index: 1;}.name,,desc{text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden; }.name {font-size: 17px;color: #000;margin-bottom: 5px;padding-right: 50px;}.desc {color: #aaa;font-size: 13px;padding-right: 45px;}.time {position: absolute;top: 13px;right: 10px;z-index: 1;font-size: 12px;clear: #aaa;}.state {width: 18px;height: 18px;position: absolute;bottom: 12px;right: 10px;z-index: 1;}}
</style><template><Group><cell class="cell" v-for="(item,index) in cellList" :key="index" value-align="left" :border-intent="false" @click.native="goDetail"><em class="badge" v-show="item.showBadge"></em><img class="cell-img" slot="icon" width="50" :src='item.img'><p class="name">{{item.name}}</p><p class="desc">{{item.desc}}</p><span class="time">{{item.time}}</span><img class="state" v-show="item.showShield" :src="require('@/assets/images/imgs/state.png')" alt=""></cell>    </Group>
</template><script>
import { Group, Cell } from "vux";
export default {name: "index",components: {  Group, Cell },data() {return {cellList: [{name: "我要你在我身旁,我要你为我梳妆,夜的风儿吹",desc: "我要你在我身旁,我要你为我梳妆,夜的风儿吹,吹得心痒痒",img: require("../../assets/images/imgs/dog1.png"),time: "下午5:34",showBadge: false,showShield: false},{name: "爸爸",desc: "[1条]吃饭了吗?",img: require("../../assets/images/imgs/dog2.png"),time: "上午10::18",showBadge: true,showShield: true},{name: "妈妈",desc: "[2条]睡觉了吗?",img: require("../../assets/images/imgs/dog3.png"),time: "昨天",showBadge: true,showShield: false},{name: "室友",desc: "[6条]点名了吗?",img: require("../../assets/images/imgs/dog4.png"),time: "7月10日",showBadge: true,showShield: true}]};},methods: {goDetail() {this.$router.push({ path: "/detial" });}}
};
</script>
复制代码

四. 自己写

<style lang="scss">
.test {margin: 10px 0;.ul {background-color: #fff;.li {display: -webkit-flex;display: flex;&:active {background-color: #f2f2f2;}&:nth-last-of-type(1){.right{&:after{height: 0;border-bottom: 0px solid #f2f2f2;color: #f2f2f2;}}}.left {width: 80px;position: relative;img {width: 20px;height: 20px;position: absolute;top: 50%;left: 50%;z-index: 1;transform: translate(-50%, -50%);}}.right {flex: 1;position: relative;&:after{content: " ";position: absolute;left: 0;bottom: 0;right: 0;width: 100%;height: 1px;border-bottom: 1px solid #dddddd;color: #dddddd;transform-origin: 0 100%;transform: scaleY(0.5);}.name {color: #999;font-size: 12px;margin: 12px 0;}.desc {color: #000;font-size: 15px;margin: 12px 0;a {color: #000;}}}}}
}
</style><template><div class="test"><ul class="ul"><li class="li" v-for="(item,index) in addressList" :key="index"><div class="left"><img :src="item.icon"></div><div class="right"><p class="name">{{item.name}}</p><p class="desc"><a :href="'tel:'+item.content">{{item.content}}</a></p></div></li>          </ul> </div>
</template><script>
export default {name: "test",props: {addressList: {type: Array,default: () => [{ name: "我的电话", icon: "http://gplove.top/dog1.png", content: "158695263654" },{ name: "父亲电话", icon: "http://gplove.top/dog2.png", content: "135991777177" },{ name: "母亲电话", icon: "http://gplove.top/dog3.png", content: "186959955888" }]}},data() {return {}},
};
</script>复制代码

vux Cell组件相关推荐

  1. vux组件的cell组件上下箭头图标显示问题,cell必须放在groud内才会显示

    vux组件的cell组件上下箭头图标显示问题,cell必须放在groud内才会显示 <template><div><x-header :left-options=&quo ...

  2. vant在cell中加表格_在vant 中使用cell组件 定义图标该图片和位置操作

    @本来想直接使用icon组件,使用阿里的图标库,可是怎么弄也不行,折腾一下午,最后决定使用最笨的办法,直接上代码 vant 中使用cell组件 定义图标该图片和位置像微信信息栏一样 二级经营单位 // ...

  3. cell组件适配BCG风格--适配器模式和查表法

    分析 目标:最小的改动现有代码,使得cell组件适配BCG颜色样式 启发点: 一款软件中有100个对话框,是怎么做到每个对话框都用同一个图标的?每个对话框添加一个icon资源? cell组件设置颜色的 ...

  4. 如何在 Cell 组件/插件中添加下拉树形控件

    引言 用友华表Cell控件在提供强大的报表功能的同时,在关键细节也是十分突出,为开发者进一步缩短开发周期和最终用 户的完美需求提供了有效有利的平台.下面的例子提供了VB语言对实现美观实用的下拉树形控件 ...

  5. 用友Cell组件使用总结

    前段时间,因为偶然的机会使了一下用友的Cell控件(Winform下),只用了些皮毛的东西,先总结一下,以防就饭吃了. 1.写编辑器 a) 支持Undo的功能,用开启Cell的一个属性才可用.(说是开 ...

  6. 使用Vux WechatEmotion组件引发的一系列血案

    最近公司在做手机端项目,我也有荣幸使用了Vue做SPA项目,然后找相关WeUI相关的框架,然后发现了Vux,感觉Vux非常优秀(不包括作者把我禁言一事,反正我也跑到她主页骂了她不过她还不知道),于是开 ...

  7. Aspose.Cell组件,实现图表的插入(每一行都有注释+效果图)

    我这里插入的图表是: <含有资料标记的折线图> 创建一个图表 workbook.Worksheets[0].Charts.Add(ChartType.图表类型,行,列,高,宽) Chart ...

  8. vue 使用lib-flexable,px2rem 进行移动端适配 但是引入的第三方UI组件 vux 的样式缩小,解决方案...

    最近在写移动端项目,就想用lib-flexable,px2rem来进行适配,把px转换成rem但是也用到了第三方UI组件库vux,把这个引入发现一个问题就是vux的组件都缩小了,在网上找不到答案,最后 ...

  9. vue2.0 + vux (六)NewsList 资讯页 及 NewsDetail 资讯详情页

    设置代理,避免出现跨域问题 /*设置代理,避免出现跨域问题*/ proxyTable: {'/api':{target: 'https://www.oschina.net/action/apiv2/' ...

最新文章

  1. Boost::filesystem的使用笔记
  2. session共享mysql_多服务器session共享之mysql共享
  3. asp.net core web api之异常
  4. [css] 鼠标事件css的:hover和js的mouseover有什么区别?
  5. 销售流程图_工作流程图网络图模板,招聘销售合同库存,完整设计拿来就用
  6. MATLAB使用教程(4)——悄悄滴上手项目
  7. $(this).attr(checked, true); 设置不了
  8. (19)System Verilog模块设计示例
  9. 解决PRINT函数UTF-8问题
  10. Atitit.面向接口的web 原理与设计重写 路由启动绑定配置url router rewriting urlpage  mvc mvp的 java c#.net php js
  11. 番茄花园GHOST XP SP3 V1.61 Final纪念版 http://www.ghost2.cn
  12. 黑苹果驱动_兼容黑苹果macOS Catalina系统的USB无线网卡型号及驱动下载地址
  13. QQ音乐sign解密以及排行榜完整歌曲数据
  14. java数据透视表_Java 创建 Excel 数据透视表
  15. matlab程序及C语言实现一维多元离散信源熵
  16. 修改mysql的authen_MySQL连接抛出Authentication Failed错误的分析与解决思路
  17. Web-Security-Learning
  18. 蘑菇街iOS客户端应用源码
  19. python--Venn图及upsetplot进阶
  20. C语言——关键字,define定义宏,指针,结构体

热门文章

  1. django 中使用 channels 实现websocket
  2. package.json---入门说明
  3. CF Round410 D. Mike and distribution
  4. 制作新网络框架快速自动生成消息结构体的编辑器
  5. STM32F4_USART配置及细节描述
  6. [小北De编程手记] : Lesson 02 - Selenium For C# 之 核心对象
  7. 几个用于序列化的代码片段
  8. GMF学习系列(二) 一些知识点(续2)
  9. String类中IndexOf与SubString
  10. 判断一个字符串是否为回文的递归算法