分类:js

js

vue 移除 console.log

vue 移除 console.log
npm install uglifyjs-webpack-plugin --save-dev const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); config.plugins.push( ...

4年前 (2021-11-03) 喜欢

js生成随机数字

js生成随机数字
function GetRandomNum(Min,Max) { var Range = Max - Min; var Rand = Math.random(); return(Min + Math.round(Rand * Range)); } var num = GetRan...

4年前 (2021-11-03) 喜欢

js生成随机字符串

js生成随机字符串
export function randomString(e) { e = e || 32; var t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678", a = t.length, n =...

4年前 (2021-11-03) 喜欢

js将分钟转为小时分钟

js将分钟转为小时分钟
将分钟数转为小时分钟 export function toHourMinute (t) { if (t < 0) { return '' } t > 1440 && (t -= 1440) var e = t % 60 e...

4年前 (2021-10-30) 喜欢

js遍历对象

js遍历对象
var obj = {'0':'a','1':'b','2':'c'}; Object.keys(obj).forEach(function(key){ console.lo...

4年前 (2021-10-28) 喜欢