会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shellon
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
下一页
2020年9月10日
react组件配置样式hover效果的实现
摘要: 需求 react 自定义一个组件,组件内部样式可以灵活配置 问题 一般样式都可以通过属性传入,比如:颜色,字号等,但是对于一些有hover效果的地方,属性传入后,按照平时css的使用方式不太容易实现 解决办法 用js的方法,在body里创建一个style标签,将hover样式写入 注意,每次创建完成
阅读全文
posted @ 2020-09-10 09:07 shellon
阅读(7334)
评论(0)
推荐(0)
2020年9月4日
多行文本超出显示省略号
摘要: css代码 .company { width: 245px; margin-bottom: 0; text-overflow: -o-ellipsis-lastline; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
阅读全文
posted @ 2020-09-04 09:06 shellon
阅读(393)
评论(0)
推荐(0)
2020年8月31日
React使用css module和className多类名设置
摘要: 引入样式文件 import styles from './footer.module.css'; 注意: 样式文件名必须要以.module.css结尾 单类名设置 <div className={styles.channelLink}>联系我们</div> 多类名设置 方法一 <div classN
阅读全文
posted @ 2020-08-31 10:47 shellon
阅读(2307)
评论(0)
推荐(0)
2020年8月25日
通用的银行卡号正则表达式
摘要: validateBankCard = /^([1-9]{1})(\d{14}|\d{18})$/;
阅读全文
posted @ 2020-08-25 08:24 shellon
阅读(22001)
评论(0)
推荐(0)
2020年8月24日
通用的身份证号正则表达式
摘要: validateID = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
阅读全文
posted @ 2020-08-24 15:14 shellon
阅读(3465)
评论(0)
推荐(0)
2020年8月19日
遍历显示自定义的widget
摘要: 需求 列表展示: 列表项都是同一格式,列表项数据从List里取 解决方案 使用map map源码 Iterable<T> map<T>(T f(E e)) => MappedIterable<E, T>(this, f); 调用map 返回的数据类型为Iterable 注意1: 需要将Iterabl
阅读全文
posted @ 2020-08-19 15:30 shellon
阅读(200)
评论(0)
推荐(0)
RenderFlex children have non-zero flex but incoming height constraints are unbounded.
摘要: 问题 Flexible 里用了 Column, 使得高度无法确定 解决方案 将Flexible替换为ConstrainedBox, 并设定maxHeight 代码 ConstrainedBox( constraints: BoxConstraints(maxHeight: 500,, child:
阅读全文
posted @ 2020-08-19 15:13 shellon
阅读(3923)
评论(0)
推荐(0)
2020年8月18日
Error: Not found: 'package:json_annotation/json_annotation.dart'
摘要: 问题原因 json_annotation版本不对 修改json_annotation版本号 当前可用版本号 json_annotation: ^2.2.0
阅读全文
posted @ 2020-08-18 16:59 shellon
阅读(386)
评论(0)
推荐(0)
Unhandled Exception: FormatException: Unexpected character
摘要: 错误原因 json格式不正确,检查:是否加了注释、最后一个是否加了逗号... 正确格式 { "name": "shellon", "age": 25 }
阅读全文
posted @ 2020-08-18 16:36 shellon
阅读(1501)
评论(0)
推荐(0)
2020年7月29日
flutter 学习笔记
摘要: 常用属性 container 填充padding,边距margins,边框borders,背景色color, decoration: 渐变gradient-Alignment(x,y),圆角borderRadius,阴影boxShadow,圆shape icon 颜色color text style
阅读全文
posted @ 2020-07-29 10:02 shellon
阅读(160)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
下一页
公告