前端开发小技巧(Vue、JS、CSS):https://www.jianshu.com/p/f2a934d48a64
css居中:https://www.jianshu.com/p/f851ba16f394
es6解构:https://blog.csdn.net/weixin_34204722/article/details/87961811
https://www.cnblogs.com/chengxs/p/9286745.html
vue中on和BUS:https://www.jianshu.com/p/422546ffac30
Vue之mixin和mixins:https://www.jianshu.com/p/47e25a505037
Vue修改框架的css样式:https://blog.csdn.net/xiazeqiang2018/article/details/81190275
Vue.js - 判断当前是开发环境、还是生产环境
if (process.env.NODE_ENV === "development") {
alert("开发环境");
}else {
alert("生产环境");
}


生成不同的key
export function getUuid() {
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
15 个前端小知识
https://mp.weixin.qq.com/s/IMQhGAS_TaCDDITgl4Ekew
var rgb = color.split(',');
var r = parseInt(rgb[0].split('(')[1]);
var g = parseInt(rgb[1]);
var b = parseInt(rgb[2].split(')')[0]);
var hex = "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
return hex;
}
console.log(colorRGBtoHex('rgba(0,0,0,0)'));

网友评论