1.0.7 • Published 5 years ago
@alone-g6/input-label v1.0.7
基于@antv/g6的节点与边的label输入框组件
使用
import {showInput, fittingString, addClass, removeClass} from '@alone-g6/input-label';在合适的地方激活输入框
const result = showInput(item, {graph: this.graph, options});
const { value, oldLabel, fittingValue } = result;options
parent: input输入框父及dom,HTMLElement 或 Selectorstyle: input输入框样式graph: g6 实例autoUpdate: 是否自动更新label,默认truefocusClear: 是否在input获得焦点时清除现有label,默认trueonFocus: 获得焦点事件textOverflow: 文本溢出后处理方式:ellipsisornewline默认ellipsistextEllipsis: 文本溢出后ellipsis处理方式的后缀默认...padding: 文本padding,计算文本溢出时使用,默认 0