摘要: 方法封装: /** * 数据转换为树形(递归),示例:toTreeByRecursion(source, 'id', 'parentId', null, 'children') * @param {Array} source 数据 * @param {String} idField 标识字段名称 * 阅读全文
posted @ 2020-08-21 16:28 jardeng 阅读(12232) 评论(0) 推荐(1) 编辑
摘要: 【方式一】:通过设置customRow达到目的,点击时遍历所有行设置为正常颜色,把当前行设置为特殊颜色(高亮色) HTML: <a-table ref="table" size="small" rowKey="id" bordered :columns="physicalSurveyColumns" 阅读全文
posted @ 2020-08-09 01:58 jardeng 阅读(7558) 评论(0) 推荐(0) 编辑
摘要: 配套源码:https://gitee.com/jardeng/IdentitySolution 1、创建ASP.NET Core Web应用程序,选择空模板。 去掉HTTPS 2、添加nuget包:IdentityServer4。 3、添加Config.cs文件作为IdentityServer配置文 阅读全文
posted @ 2020-04-25 17:46 jardeng 阅读(3628) 评论(11) 推荐(3) 编辑
摘要: 1、nuget要加上 Microsoft.AspNetCore.Cors 中间件。 2、在Startup类里先定义一个全局变量。 private readonly string AllowSpecificOrigin = "AllowSpecificOrigin"; 3、在Startup的Confi 阅读全文
posted @ 2020-04-01 11:53 jardeng 阅读(1480) 评论(0) 推荐(0) 编辑
摘要: 例如:有一组数字,[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],需要从这一组数字中寻找最优的数字组合,让数字组合的总和最接近但不超过这个某个值,比如14,且组合的数字数量尽量多。 > [4, 10]有2个数字,可构成等于14,最接近14的数字组合。 > [1, 2, 3, 4]有4 阅读全文
posted @ 2021-09-10 12:05 jardeng 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 代码如下: /** * 将数字拆分为指定数量的子数字数组 * @param targetNumber 需要拆分的目标数字 * @param splitCount 拆分次数 * @returns 拆分后的子数字数组 */ private numberSplit(targetNumber: number 阅读全文
posted @ 2021-07-21 18:44 jardeng 阅读(806) 评论(0) 推荐(0) 编辑
摘要: /** * 深拷贝 * @param {*} obj 需拷贝的对象 * @returns 深拷贝后的对象 */ function copyObj (obj) { // 对于原始类型和常见的非值,直接返回原来值 if ([NaN, null].includes(obj)) return obj if 阅读全文
posted @ 2021-07-14 14:23 jardeng 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 非泛型版 namespace demo { /** * 字典类 * let dictionary = new Dictionary(); // new一个对象 * // 设置属性 * dictionary.Set('gandalf', 'gandalf@email.com'); * dictiona 阅读全文
posted @ 2021-06-04 14:51 jardeng 阅读(2172) 评论(0) 推荐(0) 编辑
摘要: 参考博文:手机web前端调试页面的几种方式 hosts文件添加以下 #chrome-devtools61.91.161.217 chrome-devtools-frontend.appspot.com61.91.161.217 chrometophone.appspot.com 阅读全文
posted @ 2021-05-29 11:04 jardeng 阅读(261) 评论(0) 推荐(0) 编辑
摘要: > 使用 uni.navigateTo 跳转B页面(指下方代码的 test.vue 页面),跳转完成后,会触发 navigateTo 的回调函数success,使用 res.eventChannel 向被打开的页面传送数据。 > 被打开的页面B页面(test.vue),也可以在页面任意处,使用代码 阅读全文
posted @ 2021-03-17 19:09 jardeng 阅读(2405) 评论(0) 推荐(0) 编辑
摘要: 场景:封装一个组件 - 简易计算器,在文本框点击时显示计算器,点击计算器上的按钮即数字、运算符等,就将点击的按钮文本插入到文本框的光标处 计算器组件calculator.vue <template> <!-- 计算器 --> <div ref="calculator" class="calculat 阅读全文
posted @ 2020-12-11 08:28 jardeng 阅读(831) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>实现div拖拽 阅读全文
posted @ 2020-11-27 18:04 jardeng 阅读(581) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <link rel="stylesheet" href="./jquery-ui-1.12.1/jquery-ui.min.css" /> <title>实现div拖拽时出现辅助线,以方便和其它div很容易的对齐</title> </head> <body> <div c 阅读全文
posted @ 2020-11-27 17:56 jardeng 阅读(283) 评论(0) 推荐(0) 编辑
摘要: vue.config.js // vue.config.js const vueConfig = { chainWebpack: config => { config.plugin('html').tap(args => { args[0].title = '这里设置标题' return args 阅读全文
posted @ 2020-11-25 09:47 jardeng 阅读(1544) 评论(0) 推荐(0) 编辑