前端開(kāi)發(fā)小技巧(Vue火的、JS君仆、CSS):http://www.reibang.com/p/f2a934d48a64
css居中:http://www.reibang.com/p/f851ba16f394
es6解構(gòu):https://blog.csdn.net/weixin_34204722/article/details/87961811
https://www.cnblogs.com/chengxs/p/9286745.html
vue中on和BUS:http://www.reibang.com/p/422546ffac30
Vue之mixin和mixins:http://www.reibang.com/p/47e25a505037
Vue修改框架的css樣式:https://blog.csdn.net/xiazeqiang2018/article/details/81190275
Vue.js - 判斷當(dāng)前是開(kāi)發(fā)環(huán)境舅柜、還是生產(chǎn)環(huán)境
if (process.env.NODE_ENV === "development") {
alert("開(kāi)發(fā)環(huán)境");
}else {
alert("生產(chǎn)環(huán)境");
}
生成不同的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 個(gè)前端小知識(shí)
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)'));