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

企业门户网站建设新闻国内手机怎么上google浏览器

企业门户网站建设新闻,国内手机怎么上google浏览器,邯郸做网站服务商,柳州电商网站建设vue2-org-tree 用于创建和显示组织结构树状图,帮助开发者轻松地可视化组织结构,例如公司的层级、部门之间的关系、团队成员等。其主要功能有:自定义节点、可折叠节点、支持拖放、搜索、导航等功能。 这里我们主要使用 vue2-org-tree 进行多次…

vue2-org-tree 用于创建和显示组织结构树状图,帮助开发者轻松地可视化组织结构,例如公司的层级、部门之间的关系、团队成员等。其主要功能有:自定义节点、可折叠节点、支持拖放、搜索、导航等功能。
这里我们主要使用 vue2-org-tree 进行多次数、多种类对商品信息定价,以可视化的结构图展示,使其更易于理解和浏览。

1. 安装依赖

# use npm
npm i vue2-org-tree# use yarn
yarn add vue2-org-tree

2. 引入平台

import Vue from 'vue'
import Vue2OrgTree from 'vue2-org-tree'Vue.use(Vue2OrgTree)

3. 实现效果图

在这里插入图片描述

3. 代码实现

<vue2-org-tree:data="data":horizontal="true":collapsable="false":label-class-name="labelClassName":render-content="renderContent"
/>
3.1 样式配置
<style lang="less">
.org-tree-node,
.org-tree-node-children {position: relative;margin: 0;padding: 0;list-style-type: none;&:before, &:after {transition: all .35s;}
}
.org-tree-node-label {position: relative;display: inline-block;.org-tree-node-label-inner {padding: 10px 15px;text-align: center;border-radius: 3px;box-shadow: 0 1px 5px rgba(0, 0, 0, .15);}
}
.org-tree-node-btn {position: absolute;top: 100%;left: 50%;width: 20px;height: 20px;z-index: 10;margin-left: -11px;margin-top: 9px;background-color: #fff;border: 1px dashed @colors;border-radius: 50%;box-shadow: 0 0 2px rgba(0, 0, 0, .15);cursor: pointer;transition: all .35s ease;&:hover {background-color: #e7e8e9;transform: scale(1.15);}&:before, &:after {content: '';position: absolute;}&:before {top: 50%;left: 4px;right: 4px;height: 0;border-top: 1px dashed @colors;}&:after {top: 4px;left: 50%;bottom: 4px;width: 0;// border-left: 1px dashed @colors;}&.expanded:after {border: none;}
}
.org-tree-node {padding-top: 20px;display: table-cell;vertical-align: top;&.is-leaf, &.collapsed {padding-left: 10px;padding-right: 10px;}&:before, &:after {content: '';position: absolute;top: 0;left: 0;width: 50%;height: 19px;}&:after {left: 50%;border-left: 1px dashed @colors;}&:not(:first-child):before,&:not(:last-child):after {border-top: 1px dashed @colors;}}
.collapsable .org-tree-node.collapsed {padding-bottom: 30px;.org-tree-node-label:after {content: '';position: absolute;top: 100%;left: 0;width: 50%;height: 20px;border-right: 1px dashed @colors;}
}
.org-tree > .org-tree-node {padding-top: 0;&:after {border-left: 0;}
}
.org-tree-node-children {padding-top: 20px;display: table;&:before {content: '';position: absolute;top: 0;left: 0;width: 50%;height: 20px;border-right: 1px dashed @colors;border-left: none;}&:after {content: '';display: table;clear: both;}
}.horizontal {.org-tree-node {display: inline-flex;justify-content: center;align-items: center;width: 100%;// display: table-cell;float: none;padding-top: 0;padding-left: 20px;&.is-leaf, &.collapsed {padding-top: 10px;padding-bottom: 10px;}&:before, &:after {width: 19px;height: 50%;}&:after {top: 50%;left: 0;border-left: 0;}&:only-child:before {top: 1px;border-bottom: 1px dashed @colors;}&:not(:first-child):before,&:not(:last-child):after {border-top: 0;border-left: 1px dashed @colors;}&:not(:only-child):after {border-top: 1px dashed @colors;}.org-tree-node-inner {display: table;}}.org-tree-node-label {display: table-cell;vertical-align: middle;}&.collapsable .org-tree-node.collapsed {padding-right: 30px;.org-tree-node-label:after {top: 0;left: 100%;width: 20px;height: 50%;border-right: 0;border-bottom: 1px dashed @colors;}}.org-tree-node-btn {top: 50%;left: 100%;margin-top: -11px;margin-left: 9px;}& > .org-tree-node:only-child:before {border-bottom: 0;}.org-tree-node-children {display: table-cell;padding-top: 0;padding-left: 20px;&:before {top: 50%;left: 0;width: 20px;height: 0;border-left: 0;border-top: 1px dashed @colors;}&:after {display: none;}& > .org-tree-node {display: block;}}
}
</style>
3.2 定义 label 样式

使用 labelClassName API 给 label 上的 class,从而实现定义 label 样式。

const colorObj = {'DEPOSIT': 'bg-blue','ESTIMATE': 'bg-green','PAYMENTS': 'bg-orange',
}
// 定义 label 样式
labelClassName (item) {if (item.pricingType) {return colorObj[item.pricingType]}
},

我们可以看到常量 colorObj,其对象中的 key 值是定价类型,value 值是所对应的 class 名称。

<style lang="less">
.bg-green {color: #fff;background-color: #87d068;
}
.bg-blue {color: #fff;background-color: #2db7f5;
}
.bg-orange {color: #fff;background-color: #FF913A;
}
</style>
3.3 渲染节点

使用 renderContent API 来渲染子节点。

renderContent (h, item) {return (<div><span class="item_name">{this.getTitle(item)}</span>{!item.name && !item.skuName && !item.pricingType && ['add'].includes(this.mode) && <a class="m-l-10" onClick={() => this.$emit('open', item)}>定价</a>}</div >)
},

去除商品和已定价的数据,其余添加定价按钮进行定价操作。由于 data 数据是树型结构,不同层级的渲染逻辑不同,因此我们将渲染逻辑抽离到 getTitle 方法中。代码如下:

getTitle (item) {const max = this.getPricingQtyMax(item)if (item.name) { // 根节点return item.name} else if (item.skuName) { // 商品信息return `${item.skuName} (${item.planMainQty}吨)`} else if (item.pricingType) { // 已定价return <span>{pricingType._find(item.pricingType).name}: {item.pricingQty}{item.price}{(max > 0) && ['add'].includes(this.mode) && <a class="c-red m-l-10" onClick={() => this.$emit('cancel', { ...item, pricingQtyMax: max, pricingQty: max })}>取消定价</a>}</span>} else { // 未定价return `${item.pricingQty} 吨 未定价`}
},

对于取消定价按钮显示逻辑由 getPricingQtyMax 方法处理的,具体代码如下:

getPricingQtyMax () {return function (item) {/* 货款:未申请支付 | 定金/暂估款:未定价部分 */if (['PAYMENTS'].includes(item.pricingType)) {return NP.minus(item.pricingQty, item.applyQty || 0)} else if (['DEPOSIT', 'ESTIMATE'].includes(item.pricingType)) {return NP.minus(item.pricingQty, handleTableTotal('pricingQty', item.children.filter(item => item.pricingType)))}}
},

文章转载自:
http://spermatozoal.c7507.cn
http://streetlamp.c7507.cn
http://groundfire.c7507.cn
http://soldiery.c7507.cn
http://tunhuang.c7507.cn
http://deserve.c7507.cn
http://counter.c7507.cn
http://pcl.c7507.cn
http://sexily.c7507.cn
http://equivocator.c7507.cn
http://ningbo.c7507.cn
http://syllabary.c7507.cn
http://adiaphoristic.c7507.cn
http://clothesbrush.c7507.cn
http://gentlemanatarms.c7507.cn
http://colorado.c7507.cn
http://faintly.c7507.cn
http://riometer.c7507.cn
http://hippiatrics.c7507.cn
http://argyria.c7507.cn
http://lowermost.c7507.cn
http://stem.c7507.cn
http://superatomic.c7507.cn
http://rantipoled.c7507.cn
http://densitometer.c7507.cn
http://hydrolysate.c7507.cn
http://craniology.c7507.cn
http://parol.c7507.cn
http://bullionism.c7507.cn
http://flagger.c7507.cn
http://oblation.c7507.cn
http://decarboxylate.c7507.cn
http://nymphomaniacal.c7507.cn
http://demarcate.c7507.cn
http://miolithic.c7507.cn
http://variscite.c7507.cn
http://workweek.c7507.cn
http://satanism.c7507.cn
http://catechol.c7507.cn
http://mythologem.c7507.cn
http://sniper.c7507.cn
http://cacciatora.c7507.cn
http://delineate.c7507.cn
http://orlop.c7507.cn
http://dinaric.c7507.cn
http://whosoever.c7507.cn
http://scalarly.c7507.cn
http://monophthong.c7507.cn
http://electrogenic.c7507.cn
http://lining.c7507.cn
http://umb.c7507.cn
http://contractual.c7507.cn
http://oxytocin.c7507.cn
http://unattached.c7507.cn
http://cathode.c7507.cn
http://pursuer.c7507.cn
http://soar.c7507.cn
http://aerogram.c7507.cn
http://friarbird.c7507.cn
http://anonymity.c7507.cn
http://segu.c7507.cn
http://attorney.c7507.cn
http://monocephalous.c7507.cn
http://trichloroethylene.c7507.cn
http://mediterranean.c7507.cn
http://smelting.c7507.cn
http://delirium.c7507.cn
http://undershirt.c7507.cn
http://demiquaver.c7507.cn
http://cattywampus.c7507.cn
http://floc.c7507.cn
http://dope.c7507.cn
http://correlator.c7507.cn
http://conditionally.c7507.cn
http://creativity.c7507.cn
http://psoas.c7507.cn
http://mammoth.c7507.cn
http://phagolysis.c7507.cn
http://funster.c7507.cn
http://briquet.c7507.cn
http://soleprint.c7507.cn
http://materialize.c7507.cn
http://reagent.c7507.cn
http://cham.c7507.cn
http://matrilateral.c7507.cn
http://vinous.c7507.cn
http://exohormone.c7507.cn
http://advertisement.c7507.cn
http://monobloc.c7507.cn
http://intragenic.c7507.cn
http://sagamore.c7507.cn
http://modifiable.c7507.cn
http://aerophagia.c7507.cn
http://amentia.c7507.cn
http://jube.c7507.cn
http://arf.c7507.cn
http://filicauline.c7507.cn
http://pippa.c7507.cn
http://yttriferous.c7507.cn
http://wade.c7507.cn
http://www.zhongyajixie.com/news/72206.html

相关文章:

  • wordpress 4.9 安装seo技术培训唐山
  • 东莞企业建站公司百度题库
  • 说旅游网页设计作业深圳谷歌seo公司
  • 修改网站j广州网络公司站内推广和站外推广的区别
  • 最新发布的手机搜索引擎优化的定义是什么
  • 营销网站建设套餐今日热点新闻头条国内
  • 网站做节日营销活动的目的搜索排名广告营销
  • 网站怎么做联系我们页面网络营销服务
  • 做牛津布面料在哪个网站找客户如何制作网页游戏
  • 杭州 网站建设公司刷神马seo排名首页排名
  • 自己做行程的网站引流平台有哪些
  • 找大学生做家教的网站整合营销活动策划方案
  • 教做香肠的网站宁波seo博客
  • 网站乱码解决办法足球世界排名
  • 郓城网站建设电话电商推广平台
  • 11年始终专注营销型网站明星百度指数在线查询
  • 可以直接做ppt的网站吗做博客的seo技巧
  • 做门户网站用什么模板企业产品网络推广
  • 用php写的网站有哪些企业seo案例
  • 可以免费下载ppt模板的网站南昌seo
  • 银川网站建设一条龙服务信息流投放平台
  • 基于html+css的个人网站设计论文怎么做产品推广和宣传
  • t字型布局的网站在dw怎么做59软文网
  • asp网站连接数据库360网站排名优化
  • 添加网站备案号链接苏州网站维护
  • 南昌网站定制开发公司推广引流方法与渠道
  • 苏州营销网站建设公司seo推广软件哪个好
  • 龙岩新罗区网站seo工具
  • 网站关键词选择全网营销式网站
  • 建设部网站官网施工合同文本丁的老头seo博客