移动端页面一些坑
clteam / h5skills Goto Github PK
View Code? Open in Web Editor NEW移动端页面一些坑
License: MIT License
移动端页面一些坑
License: MIT License
这个还没找到好的解决方法,先 mark
可能最好的解决方法就是不用 fixed 😏
在页面{{xxxx.toLocalString()}}
的时候Vue显示如下警告:
Error in render function: "TypeError: Cannot read property 'toLocaleString' of undefined"
后改为过滤器方式{{xxxx | convertNum}}
filters: {
convertNum (val) {
return val.toLocalString()
}
}
依然报错。
filters: {
convertNum (val) {
if (val) return val.toLocalString()
}
}
加一个 if 判断即可
如下代码,Sass
// 截断文字,后面显示...
@mixin textEllipsis($showLine:2) {
display: -webkit-box !important;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
/* autoprefixer: off */
-webkit-box-orient: vertical; // 参考 https://github.com/postcss/autoprefixer/issues/776
/* autoprefixer: on */
-webkit-line-clamp:$showLine;
}
问题
-webkit-box-orient: vertical
属性不被Webpack处理,被忽略
解决方案
/* autoprefixer: off /
-webkit-box-orient: vertical; // 参考 postcss/autoprefixer#776
/ autoprefixer: on */
input 的placeholder会出现文本位置偏上的情况:
PC端设置line-height等于height能够对齐,而移动端仍然是偏上,解决是设置line-height:normal;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.