上一页 1 2 3 4 5 6 ··· 21 下一页
摘要: // 可选链 ?. 的为空判断 let a, b; /* 使用前 */ if (!!a) { b.name = 123; } else { b = undefined; } // 使用后 b = a?.name; console.log(b); 和运算符&&类似 console.log(1 && 2 阅读全文
posted @ 2022-04-20 09:45 xuanPhoto 阅读(38) 评论(0) 推荐(0)
摘要: 工程结构 ├─ .circleci # 包含CircleCI持续集成/持续部署工具的配置文件 ├─ benchmarks # 基准和性能测试文件,vue的跑分demo,例如大数据量的table或者渲染大量的SVG ├─ dist # 构建后输出的不同版本vue文件(UMD、common.js、生产和 阅读全文
posted @ 2022-01-20 12:22 xuanPhoto 阅读(707) 评论(0) 推荐(0)
摘要: option参数说明 术语查询手册 https://echarts.apache.org/zh/cheat-sheet.html X轴/Y轴(他们的选项一致) xAxis/yAxis: { name:'名称', // 名称 // 坐标轴名称的文字样式 nameTextStyle: { color: 阅读全文
posted @ 2021-11-17 09:16 xuanPhoto 阅读(212) 评论(0) 推荐(1)
摘要: vue引入 封装 import * as echarts from 'echarts' // 绘制图表 export default function initEcharts(dom, config) { let myChart = echarts.init(document.querySelect 阅读全文
posted @ 2021-11-17 09:11 xuanPhoto 阅读(120) 评论(0) 推荐(0)
摘要: 配置tsconfig.json // 编译选项 "compilerOptions": { "noImplicitThis": false, // 忽略 this 的类型检查, Raise error on this expressions with an implied any type. } 配置 阅读全文
posted @ 2021-05-18 18:34 xuanPhoto 阅读(405) 评论(0) 推荐(0)
摘要: // 情况1 (正常形参和实参) let fun1 = function(param) { // console.log(arguments); // 打印出[Arguments] { '0': 12 } { '0': 12 } // 可以用 Array.from() 转换成数组 或者for in 阅读全文
posted @ 2021-03-11 11:14 xuanPhoto 阅读(66) 评论(0) 推荐(0)
摘要: 折线图的单位转换 Y轴的单位转换 阅读全文
posted @ 2020-07-29 09:51 xuanPhoto 阅读(364) 评论(0) 推荐(0)
摘要: const getURLParameters = url => (url.match(/([^?=&]+)(=([^&]*))/g) || []).reduce( (a, v) => ((a[v.slice(0, v.indexOf('='))] = v.slice(v.indexOf('=') + 阅读全文
posted @ 2020-04-10 11:09 xuanPhoto 阅读(329) 评论(0) 推荐(0)
摘要: js 属于没有明确归类的语言,或者好听点叫“多范式语言”。 你可以用原型继承模拟一套面向对象的体系,也可以强迫自己写函数式的 javascript(因为函数在 js 里是一等公民),也可以怎么舒服怎么写。 区别 面向过程的设计思路就是首先分析问题的步骤:1、开始游戏,2、黑子先走,3、绘制画面,4、 阅读全文
posted @ 2020-03-20 09:31 xuanPhoto 阅读(212) 评论(0) 推荐(0)
摘要: 首先要明确它就是个语法糖 (v-model 相当于 onChange 的语法糖) <input type="text" :value= 'name' @input='name = $event.target.value'> <p>{{name}}</p> 上面这个功能和v-model是一致的 你自己 阅读全文
posted @ 2020-02-19 11:48 xuanPhoto 阅读(164) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 21 下一页