react
PYLH7
这个作者很懒,什么都没留下…
展开
-
React+Echarts 图形轮播
export function highlightLoop(echart, length, callback) { let index = 0; return setInterval(function () { if(index !== 0){ //取消高亮 echart.dispatchAction({ type: 'downplay', dataIndex: index - 1, }); } if (inde.原创 2021-04-13 13:36:51 · 386 阅读 · 0 评论 -
react + echarts 点击事件
根据官网示例,点击事件只有在html中的例子,具体做法如下:先定义echarts所在的节点,创建echarts节点,添加点击事件。<script src="echarts.min.js"></script><div id="main" style="width: 600px;height:400px;"></div><script> var myChart = echarts.init(document.getElementB原创 2021-03-18 16:15:13 · 4028 阅读 · 3 评论 -
react 调用ajax请求上传文件
const http = axios.create({ timeout:10000})var formFile = new FormData();formFile.append("file", fileObj);http({ url: 'http://', method: 'POST', headers: { 'UploadToken': '' + tokenStr, }, data: formFile,}).then((res) => {})原创 2021-03-18 14:54:27 · 305 阅读 · 0 评论 -
react+antd Select下拉框位置随页面偏移
<Select style={{width: 200}} getPopupContainer={triggerNode => (triggerNode.parentElement || document.body)}></Select>根据官方Api,若位置发生偏移,添加getPopupContainer属性,使其依附于其父节点,默认是body原创 2021-03-18 14:45:34 · 2842 阅读 · 2 评论