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

简单的网站后台管理系统做市场推广应该掌握什么技巧

简单的网站后台管理系统,做市场推广应该掌握什么技巧,南昌制作网站的公司,手游游戏推广平台效果: LogicFlow 内部是基于MVVM模式进行开发的,分别使用preact和mobx来处理 view 和 model,所以当我们自定义节点的时候,需要为这个节点定义view和model。 参考官方文档:节点 | LogicFlow 1、自定义矩形节点 custo…

效果:

LogicFlow 内部是基于MVVM模式进行开发的,分别使用preactmobx来处理 view 和 model,所以当我们自定义节点的时候,需要为这个节点定义viewmodel

参考官方文档:节点 | LogicFlow

1、自定义矩形节点

customRect.ts文件:

import { RectNode, RectNodeModel, h } from '@logicflow/core';class TodoNodeView extends RectNode {getShape() {// 获取XxxNodeModel中定义的形状属性const { model } = this.props;const { x, y, width, height, radius } = model;// 获取XxxNodeModel中定义的样式属性const style = model.getNodeStyle();return h('g', {}, [h('rect', {...style,x: x - width / 2,y: y - height / 2,width,height,rx: radius,ry: radius,}),// h(//   // 待办图标//   'svg',//   {//     x: x - width / 2 + 5,//     // y: y - height / 2 + 5,//     // width: 25,//     // height: 25,//     y: y - height / 2 - 2,//     width: 30,//     height: 30,//     viewBox: '0 0 1274 1024',//   },//   h('path', {//     fill: '#6f757d',//     d: 'M735.483537 563.043418c-127.277094 0-230.472576 103.195482-230.472576 230.484006s103.195482 230.472576 230.472576 230.472576 230.472576-103.195482 230.472576-230.461147-103.184053-230.495435-230.472576-230.495435z m104.555573 333.999509a29.99058 29.99058 0 0 1-42.288546 0l-83.434159-83.434159a29.876286 29.876286 0 0 1-8.686296-22.56151V671.679264a29.922004 29.922004 0 0 1 59.832578 0v108.40726l74.576423 74.656428a29.99058 29.99058 0 0 1 0 42.299975z',//     // d://     //   "M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z",//   }),//   h('path', {//     fill: '#6f757d',//     d: 'M481.992276 793.538853a253.514119 253.514119 0 0 1 144.318236-228.883898q-8.114829-0.377168-16.321093-0.377169h-204.585129c-191.498538 0-347.360404 152.010179-347.360403 338.856977v19.921335c0 99.709534 153.278836 99.709534 347.360403 99.709534h221.729134A253.468402 253.468402 0 0 1 481.992276 793.538853zM490.118535 546.665178c150.707235 0 273.344019-122.648213 273.344018-273.355447S640.848628 0 490.118535 0 216.785945 122.636784 216.785945 273.309731 339.365583 546.665178 490.118535 546.665178z',//   }),// ),]);}
}class TodoNodeModel extends RectNodeModel {getNodeStyle() {const style = super.getNodeStyle();style.stroke = '#ffffff'; //节点边框颜色style.fill = '#ffffff'; //填充色return style;}initNodeData(data) {super.initNodeData(data); //调用父类的方法this.width = 180;this.height = 60;this.radius = 10;}
}export default {type: 'TodoNode',view: TodoNodeView,model: TodoNodeModel,
};

2、自定义HTML节点

customHtml.ts文件:

import { HtmlNodeModel, HtmlNode } from '@logicflow/core';
class UmlModel extends HtmlNodeModel {setAttributes() {// 设置节点宽高和锚点const width = 80;const height = 88;this.width = width;this.height = height;}
}
class UmlNode extends HtmlNode {setHtml(rootEl) {const { properties } = this.props.model;const node_md = this.props.model;const el = document.createElement('div');el.className = 'uml-wrapper';el.id = node_md.id; // html 节点绑定节点唯一ID;即可通过id 获取对应dom元素 并进行相关业务操作const html = `<div class="logdom-hml" ></div>`;el.innerHTML = '我是一个小天才';el.style.backgroundColor = 'pink';// 需要先把之前渲染的子节点清除掉。rootEl.innerHTML = '';rootEl.appendChild(el);}
}export default {type: 'Htmlnode',view: UmlNode,model: UmlModel,
};

注册自定义节点

我们可以在创建LogicFlow实例之后,render之前,使用register方法来注册自定义节点。

<template><div class="composer"><div class="workflow-app" id="container"></div></div>
</template>
<script setup lang="ts">import { onMounted, ref } from 'vue';// import { forEach, map, has } from 'lodash-es';import LogicFlow from '@logicflow/core';import '@logicflow/core/dist/style/index.css';import { Control } from '@logicflow/extension';import TodoNode from './customRect';import Htmlnode from './ProgressNode';const lf = ref();const render = (data: any) => {lf.value.render(data);};onMounted(() => {renderGraphData();render({nodes: [{id: '1',type: 'TodoNode',x: 200,y: 200,text: '开始',},{id: '2',type: 'TodoNode',x: 600,y: 300,text: '流程节点1',},{id: '3',type: 'Htmlnode',x: 600,y: 500,},],edges: [{type: 'bezier',sourceNodeId: 1,targetNodeId: 2,},],});});const renderGraphData = () => {const container: any = document.querySelector('#container');if (container) {lf.value = new LogicFlow({plugins: [Control],background: {backgroundColor: '#f5f6f7',},grid: {size: 10,type: 'dot',config: {color: '#DEE0E3',thickness: 1,},},keyboard: {// 键盘事件开关enabled: true,},// style: {//   rect: {//     // 矩形节点样式//     stroke: '#31A5FF',//     strokeWidth: 1,//     fill: '#fff',//   },// },container,});lf.value.register(TodoNode); //注册节点lf.value.register(Htmlnode); //注册节点// console.log('画布', lf.value.getGraphData()); //打印画布数据lf.value.on('node:click', (data: any) => {console.log('点击了', data.data.text.value, data);});}};
</script>
<style lang="less" scoped>.composer {height: 100%;width: 100%;.workflow-app {width: 100%;height: 100%;}}
</style>

http://www.ritt.cn/news/17286.html

相关文章:

  • 做爰视频在线观看免费网站广告软文案例
  • 建设网站项目概述58和百度哪个推广效果好
  • 宁波建设网表格seo品牌优化
  • 怎么在58同城上做网站评论优化
  • 表单网站怎么做seo网站网络推广企业
  • 没有做网站能备案吗二十四个关键词
  • 奢侈品 网站建设方案怎么制作网页链接
  • 网站开发前调查厦门seo管理
  • 网站关键词设置多少合适吸引客流的25个技巧
  • 做网站商城需要什么软件seo快速排名代理
  • 别人做的网站百度网站验证seo网站排名优化价格
  • 大鹏网络网站建设seo的形式有哪些
  • 昭通网站建设智能营销系统开发
  • 杭州手机网站建设公司 网络服务百度seo优化教程免费
  • 网站前端代码模板友情链接的网站有哪些
  • 怎么做国内网站电商网站入口
  • 张店网络推广公司windows优化大师有必要安装吗
  • 做房产网站不备案可以吗网络广告营销方案
  • 专做民宿的网站百度客服联系方式
  • wordpress外网地址东莞seo优化方案
  • 建网站的方法情感营销经典案例
  • 网站科技感页面设计美国婚恋网站排名
  • 找潍坊做网站的搜索到的相关信息
  • 贵阳营销网站建设公司百度品牌广告多少钱一个月
  • 广告设计制作图片沈阳seo搜索引擎
  • 网站流量盈利模式微博搜索引擎优化
  • 论坛网站开发技术服务器
  • 网站建设方案应该怎么做最全资源搜索引擎
  • 做网站必须会线上网络平台推广
  • 个体营业执照可以做网站搞推广吗如何在百度投放广告