当前位置: 首页 > news >正文

wordpress paypal支付知了seo

wordpress paypal支付,知了seo,对网站分析,苏州企业网站制作antv/x6 自定义html节点 效果图定义一个连接桩公共方法注册图形节点创建html节点动态更新节点内容 效果图 定义一个连接桩公共方法 const ports {groups: {top: {position: top,attrs: {circle: {r: 4,magnet: true,stroke: #cf1322,strokeWidth: 1,fill: #fff,style: {visib…

antv/x6 自定义html节点

    • 效果图
    • 定义一个连接桩公共方法
    • 注册图形节点
    • 创建html节点
    • 动态更新节点内容

效果图

在这里插入图片描述

定义一个连接桩公共方法

const ports = {groups: {top: {position: 'top',attrs: {circle: {r: 4,magnet: true,stroke: '#cf1322',strokeWidth: 1,fill: '#fff',style: {visibility: 'visible',},},},},right: {position: 'right',attrs: {circle: {r: 4,magnet: true,stroke: '#389e0d',strokeWidth: 1,fill: '#fff',style: {visibility: 'visible',},},},},bottom: {position: 'bottom',attrs: {circle: {r: 4,magnet: true,stroke: '#389e0d',strokeWidth: 1,fill: '#fff',style: {visibility: 'visible',},},},},left: {position: 'left',attrs: {circle: {r: 4,magnet: true,stroke: '#cf1322',strokeWidth: 1,fill: '#fff',style: {visibility: 'visible',},},},},},items: [{group: 'top',},{group: 'right',},{group: 'bottom',},{group: 'left',},],
}

注册图形节点

Shape.HTML.register({shape: 'html',width: 70,height: 36,effect: ['data'],html(cell) {const { label, props } = cell.getData()const div = document.createElement('div')div.style.width = 70const titleDiv = document.createElement('div')titleDiv.style.width = '70px'titleDiv.style.height = '36px'titleDiv.style.background = '#eb2f96'titleDiv.style.color = 'white'titleDiv.style.fontSize = '14px'titleDiv.style.textAlign = 'center'titleDiv.style.lineHeight = '36px'titleDiv.style.boxSizing = 'border-box'titleDiv.style.fontSize = '12px'titleDiv.style.borderRadius = '6px'titleDiv.style.whiteSpace = 'nowrap'titleDiv.style.overflow = 'hidden'titleDiv.style.textOverflow = 'ellipsis'titleDiv.setAttribute('title', label)titleDiv.textContent = labeldiv.append(titleDiv)return div},ports: { ...ports,items: [{group: 'left'},{group: 'right'}]},})
  1. effect 是当前节点的 prop 数组,当 effect 包含的 prop 有变动时,会重新执行 html 方法,返回新的 dom,更新节点内容;
  2. ports 是此节点的连接桩;此节点只用到了左右两个连接桩;

创建html节点

const r2 = this.graph.createNode({shape: 'html',data: {props:{desc: ''},label: '自定义html',},
})
  1. shape 要和注册节点里的名称一致;

动态更新节点内容

let cell = this.graph.getCellById(id)
cell.prop('data/label', '文字')
cell.prop('data/props/voice', 'desc')
  • id 是要更改内容的cell的id;
http://www.zhongyajixie.com/news/20437.html

相关文章:

  • 怎么把自己做的网站商城推广软文范文
  • 网站建设cms可以访问境外的浏览器
  • 深圳盐田住房和建设局网站国际新闻界期刊
  • 农安县住房城乡建设局网站seo 工具分析
  • 注册公司网站流程网络广告名词解释
  • 网站制作公司杭州室内设计培训哪个机构比较好
  • 怎么用java 做网站seo推广沧州公司电话
  • 个人虚拟机做网站百度搜索入口网址
  • 卢湾网站设计微信scrm
  • 副业做网站程序运营推广seo招聘
  • 网站导航如何做半透明渐变微信上如何投放广告
  • 网站备案需要原件吗百度企业
  • 怎么提高网站百度权重网站推广怎么弄
  • 做网站和微信小程序自己做的网址如何推广
  • 电商网站详细设计外贸公司如何做推广
  • 温州做网站软件怎么做百度推广运营
  • 网站建设与管理教学方案外贸如何推广
  • 昆明做网站的王通seo赚钱培训
  • 企业融资abcd轮什么意思seo查询是什么意思
  • 建站网站模板下载怎么寻找网站关键词并优化
  • wordpress 皮主题搜狗seo优化
  • wordpress打造论坛成都有实力的seo团队
  • h5科技 网站杭州网站优化搜索
  • 青岛 生物类网站建设舆情报告
  • 怎样提高网站收录百度指数的使用方法
  • 网站做ulr跳转关键词排名优化江苏的团队
  • 百度云怎么做网站空间百度网盘搜索引擎官方入口
  • 嘿客免费网站建设关键词排名查询工具有哪些
  • 广州海珠区疫情宁波seo关键词优化制作
  • 学网站平面设计做网络推广