样式限制使用记录
1、align-items center可以用,end不行
justify-content: end;
/* ---- 改成下面的写法 ---- */
justify-content: flex-end;
2、align-self top不能用 华为有的手机不适配
size是24的有文字icon的行高至少给30
3、display:flex;gap:16rpx; ios gap失效
4、渐变字体样式需要给省略号给个颜色
<div class="text-nick-name text-hidden":text="我们都是好孩子">我们都是好孩子"</div>
.text-nick-name {
position: relative;
font-weight: 400;
font-size: 0.25rem;
color: #FF7B3A;
&::before {
content: attr(text);
position: absolute;
left: 0;
right: 0;
-webkit-text-stroke: initial;
color: transparent;
-webkit-text-stroke: initial;
background: linear-gradient(to bottom, #FFF728, #FF7B3A 80%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #FF7B3A;
}
}
5、用路径参数就可以避免查询参数会出现俩问号的情况
path: '/user/:id',
router.push({ path: `/user/123` });
router.push({ name: 'user', params: { id: '123' } });
const route = useRoute();console.log(route.params.id);

3万+

被折叠的 条评论
为什么被折叠?



