摘要: 高德地图JS API 实例 亲测可用 参考网站=> 阿里云数据可视化平台(下载json用的):http://datav.aliyun.com/portal/school/atlas/area_selector?spm=a2crr.23498931.0.0.685915dd8QQdlv <script 阅读全文
posted @ 2023-03-02 20:10 有只橘猫 阅读(2670) 评论(0) 推荐(0) 编辑
摘要: 天地图添加多个覆盖物,点击覆盖物,切换选中的icon,移除之前的icon,再次点击移除之前的。。。 这个是react写的,先是确定中心位置,然后渲染点位,添加覆盖物,选中icon的不同, 主要看函数: marker.addEventListener('click', (event: any) => 阅读全文
posted @ 2022-08-26 16:04 有只橘猫 阅读(729) 评论(0) 推荐(0) 编辑
摘要: const arr1 = [{ id: 1, name: '老二' }]; const arr2 = [{ id: 1, name: '网' }, { id: 2, name: '二位' },{ id: 3, name: '二位' }]; // 第一种 let arr1Ids = arr1.map( 阅读全文
posted @ 2022-07-06 16:30 有只橘猫 阅读(3004) 评论(0) 推荐(0) 编辑
摘要: Excel导入 html代码 <button style={{ color: '#1890ff', fontSize: '14px', cursor: 'pointer' }} onClick={() => { upFile(); }} > 导入 </button> <input id="upFil 阅读全文
posted @ 2022-07-06 15:19 有只橘猫 阅读(1894) 评论(3) 推荐(0) 编辑
摘要: 过渡 过渡(transition)是CSS3中具有颠覆性的特性之一,我们可以在不使用Flash动画或JavaScript的情况下,当元素从一种样式变换为另一种样式时元素添加效果。过渡动画:是从一个状态渐渐的过渡到另一个状态。低版本浏览器不支持,但是不影响页面布局。经常和:hover一起搭配使用。 属 阅读全文
posted @ 2022-04-26 14:08 有只橘猫 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 1.睡眠排序,只要睡的时间多少就可以排序出来不要在乎时间多少 var arr=[4,77,741,41,142,52,244]; var sleepSort=function(arr,callback){ const res=[]; arr.forEach(item=>{ setTimeout(() 阅读全文
posted @ 2022-04-15 16:57 有只橘猫 阅读(124) 评论(1) 推荐(1) 编辑
摘要: react的类组件的ts写法,声明的变量,props和state的写法 import React, { PureComponent } from 'react'; interface Iprops { infoType: number | string, title: string, type?: 阅读全文
posted @ 2022-02-25 17:17 有只橘猫 阅读(1495) 评论(0) 推荐(0) 编辑
摘要: 父组件调用子组件的方法 // 父组件 import React, { useEffect, useRef, useState } from 'react'; import StopModal from './components/stopModal'; const DirectiveStop = ( 阅读全文
posted @ 2022-02-25 17:01 有只橘猫 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1.父转子 // 父组件 <template> <div> <div> <p>{{ count }}</p> <Son :countFa="count"/> </div> </div> </template> <script setup> import { ref } from "vue"; imp 阅读全文
posted @ 2022-02-24 18:41 有只橘猫 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 1.diff算法优化 + Vue2中的虚拟dom是进行全量的对比 https://vue-next-template-explorer.netlify.app/ + Vue3新增了静态标记(PatchFlag), 在与上次虚拟节点进行对比时候,只对比带有patch flag的节点 并且可以通过fla 阅读全文
posted @ 2021-12-22 16:39 有只橘猫 阅读(120) 评论(0) 推荐(0) 编辑