0.0.1 • Published 3 years ago

@antv/g6-alipay v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

g6-component-alipay

G6 Component for alipay miniapp, it's part of G6Mobile

属性名默认值类型是否必传描述
width100Numbercanvas 的宽度,这个值是页面中组件的宽度
height100Numbercanvas 的高度,这个值是页面中组件的高度
pixelRatio1Number设备像素比,这个字段很关键!!!不传递绘制的图非高清!!!字段来自 getSystemInfo/getSystemInfoSync
onInitFunctioncanvas 初始化完成后返回,会携带相关的信息回来,具体看下方表格
onTouchEventFunction所有的 touch 事件都来源这里,如果需要 g6 处理事件,都需自行传递,未统一处理的原因为,业务方可能需自行定制
onErrorFunctioncanvas 创建失败的回调
styleString就是简单的 css 样式

onInit 函数的回调

参数描述
contextcanvas 的 context,由组件创建
rect组件当前所在的位置
canvasnative canvas 返回的 element
renderer渲染模式,在小程序下,G6Mobile 由两种模式, minimini-native 分别对应 web-canvas 和 native-canvas

demo

https://github.com/openwayne/g6-component-alipay-demo