随笔分类 -  weex

摘要:weex样式中设置单行文本溢出,如下:(没有效果) .text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } 需要再添加一个属性 lines:即 .text { width:200px; lines:1; ov 阅读全文
posted @ 2021-02-03 16:13 sunshineG 阅读(313) 评论(0) 推荐(0)
摘要:需求 : 图片完整展示,不变形(数据返回的图片的大小不确定) 尝试了使用image组件的resize="contain" 属性不生效(不知道什么原因) 思想:当图片加载成功后,获取到图片的宽度和高度,得到宽高比,页面展示固定高度,宽度根据比例缩放,保证图片不变形 数据返回的图片是base64格式的字 阅读全文
posted @ 2020-12-26 20:54 sunshineG 阅读(383) 评论(0) 推荐(0)
摘要:需求:需要填写的哪些信息,根据后端返回数据而定,即v-for循环产生的输入框个数不定,v-model绑定的字段名也不定 场景: <script> // 后端返回的数据结构: // res.data=[ // {"marketType":"businessNo","marketName":"业务编号" 阅读全文
posted @ 2020-12-23 16:28 sunshineG 阅读(203) 评论(0) 推荐(0)
摘要:html: <input class="input" ref="inputText" v-model="keyword" placeholder="信用卡" type="text" return-key-type="search" @return="queryKeyword" /> js: meth 阅读全文
posted @ 2020-12-20 19:39 sunshineG 阅读(615) 评论(0) 推荐(0)