上一页 1 2 3 4 5 6 7 ··· 21 下一页
摘要: 在开发过程中,有时候需要js生成全局唯一标识符,在java中可以使用uuid,但是JS中没有现成的函数。 总结了一下,JS生成唯一标识符的几种方法。 第一种: function uuid() { var s = []; var hexDigits = "0123456789abcdef"; for 阅读全文
posted @ 2022-09-06 10:35 举个栗子走天下 阅读(1951) 评论(0) 推荐(0) 编辑
摘要: import * as fs from 'fs' import * as http from 'http' import * as iconv from 'iconv-lite' import path from 'path' import openapiTS from 'openapi-types 阅读全文
posted @ 2022-08-29 14:02 举个栗子走天下 阅读(40) 评论(0) 推荐(0) 编辑
摘要: app.js——小程序逻辑,通常执行一些初始化的工作,例如获取用户信息,地址等授权 app.json——小程序公共配置,放置一些公共参数,例如页面的路径 app.wxss——小程序公共样式表,定义一些全局样式 一个小程序页面由4个文件组成,所以要创建一个小程序页面,至少包含下面两个文件的组成部分: 阅读全文
posted @ 2022-08-01 15:11 举个栗子走天下 阅读(502) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2022.cnblogs.com/blog/1519360/202207/1519360-20220722183319495-1065485114.png) 阅读全文
posted @ 2022-07-22 18:33 举个栗子走天下 阅读(7) 评论(0) 推荐(0) 编辑
摘要: let result = [] let objT = {} for (var i = 0; i < Obj.value.planCode.length; i++) { if (!objT[Obj.value.planCode[i].key]) { result.push(Obj.value.plan 阅读全文
posted @ 2022-05-27 15:19 举个栗子走天下 阅读(31) 评论(0) 推荐(0) 编辑
摘要: var alphabet= String.fromCharCode(64 + parseInt(填写数字); 阅读全文
posted @ 2022-05-27 10:56 举个栗子走天下 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 1、最简单的方法,就是使用“!==”进行判断,这种方法在工作中很常见,可以看出该方法可以判断继承来的属性。 1 2 3 4 let obj = { x: 1 }; obj.x !== undefined; // true 有x属性 obj.y !== undefined; // false 无y属性 阅读全文
posted @ 2022-04-22 16:35 举个栗子走天下 阅读(14041) 评论(0) 推荐(0) 编辑
摘要: function deepCopy(target) { let result; if (Object.prototype.toString.call(target) "[object Array]") { result = []; target.forEach((element) ⇒ { resul 阅读全文
posted @ 2022-04-22 09:44 举个栗子走天下 阅读(30) 评论(0) 推荐(0) 编辑
摘要: export function parseTime (time: Date | number | string, cFormat?: string) { if (arguments.length 0) { return null } const format = cFormat || '{y}-{m 阅读全文
posted @ 2022-04-15 14:44 举个栗子走天下 阅读(201) 评论(0) 推荐(0) 编辑
摘要: // 公共枚举转换 export function commonEnumFormat (options: Array<optionsType>, state: string | number) { if (options.length > 0 && typeof state !== 'undefin 阅读全文
posted @ 2022-04-15 14:34 举个栗子走天下 阅读(45) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 21 下一页