摘要: interval和timer:定时产生数据 interval的参数是1000,在1秒的时刻吐出0,2s吐出1,3s吐出2,........ 这个数据流不会完结,因为interval不会主动调用下游的complete,要想停止这个数据的序列,必须要做退订的动作。 import { Observable 阅读全文
posted @ 2020-03-03 10:02 芙蓉0504 阅读(679) 评论(0) 推荐(0) 编辑
摘要: range:指定范围 从1到100的整数。 range(起点数字,长度)。固定每次增加1. import React from 'react'; import { range } from 'rxjs'; const FlowPage = () => { const source$ = range( 阅读全文
posted @ 2020-03-02 10:36 芙蓉0504 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 注意: 安装了 npm install rxjs@6.5.4 --save 如果按照以下方法调用of方法:会报错找不到of方法的错误。 import React from 'react'; import { Observable } from 'rxjs'; import 'rxjs/add/obs 阅读全文
posted @ 2020-03-02 09:50 芙蓉0504 阅读(1454) 评论(0) 推荐(0) 编辑
摘要: import React from 'react'; import { Observable } from 'rxjs'; const FlowPage = () => { const onSubscribe = observer => { observer.next(1); observer.ne 阅读全文
posted @ 2020-02-28 10:07 芙蓉0504 阅读(1343) 评论(0) 推荐(0) 编辑
摘要: 参考官方文档: https://www.yuque.com/antv/g6/plugin.tool.tooltip 在react-ggEditor使用方法: import React from 'react'; import { Col } from 'antd'; import { Flow } 阅读全文
posted @ 2020-02-26 14:16 芙蓉0504 阅读(1567) 评论(0) 推荐(0) 编辑
摘要: 参考官方文档: https://www.yuque.com/antv/g6/plugin.tool.grid react-ggEditor如何使用 import { Flow } from 'gg-editor'; .... const gird = { cell:20, type:'line', 阅读全文
posted @ 2020-02-25 17:22 芙蓉0504 阅读(1387) 评论(0) 推荐(0) 编辑
摘要: 自定义节点 注册 -- registerNode 我们通过以下接口往 G6 全局注册节点: // 注册节点 G6.registerNode(name, { // 绘制 draw(item) { return keyShape }, // 获取锚点 anchor: array || object || 阅读全文
posted @ 2020-02-25 16:10 芙蓉0504 阅读(2712) 评论(0) 推荐(0) 编辑
摘要: 遇到的问题 1.propsAPI获取不到内容:withPropsAPI包裹的组件必须是GGEditor的子组件。 2.自定义组件如何使用:正确的办法是通过config配置,参照上面的代码(之前我在在内部RegisterCommand以后,在onAfterExecuteCommand中截获命令,通过函 阅读全文
posted @ 2020-02-25 10:35 芙蓉0504 阅读(3587) 评论(2) 推荐(1) 编辑
摘要: db/index.js数据库配置文件 一、在数据库连接失败的情况下,回调函数,再次发起连接,直到连接成功为止。 二、mysql在8个小时内没有任何操作,就会自动中断连接 因此,每个三个小时每个小时ping一次数据库,保持数据库连接状态 三、完整代码如下: 使用数据库的文件controller/que 阅读全文
posted @ 2019-05-22 11:11 芙蓉0504 阅读(2216) 评论(0) 推荐(0) 编辑
摘要: 问题: 回车后,重新刷新了页面,并且路由多了一个问号 解决方案: el from 加上 @submit.native.prevent 理由: 当一个 form 元素中只有一个输入框时,在该输入框中按下回车应提交该表单。如果希望阻止这一默认行为,可以在 标签上添加 @submit.native.pre 阅读全文
posted @ 2019-05-14 11:00 芙蓉0504 阅读(1465) 评论(0) 推荐(1) 编辑