antv x6自定义节点(基于Vue框架进行渲染)
发布时间
阅读量:
阅读量
1、进行@antv/x6-vue-shape的安装操作
# npm
npm install @antv/x6-vue-shape
# yarn
yarn add @antv/x6-vue-shape
# 在 vue2 下还需要安装 @vue/composition-api
yarn add @vue/composition-api --dev
主文件中导入了@antv/x6-vue-shape模块
import "@antv/x6-vue-shape";
完成该软件包的安装与部署后,需将特定节点的shape参数设置为vue-shape,同时借助component属性来确定用于渲染节点的 Vue 组件。
2、自定义节点
<template>
<div class="nodeElement">
<el-image :src="url" class="icon"></el-image>
<div class="notation">
全部评论 (0)
还没有任何评论哟~
