├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── dist ├── index.html ├── static │ └── js │ │ ├── app.c5d489d7531359a95ae4.js │ │ ├── app.c5d489d7531359a95ae4.js.map │ │ ├── manifest.f13e4d0131d6e7563fda.js │ │ ├── manifest.f13e4d0131d6e7563fda.js.map │ │ ├── vendor.23b2cff6f2751bc97233.js │ │ └── vendor.23b2cff6f2751bc97233.js.map ├── vue-svg-tree.min.css └── vue-svg-tree.min.css.map ├── example ├── index.html └── static │ ├── css │ ├── app.dd870e83d2d18ad7e43a150936800b79.css │ └── app.dd870e83d2d18ad7e43a150936800b79.css.map │ └── js │ ├── app.5c5463d855fa5c7c0f66.js │ ├── app.5c5463d855fa5c7c0f66.js.map │ ├── manifest.3ad1d5771e9b13dbdad2.js │ ├── manifest.3ad1d5771e9b13dbdad2.js.map │ ├── vendor.643b326d854820d6ddbb.js │ └── vendor.643b326d854820d6ddbb.js.map ├── index.html ├── package.json ├── src ├── App.vue ├── example │ ├── index.vue │ └── list.js ├── lib │ ├── index.js │ ├── index.vue │ └── ruler.js ├── main.js └── router │ └── index.js ├── static └── .gitkeep └── vue-svg-tree-1.0.0.tgz /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | npm-debug.log* 4 | yarn-debug.log* 5 | yarn-error.log* 6 | package-lock.json 7 | /config/ 8 | /build/ 9 | 10 | # Editor directories and files 11 | .idea 12 | .vscode 13 | *.suo 14 | *.ntvs* 15 | *.njsproj 16 | *.sln 17 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-svg-tree 2 | > 基于vue和svg的动态树形UI 3 | 4 | [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://https://www.calamus.xyz) 5 | [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://www.calamus.xyz) 6 | 7 | ### [截图](http://calamus.wiki/vue-svg-tree/example/index.html) 8 | 截图 9 | 10 | ### [应用](http://calamus.wiki/vue-svg-tree/example/index.html) 11 | ```bash 12 | npm install vue-svg-tree 13 | ``` 14 | 15 | ### [示例](http://calamus.wiki/vue-svg-tree/example/index.html) 16 | ```vue 17 | 26 | 27 | 58 | ``` 59 | 60 | ### 参数 61 | | 参数 | 描述 | 类型 | 默认/是否必须 | 62 | | ---------- | ------- | :--------: | :-------: | 63 | | treeData | 树形结构数据 |Array| 必须 | 64 | | direction | 树形方向 | String | 'row'/'col'(纵/横)| 65 | | svgId | svgId | String | 'svgId'(一个页面多个图时svgId不能相同) | 66 | | curveness | 连接线是直线还是弧线 | Boolean | false(false:弧线;true:直线) | 67 | 68 | ### ToDo 69 | - [x]横向显示还有点小问题没有修复 70 | - [x]弧度不可调整 71 | - [x]框框样式暂时不可自定义,暂时建议复制源码修改,后期会修改为可配置,[欢迎pr](https://github.com/calamus0427/vue-svg-tree) 72 | 73 | ### 链接 74 | [github](https://github.com/calamus0427/vue-svg-tree) 75 | [官网](https://www.calamus.xyz) 76 | [组件介绍](https://www.cnblogs.com/calamus/p/10643952.html) 77 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | vue-svg-tree
-------------------------------------------------------------------------------- /dist/static/js/app.c5d489d7531359a95ae4.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("VueSvgtree",[],e):"object"==typeof exports?exports.VueSvgtree=e():t.VueSvgtree=e()}("undefined"!=typeof self?self:this,function(){return webpackJsonpVueSvgtree([1],{fl6T:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("mvHQ"),o=n.n(i),r={name:"VueSvgTree",data:function(){return{rules:{min:200,max:350},delayRules:{min:10,max:300},root:null,list:null,levels:null}},props:{treeData:{type:Array},direction:{type:String,default:"row"},svgId:{type:String,default:"svg"},curveness:{type:Boolean,default:!1}},mounted:function(){this.treeData&&this.treeData.length>0&&this.initData(JSON.parse(o()(this.treeData)))},watch:{treeData:function(t){t&&t.length>0&&this.initData(JSON.parse(o()(t)))}},methods:{compare:function(t,e){return t.deep!==e.deep?t.deep-e.deep:t.parent===e.parent?t.id-e.id:this.compare(t.parent,e.parent)},initData:function(t){var e=this;console.log("data",t);var n={},i=null,o=[];(t||t.length>0)&&(t.forEach(function(t){n[t.id]=t,t.deep=0,t.top=0,t.height=0,t.width=0,t.path="",t.left=0,t.prev=null}),t.forEach(function(t){if(t.fatherId||t.fatherId>0){var o=n[t.fatherId];o.children=o.children||[],o.children.push(t),t.parent=o,t.deep=o.deep+1,t.left="col"==e.direction?300*t.deep+10:0,t.top="row"==e.direction?250*t.deep+5:0,t.open=t.deep<1,t.show=t.deep<2}else i=t,t.open=!0,t.show=!0}),t.sort(this.compare),t.forEach(function(t){o[t.deep]=o[t.deep]||[],o[t.deep].push(t),t.prev=o[t.deep][o[t.deep].length-2]}),this.root=i,this.list=t,console.log("daya",t),this.levels=o,"col"==this.direction?(this.calcHeight(i),this.calcTop(),this.calSvg()):(this.calWidth(i),this.calcLeft(),this.calSvgVer()))},calcHeight:function(t){var e=this,n=0;t.parent&&!t.parent.open?(t.height=0,t.open=!1):t.open||(t.height=50),t.children&&t.children.length>0&&t.children.forEach(function(t){e.calcHeight(t),n+=t.height}),t.open&&(t.height=n||50)},calWidth:function(t){var e=this,n=0;t.parent&&!t.parent.open?(t.height=0,t.width=0,t.open=!1):t.open||(t.width=300),t.children&&t.children.length>0&&t.children.forEach(function(t){e.calWidth(t),n+=t.width}),t.open&&(t.width=n||300)},calSvg:function(){var t=this;this.$nextTick(function(){t.levels.flat(1/0).filter(function(t){return t.show}).sort(function(t,e){return e.top-t.top})[0].top;var e=document.getElementById(t.svgId);console.log("svg",e),e.setAttribute("height",500),e.setAttribute("width",700),t.$emit("toggle",t.$refs.treeContent.scrollWidth,t.root.height)})},calSvgVer:function(){var t=this;this.$nextTick(function(){t.levels.flat(1/0).filter(function(t){return t.show}).sort(function(t,e){return e.top-t.top})[0].top;var e=document.getElementById(t.svgId);e.setAttribute("height",t.$refs.treeContent.scrollHeight),e.setAttribute("width",t.root.width),t.$emit("toggle",{width:t.root.width,height:t.$refs.treeContent.scrollHeight})})},calcTop:function(t,e){if(t||(t=this.root),e=e||0,t.top=e+t.height/2,t.children&&t.children.length>0)for(var n=0;n0)for(var n=0;no?s+5:s-5;t.path=s==o?"M"+s+","+l+" L "+o+","+r:"M"+s+","+l+" Q "+c+","+(l-30)+" "+a+","+(l-30)+" T "+o+","+r}},toggle:function(t){t.open=!t.open,console.log("vnode",t),t.children&&t.children.map(function(t){t.show=!t.show}),"col"==this.direction?(this.calcHeight(this.root),this.calcTop(),this.calSvg()):(this.calWidth(this.root),this.calcLeft(),this.calSvgVer()),console.log("toggle:",t,t.open)},showDetail:function(t){delete t.children,this.$emit("detail",t)},addTarget:function(t){delete t.children,console.log("1111111",t),this.$emit("add",t)},editTarget:function(t){delete t.children,console.log("2222222",t),this.$emit("edit",t)},detailTarget:function(t){delete t.children,this.$emit("detail",t)},refreshTarget:function(t){delete t.children,console.log("3333333",t),this.$emit("refresh",t)}}},s={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("div",{ref:"treeContent",staticClass:"draw-area",attrs:{id:"treeContent"}},[t._l(t.levels,function(e,i){return n("div",{key:i},t._l(e,function(e,i){return!e.parent||e.parent.open?n("div",{key:i,staticClass:"vnode",class:{pnode:e.children&&e.children.length>0},style:"left:"+e.left+"px; top:"+e.top+"px",on:{click:function(n){return t.toggle(e)}}},[n("div",{staticClass:"text"},[n("div",{staticClass:"node_title"},[n("span",{staticClass:"OKR",class:"0"==e.tlevel?"pink":"blue"},[t._v("\n "+t._s("0"==e.tlevel?"C":"L")+"\n ")]),t._v(" "),n("span",{staticClass:"label"},[t._v("\n "+t._s(e.name)+"\n ")])]),t._v(" "),n("div",{staticClass:"node_des"},[n("div",[t._v(t._s(e.content))])]),t._v(" "),n("div",{staticClass:"node_progress"},[t._v("\n "+t._s(e.des)+"\n ")]),t._v(" "),t._m(0,!0)])]):t._e()}),0)}),t._v(" "),t.curveness?n("svg",{attrs:{id:t.svgId}},t._l(t.list,function(e,i){return e.deep>0&&e.parent.open?n("line",{staticClass:"link",attrs:{x1:e.left+90,y1:e.top,x2:e.parent.left+105,y2:e.parent.top+150,stroke:e.color?e.color:"#aaa","stroke-width":e.strokeWidth?e.strokeWidth:"1px"}}):t._e()}),0):t._e(),t._v(" "),t.curveness?t._e():n("svg",{attrs:{id:t.svgId}},t._l(t.list,function(e,i){return e.deep>0&&e.parent.open?n("path",{staticClass:"link",attrs:{d:e.path,stroke:e.color?e.color:"#aaa","stroke-width":e.strokeWidth?e.strokeWidth:"1px"}}):t._e()}),0)],2)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"showTips"},[e("a",{staticClass:"tips_icon icon_edit ",attrs:{target:"_blank",href:"https://www.cnblogs.com/calamus"}},[this._v("\n B\n ")]),this._v(" "),e("a",{staticClass:"tips_icon icon_edit ",attrs:{target:"_blank",href:"https://www.calamus.xyz"}},[this._v("\n C\n ")]),this._v(" "),e("a",{staticClass:"tips_icon icon_edit ",attrs:{target:"_blank",href:"https://github.com/calamus0427"}},[this._v("\n G\n ")])])}]};var l=n("VU/8")(r,s,!1,function(t){n("gH1I")},null,null).exports;e.default=l;"undefined"!=typeof window&&window.Vue&&window.Vue.component(l.name,l)},gH1I:function(t,e){}},["fl6T"])}); 2 | //# sourceMappingURL=app.c5d489d7531359a95ae4.js.map -------------------------------------------------------------------------------- /dist/static/js/app.c5d489d7531359a95ae4.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///src/lib/index.vue","webpack:///./src/lib/index.vue?86c0","webpack:///./src/lib/index.vue","webpack:///./src/lib/index.js"],"names":["root","factory","exports","module","define","amd","self","this","lib","name","data","rules","min","max","delayRules","list","levels","props","treeData","type","Array","direction","String","default","svgId","curveness","Boolean","mounted","length","initData","JSON","parse","stringify_default","watch","val","methods","compare","v1","v2","deep","parent","id","_this","console","log","keys","forEach","v","top","height","width","path","left","prev","fatherId","p","children","push","open","show","sort","calcHeight","calcTop","calSvg","calWidth","calcLeft","calSvgVer","vnode","me","_this2","$nextTick","flat","Infinity","filter","item","a","b","svg","document","getElementById","setAttribute","$emit","$refs","treeContent","scrollWidth","_this3","scrollHeight","prevHeight","i","pLeft","pTop","mLeft","prevWidth","vLeft","vTop","x1","toggle","map","child","showDetail","addTarget","editTarget","detailTarget","refreshTarget","selectortype_template_index_0_src_lib","render","_vm","_h","$createElement","_c","_self","attrs","ref","staticClass","_l","arr","index","key","class","pnode","style","on","click","$event","tlevel","_v","_s","content","des","_m","_e","link","y1","x2","y2","stroke","color","stroke-width","strokeWidth","d","staticRenderFns","target","href","src_lib","__webpack_require__","normalizeComponent","ssrContext","VueSvgTree","window","Vue","component"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IAC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,EAAAwB,OAAW,GAAAxB,EAAAwB,KAAAxB,EAAAmB,GAAA,KAAAnB,EAAAjF,UAAmUiF,EAAAwB,KAAnUrB,EAAA,OAAqDE,OAAOtE,GAAAiE,EAAAlF,QAAgBkF,EAAAQ,GAAAR,EAAA,cAAAyB,EAAAf,GAAwC,OAAAe,EAAA5F,KAAA,GAAA4F,EAAA3F,OAAAkB,KAAAmD,EAAA,QAAsDI,YAAA,OAAAF,OAA0B4B,EAAAR,EAAAhF,KAAAoF,OAAAJ,EAAAK,MAAAL,EAAAK,MAAA,OAAAC,eAAAN,EAAAO,YAAAP,EAAAO,YAAA,SAAoHhC,EAAAwB,OAAW,UAEn1DU,iBADjB,WAAoC,IAAajC,EAAbpG,KAAaqG,eAA0BC,EAAvCtG,KAAuCuG,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAiBI,YAAA,aAAuBJ,EAAA,KAAUI,YAAA,uBAAAF,OAA0C8B,OAAA,SAAAC,KAAA,qCAA3JvI,KAAuNsH,GAAA,iEAAvNtH,KAAuNsH,GAAA,KAAAhB,EAAA,KAA8FI,YAAA,uBAAAF,OAA0C8B,OAAA,SAAAC,KAAA,6BAA/VvI,KAAmZsH,GAAA,iEAAnZtH,KAAmZsH,GAAA,KAAAhB,EAAA,KAA8FI,YAAA,uBAAAF,OAA0C8B,OAAA,SAAAC,KAAA,oCAA3hBvI,KAAslBsH,GAAA,sECE1nB,IAuBekB,EAvBUC,EAAQ,OAcjCC,CACEzI,EACAgG,GATF,EAVA,SAAA0C,GACEF,EAAQ,SAaV,KAEA,MAUgC,QChBjBG,YAEO,oBAAXC,QAA0BA,OAAOC,KAC1CD,OAAOC,IAAIC,UAAUH,EAAW1I,KAAM0I","file":"static/js/app.c5d489d7531359a95ae4.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"VueSvgtree\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueSvgtree\"] = factory();\n\telse\n\t\troot[\"VueSvgtree\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","\n\n\n\n\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// src/lib/index.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('div',{ref:\"treeContent\",staticClass:\"draw-area\",attrs:{\"id\":\"treeContent\"}},[_vm._l((_vm.levels),function(arr,index){return _c('div',{key:index},_vm._l((arr),function(v,index){return (!v.parent || v.parent.open)?_c('div',{key:index,staticClass:\"vnode\",class:{pnode: v.children && v.children.length > 0},style:('left:' + (v.left) + 'px; top:' + (v.top) + 'px'),on:{\"click\":function($event){return _vm.toggle(v)}}},[_c('div',{staticClass:\"text\"},[_c('div',{staticClass:\"node_title\"},[_c('span',{staticClass:\"OKR\",class:v.tlevel == '0' ? 'pink':'blue'},[_vm._v(\"\\n \"+_vm._s(v.tlevel == '0' ? 'C' : 'L')+\"\\n \")]),_vm._v(\" \"),_c('span',{staticClass:\"label\"},[_vm._v(\"\\n \"+_vm._s(v.name)+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"node_des\"},[_c('div',[_vm._v(_vm._s(v.content))])]),_vm._v(\" \"),_c('div',{staticClass:\"node_progress\"},[_vm._v(\"\\n \"+_vm._s(v.des)+\"\\n \")]),_vm._v(\" \"),_vm._m(0,true)])]):_vm._e()}),0)}),_vm._v(\" \"),(_vm.curveness)?_c('svg',{attrs:{\"id\":_vm.svgId}},_vm._l((_vm.list),function(link,index){return (link.deep > 0 && link.parent.open)?_c('line',{staticClass:\"link\",attrs:{\"x1\":link.left + 90,\"y1\":link.top,\"x2\":link.parent.left + 105,\"y2\":link.parent.top + 150,\"stroke\":link.color ? link.color : '#aaa',\"stroke-width\":link.strokeWidth ? link.strokeWidth : '1px'}}):_vm._e()}),0):_vm._e(),_vm._v(\" \"),(!_vm.curveness)?_c('svg',{attrs:{\"id\":_vm.svgId}},_vm._l((_vm.list),function(link,index){return (link.deep > 0 && link.parent.open)?_c('path',{staticClass:\"link\",attrs:{\"d\":link.path,\"stroke\":link.color ? link.color : '#aaa',\"stroke-width\":link.strokeWidth ? link.strokeWidth : '1px'}}):_vm._e()}),0):_vm._e()],2)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"showTips\"},[_c('a',{staticClass:\"tips_icon icon_edit \",attrs:{\"target\":\"_blank\",\"href\":\"https://www.cnblogs.com/calamus\"}},[_vm._v(\"\\n B\\n \")]),_vm._v(\" \"),_c('a',{staticClass:\"tips_icon icon_edit \",attrs:{\"target\":\"_blank\",\"href\":\"https://www.calamus.xyz\"}},[_vm._v(\"\\n C\\n \")]),_vm._v(\" \"),_c('a',{staticClass:\"tips_icon icon_edit \",attrs:{\"target\":\"_blank\",\"href\":\"https://github.com/calamus0427\"}},[_vm._v(\"\\n G\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-2fbe735b\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/lib/index.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-2fbe735b\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./index.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./index.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./index.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-2fbe735b\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./index.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/lib/index.vue\n// module id = null\n// module chunks = ","// import VueSvgTree from './index.vue'\n\n// /* istanbul ignore next */\n// VueSvgTree.install = function(Vue) {\n// Vue.component(VueSvgTree.name, VueSvgTree);\n// }\n\n// export default VueSvgTree\n\nimport VueSvgTree from './index.vue';\nexport default VueSvgTree;\n\nif (typeof window !== 'undefined' && window.Vue) {\n window.Vue.component(VueSvgTree.name, VueSvgTree);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/index.js"],"sourceRoot":""} -------------------------------------------------------------------------------- /dist/static/js/manifest.f13e4d0131d6e7563fda.js: -------------------------------------------------------------------------------- 1 | !function(e){var r=window.webpackJsonpVueSvgtree;window.webpackJsonpVueSvgtree=function(n,u,c){for(var f,i,p,a=0,l=[];avue-pack-try
-------------------------------------------------------------------------------- /example/static/css/app.dd870e83d2d18ad7e43a150936800b79.css: -------------------------------------------------------------------------------- 1 | #app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50}h1[data-v-3e5cda44],h2[data-v-3e5cda44]{font-weight:400}ul[data-v-3e5cda44]{list-style-type:none;padding:0}li[data-v-3e5cda44]{display:inline-block;margin:0 10px}a[data-v-3e5cda44]{color:#42b983}body,html{padding:0;margin:0;height:100%;font-size:14px}.draw-area{position:relative;width:100%;height:calc(100vh - 100px);margin:40px auto}svg{z-index:0}.vnode{position:absolute;z-index:100;top:10px;left:10px;height:160px;margin:0;margin-top:-10px;font-size:13px;line-height:20px;border-radius:3px;background:#fff;box-shadow:1px 2px 10px 3px rgba(0,0,0,.08);transition:top .3s;cursor:pointer;width:auto}.vnode .text{padding:0 10px}.pnode:after{content:"";position:absolute;bottom:0;left:0;display:inline-block;width:216px;height:1px;background:#e1244e}.link{fill-opacity:0}.tip{display:block;padding:5px;border:1px solid #eee;line-height:20px;border-radius:5px;background:transparent}.tip,.vnode:hover{z-index:999}.vnode:hover .tip{display:block}.ruler-head{font-size:14px;text-align:left}.ruler-head span{display:inline-block;width:50px;text-align:center}.ruler{width:44px;margin-top:10px;margin-left:10px}.ruler,.ruler-ruler{position:relative;display:inline-block;height:100px}.ruler-ruler{right:10px;left:5px;width:10px;background:#9a9797}.ruler-deg{position:absolute;top:50px;left:0;width:0;height:10px;margin-top:-5px;padding-left:3px;border-left:20px solid #666;font-size:10px;line-height:10px;text-align:center;color:#666;background:transparent;cursor:row-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none}.vnode .text{position:relative;height:100%;max-width:230px}.vnode .text .node_title{padding:3px 11px 0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.vnode .text .node_title .OKR{display:inline-block;width:35px;height:35px;border-radius:50%;color:#fff;line-height:35px;text-align:center;font-size:1.2rem}.vnode .text .node_title .OKR.pink{background-color:#e1244e}.vnode .text .node_title .OKR.blue{background-color:#58c2ef}.vnode .text .node_title .label{max-width:130px;height:40px;line-height:40px;padding-left:10px;font-size:1rem;color:#1f1f1f}.vnode .text .node_title .label,.vnode .text .node_title .label button{overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap}.vnode .text .node_title .label button{color:#1f1f1f!important;width:140px;line-height:35px;text-align:left}.vnode .text .node_des{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:56px;height:60px;color:#777;font-size:12px;-ms-flex-pack:start;justify-content:start}.vnode .text .node_des div{width:140px;text-align:left}.vnode .text .node_des div:nth-child(2){margin-top:5px}.vnode .text .node_progress{position:absolute;width:200px;bottom:0;height:40px;border-top:1px solid #d8d8d8;line-height:40px}.vnode .text .node_progress .el-progress{display:inline}.vnode .text .node_progress .el-progress .el-progress__text{font-size:12px!important;color:#777!important}.vnode .text .showTips{position:absolute;left:225px;top:0;opacity:0}.vnode .text .showTips a{display:inline-block}.vnode .text .showTips .tips_icon{display:inline-block;width:20px;height:20px;line-height:20px;text-align:center;text-decoration:none;padding:3px;background:#fff;box-shadow:1px 2px 10px 3px rgba(0,0,0,.08);transition:all .5s ease 0s;color:#777}.vnode .text .showTips .tips_icon:hover{color:#58c2ef}.vnode .text:hover .showTips{opacity:1}.el-progress__text{font-size:12px!important;color:#777!important} 2 | /*# sourceMappingURL=app.dd870e83d2d18ad7e43a150936800b79.css.map */ -------------------------------------------------------------------------------- /example/static/css/app.dd870e83d2d18ad7e43a150936800b79.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["app.dd870e83d2d18ad7e43a150936800b79.css"],"names":[],"mappings":"AACA,KACE,8CAAoD,AACpD,mCAAoC,AACpC,k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A6B,AAC7B,UAAe,CAChB,AACD,wCACE,aAAe,CAChB,AACD,6BACE,SAAW,CACZ,AACD,mBACE,yBAA2B,AAC3B,oBAA0B,CAC3B","file":"app.dd870e83d2d18ad7e43a150936800b79.css","sourcesContent":["\n#app {\n font-family: 'Avenir', Helvetica, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: #2c3e50;\n}\n\nh1[data-v-3e5cda44], h2[data-v-3e5cda44] {\n font-weight: normal;\n}\nul[data-v-3e5cda44] {\n list-style-type: none;\n padding: 0;\n}\nli[data-v-3e5cda44] {\n display: inline-block;\n margin: 0 10px;\n}\na[data-v-3e5cda44] {\n color: #42b983;\n}\n\nhtml, body {\n padding: 0;\n margin: 0;\n height: 100%;\n font-size: 14px;\n}\n.draw-area {\n position: relative;\n width:100%;\n height:calc( 100vh - 100px );\n margin:40px auto;\n}\nsvg {\n z-index: 0;\n}\n.vnode {\n position: absolute;\n z-index: 100;\n top: 10px;\n left: 10px;\n height: 160px;\n margin: 0;\n margin-top: -10px;\n font-size: 13px;\n line-height: 20px;\n border-radius: 3px;\n background: #FFFFFF;\n -webkit-box-shadow: 1px 2px 10px 3px rgba(0,0,0,0.08);\n box-shadow: 1px 2px 10px 3px rgba(0,0,0,0.08);;\n -webkit-transition: top .3s;;\n transition: top .3s;\n cursor: pointer;\n width: auto ;\n /* width: 230px;\n overflow:hidden; */\n}\n.vnode .text {\n padding: 0 10px;\n}\n.pnode::after {\n content: \"\";\n position: absolute;\n bottom: 0;\n left:0;\n display: inline-block;\n width: 216px;\n height: 1px;\n background: #E1244E;\n}\n.link {\n fill-opacity: 0;\n}\n.tip {\n z-index: 999;\n display: block;\n padding: 5px;\n border: 1px solid #eee;\n line-height: 20px;\n border-radius: 5px;\n background: transparent;\n}\n.vnode:hover {\n z-index: 999;\n}\n.vnode:hover .tip {\n display: block;\n}\n/**ruler部分*/\n.ruler-head {\n font-size: 14px;\n text-align: left;\n}\n.ruler-head span {\n display: inline-block;\n width: 50px;\n text-align: center;\n}\n.ruler {\n position: relative;\n display: inline-block;\n width: 44px;\n height: 100px;\n margin-top: 10px;\n margin-left: 10px;\n}\n.ruler-ruler {\n position: relative;\n right: 10px;\n left: 5px;\n display: inline-block;\n width: 10px;\n height: 100px;\n background: #9a9797;\n}\n.ruler-deg {\n position: absolute;\n top: 50px;\n left: 0;\n width: 0;\n width: 0;\n height: 10px;\n margin-top: -5px;\n padding-left: 3px;\n border-left: 20px solid #666;\n font-size: 10px;\n line-height: 10px;\n text-align: center;\n color: #666;\n background: transparent;\n cursor: row-resize;\n -webkit-user-select: none; /* Chrome/Safari/Opera */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none;\n user-select: none;\n\n -webkit-touch-callout: none; /* iOS Safari */\n}\n.vnode .text {\n position: relative;\n height: 100%;\n max-width: 230px;\n}\n.vnode .text .node_title {\n padding: 3px 11px 0px 11px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n.vnode .text .node_title .OKR {\n display: inline-block;\n width: 35px;\n height: 35px;\n border-radius: 50%;\n color: #fff;\n line-height: 35px;\n text-align: center;\n font-size: 1.2rem;\n}\n.vnode .text .node_title .OKR.pink {\n background-color: #E1244E;\n}\n.vnode .text .node_title .OKR.blue {\n background-color: #58C2EF;\n}\n.vnode .text .node_title .label {\n max-width: 130px;\n height: 40px;\n line-height: 40px;\n overflow: hidden;\n padding-left: 10px;\n font-size: 1rem;\n color: #1F1F1F;\n display: inline-block;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vnode .text .node_title .label button {\n overflow: hidden;\n color: #1F1F1F !important;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 140px;\n display: inline-block;\n line-height: 35px;\n text-align: left;\n}\n.vnode .text .node_des {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n margin-left: 56px;\n height: 60px;\n color: #777777;\n font-size: 12px;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: start;\n}\n.vnode .text .node_des div {\n width: 140px;\n text-align: left;\n}\n.vnode .text .node_des div:nth-child(2) {\n margin-top: 5px;\n}\n.vnode .text .node_progress {\n position: absolute;\n width: 200px;\n bottom: 0px;\n height: 40px;\n border-top: 1px solid #D8D8D8;\n line-height: 40px;\n}\n.vnode .text .node_progress .el-progress {\n display: inline;\n}\n.vnode .text .node_progress .el-progress .el-progress__text {\n font-size: 12px !important;\n color: #777777 !important;\n}\n.vnode .text .showTips {\n position: absolute;\n left: 225px;\n top: 0px;\n opacity: 0;\n}\n.vnode .text .showTips a {\n display: inline-block;\n}\n.vnode .text .showTips .tips_icon {\n display: inline-block;\n width: 20px;\n height: 20px;\n line-height: 20px;\n text-align: center;\n text-decoration: none;\n padding: 3px;\n background: #FFFFFF;\n -webkit-box-shadow: 1px 2px 10px 3px rgba(0, 0, 0, 0.08);\n box-shadow: 1px 2px 10px 3px rgba(0, 0, 0, 0.08);\n -webkit-transition: all 0.5s ease 0s;\n transition: all 0.5s ease 0s;\n color: #777777;\n}\n.vnode .text .showTips .tips_icon:hover {\n color: #58C2EF;\n}\n.vnode .text:hover .showTips {\n opacity: 1;\n}\n.el-progress__text {\n font-size: 12px !important;\n color: #777777 !important;\n}\n"]} -------------------------------------------------------------------------------- /example/static/js/app.5c5463d855fa5c7c0f66.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([1],{NHnr:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("7+uW"),l={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("router-view")],1)},staticRenderFns:[]};var i=a("VU/8")({name:"App"},l,!1,function(e){a("W43E")},null,null).exports,r=a("/ocq"),o=a("vp0u"),s=[{id:100,name:"Calamus",des:"www.calamus.xyz",color:"#E1244E",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,delay:120,fatherId:0,tlevel:1},{id:101,name:"Calamus1",des:"www.calamus.xyz",color:"#E1244E",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:0,fatherId:100,tlevel:1},{id:102,name:"Calamus2",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:100,fatherId:100,tlevel:0},{id:103,name:"Calamus3",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:100,tlevel:0},{id:104,name:"Calamus4",des:"www.calamus.xyz",color:"#E1244E",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:200,fatherId:100,tlevel:0},{id:105,name:"Calamus5",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:101,tlevel:0},{id:106,name:"Calamus6",des:"www.calamus.xyz",color:"#E1244E",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:102,tlevel:0},{id:107,name:"Calamus7",des:"www.calamus.xyz",color:"#E1244E",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:102,tlevel:0},{id:108,name:"Calamus8",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:102,tlevel:0},{id:109,name:"Calamus9",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:102,tlevel:0},{id:110,name:"Calamus10",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:102,tlevel:0},{id:111,name:"Calamus11",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:102,tlevel:0},{id:112,name:"Calamus12",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:300,fatherId:103,tlevel:0},{id:113,name:"Calamus13",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:103,tlevel:0},{id:114,name:"Calamus14",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:108,tlevel:0},{id:116,name:"Calamus15",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:108,tlevel:0},{id:117,name:"Calamus16",des:"www.calamus.xyz",color:"#aaa",content:"你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你",value:123,fatherId:108,tlevel:0}];s.forEach(function(e){e.delay||(e.delay=200*Math.random())});var c=s,d={name:"HelloWorld",components:{VueSvgTree:o.a},data:function(){return{msg:"Welcome to Your Vue.js App",treeData:c}}},h={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("vue-svg-tree",{ref:"svgTree",attrs:{treeData:this.treeData,svgId:"svg"}})],1)},staticRenderFns:[]};var u=a("VU/8")(d,h,!1,function(e){a("xeEF")},"data-v-3e5cda44",null).exports;n.a.use(r.a);var p=new r.a({routes:[{path:"/",name:"HelloWorld",component:u}]});n.a.config.productionTip=!1,new n.a({el:"#app",router:p,components:{App:i},template:""})},W43E:function(e,t){},ayXY:function(e,t){},ue7O:function(e,t,a){"use strict";var n=a("mvHQ"),l=a.n(n),i={name:"VueSvgTree",data:function(){return{rules:{min:200,max:350},delayRules:{min:10,max:300},root:null,list:null,levels:null}},props:{treeData:{type:Array},direction:{type:String,default:"row"},svgId:{type:String,default:"svg"},curveness:{type:Boolean,default:!1}},mounted:function(){this.treeData&&this.treeData.length>0&&this.initData(JSON.parse(l()(this.treeData)))},watch:{treeData:function(e){e&&e.length>0&&this.initData(JSON.parse(l()(e)))}},methods:{compare:function(e,t){return e.deep!==t.deep?e.deep-t.deep:e.parent===t.parent?e.id-t.id:this.compare(e.parent,t.parent)},initData:function(e){var t=this;console.log("data",e);var a={},n=null,l=[];(e||e.length>0)&&(e.forEach(function(e){a[e.id]=e,e.deep=0,e.top=0,e.height=0,e.width=0,e.path="",e.left=0,e.prev=null}),e.forEach(function(e){if(e.fatherId||e.fatherId>0){var l=a[e.fatherId];l.children=l.children||[],l.children.push(e),e.parent=l,e.deep=l.deep+1,e.left="col"==t.direction?300*e.deep+10:0,e.top="row"==t.direction?250*e.deep+5:0,e.open=e.deep<1,e.show=e.deep<2}else n=e,e.open=!0,e.show=!0}),e.sort(this.compare),e.forEach(function(e){l[e.deep]=l[e.deep]||[],l[e.deep].push(e),e.prev=l[e.deep][l[e.deep].length-2]}),this.root=n,this.list=e,console.log("daya",e),this.levels=l,"col"==this.direction?(this.calcHeight(n),this.calcTop(),this.calSvg()):(this.calWidth(n),this.calcLeft(),this.calSvgVer()))},calcHeight:function(e){var t=this,a=0;e.parent&&!e.parent.open?(e.height=0,e.open=!1):e.open||(e.height=50),e.children&&e.children.length>0&&e.children.forEach(function(e){t.calcHeight(e),a+=e.height}),e.open&&(e.height=a||50)},calWidth:function(e){var t=this,a=0;e.parent&&!e.parent.open?(e.height=0,e.width=0,e.open=!1):e.open||(e.width=300),e.children&&e.children.length>0&&e.children.forEach(function(e){t.calWidth(e),a+=e.width}),e.open&&(e.width=a||300)},calSvg:function(){var e=this;this.$nextTick(function(){e.levels.flat(1/0).filter(function(e){return e.show}).sort(function(e,t){return t.top-e.top})[0].top;var t=document.getElementById(e.svgId);console.log("svg",t),t.setAttribute("height",500),t.setAttribute("width",700),e.$emit("toggle",e.$refs.treeContent.scrollWidth,e.root.height)})},calSvgVer:function(){var e=this;this.$nextTick(function(){e.levels.flat(1/0).filter(function(e){return e.show}).sort(function(e,t){return t.top-e.top})[0].top;var t=document.getElementById(e.svgId);t.setAttribute("height",e.$refs.treeContent.scrollHeight),t.setAttribute("width",e.root.width),e.$emit("toggle",{width:e.root.width,height:e.$refs.treeContent.scrollHeight})})},calcTop:function(e,t){if(e||(e=this.root),t=t||0,e.top=t+e.height/2,e.children&&e.children.length>0)for(var a=0;a0)for(var a=0;al?r+5:r-5;e.path=r==l?"M"+r+","+o+" L "+l+","+i:"M"+r+","+o+" Q "+c+","+(o-30)+" "+s+","+(o-30)+" T "+l+","+i}},toggle:function(e){e.open=!e.open,console.log("vnode",e),e.children&&e.children.map(function(e){e.show=!e.show}),"col"==this.direction?(this.calcHeight(this.root),this.calcTop(),this.calSvg()):(this.calWidth(this.root),this.calcLeft(),this.calSvgVer()),console.log("toggle:",e,e.open)},showDetail:function(e){delete e.children,this.$emit("detail",e)},addTarget:function(e){delete e.children,console.log("1111111",e),this.$emit("add",e)},editTarget:function(e){delete e.children,console.log("2222222",e),this.$emit("edit",e)},detailTarget:function(e){delete e.children,this.$emit("detail",e)},refreshTarget:function(e){delete e.children,console.log("3333333",e),this.$emit("refresh",e)}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("div",{ref:"treeContent",staticClass:"draw-area",attrs:{id:"treeContent"}},[e._l(e.levels,function(t,n){return a("div",{key:n},e._l(t,function(t,n){return!t.parent||t.parent.open?a("div",{key:n,staticClass:"vnode",class:{pnode:t.children&&t.children.length>0},style:"left:"+t.left+"px; top:"+t.top+"px",on:{click:function(a){return e.toggle(t)}}},[a("div",{staticClass:"text"},[a("div",{staticClass:"node_title"},[a("span",{staticClass:"OKR",class:"0"==t.tlevel?"pink":"blue"},[e._v("\n "+e._s("0"==t.tlevel?"C":"L")+"\n ")]),e._v(" "),a("span",{staticClass:"label"},[e._v("\n "+e._s(t.name)+"\n ")])]),e._v(" "),a("div",{staticClass:"node_des"},[a("div",[e._v(e._s(t.content))])]),e._v(" "),a("div",{staticClass:"node_progress"},[e._v("\n "+e._s(t.des)+"\n ")]),e._v(" "),e._m(0,!0)])]):e._e()}),0)}),e._v(" "),e.curveness?a("svg",{attrs:{id:e.svgId}},e._l(e.list,function(t,n){return t.deep>0&&t.parent.open?a("line",{staticClass:"link",attrs:{x1:t.left+90,y1:t.top,x2:t.parent.left+105,y2:t.parent.top+150,stroke:t.color?t.color:"#aaa","stroke-width":t.strokeWidth?t.strokeWidth:"1px"}}):e._e()}),0):e._e(),e._v(" "),e.curveness?e._e():a("svg",{attrs:{id:e.svgId}},e._l(e.list,function(t,n){return t.deep>0&&t.parent.open?a("path",{staticClass:"link",attrs:{d:t.path,stroke:t.color?t.color:"#aaa","stroke-width":t.strokeWidth?t.strokeWidth:"1px"}}):e._e()}),0)],2)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"showTips"},[t("a",{staticClass:"tips_icon icon_edit ",attrs:{target:"_blank",href:"https://www.cnblogs.com/calamus"}},[this._v("\n B\n ")]),this._v(" "),t("a",{staticClass:"tips_icon icon_edit ",attrs:{target:"_blank",href:"https://www.calamus.xyz"}},[this._v("\n C\n ")]),this._v(" "),t("a",{staticClass:"tips_icon icon_edit ",attrs:{target:"_blank",href:"https://github.com/calamus0427"}},[this._v("\n G\n ")])])}]};var o=a("VU/8")(i,r,!1,function(e){a("ayXY")},null,null);t.a=o.exports},xeEF:function(e,t){}},["NHnr"]); 2 | //# sourceMappingURL=app.5c5463d855fa5c7c0f66.js.map -------------------------------------------------------------------------------- /example/static/js/app.5c5463d855fa5c7c0f66.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./src/App.vue?012a","webpack:///./src/App.vue","webpack:///src/App.vue","webpack:///./src/components/list.js","webpack:///src/components/HelloWorld.vue","webpack:///./src/components/HelloWorld.vue?32ab","webpack:///./src/components/HelloWorld.vue","webpack:///./src/router/index.js","webpack:///./src/main.js","webpack:///node_modules/vue-svg-tree/src/lib/index.vue","webpack:///./node_modules/vue-svg-tree/src/lib/index.vue?ba7c","webpack:///./node_modules/vue-svg-tree/src/lib/index.vue"],"names":["selectortype_template_index_0_src_App","render","_h","this","$createElement","_c","_self","attrs","id","staticRenderFns","src_App","__webpack_require__","normalizeComponent","name","ssrContext","listData","des","color","content","value","delay","fatherId","tlevel","forEach","v","Math","random","list","HelloWorld","components","VueSvgTree","lib","data","msg","treeData","components_HelloWorld","ref","svgId","src_components_HelloWorld","HelloWorld_normalizeComponent","Vue","use","Router","router","routes","path","component","config","productionTip","el","App","template","rules","min","max","delayRules","root","levels","props","type","Array","direction","String","default","curveness","Boolean","mounted","length","initData","JSON","parse","stringify_default","watch","val","methods","compare","v1","v2","deep","parent","_this","console","log","keys","top","height","width","left","prev","p","children","push","open","show","sort","calcHeight","calcTop","calSvg","calWidth","calcLeft","calSvgVer","vnode","me","_this2","$nextTick","flat","Infinity","filter","item","a","b","svg","document","getElementById","setAttribute","$emit","$refs","treeContent","scrollWidth","_this3","scrollHeight","prevHeight","i","pLeft","pTop","mLeft","prevWidth","vLeft","vTop","x1","toggle","map","child","showDetail","addTarget","editTarget","detailTarget","refreshTarget","src_lib","_vm","staticClass","_l","arr","index","key","class","pnode","style","on","click","$event","_v","_s","_m","_e","link","y1","x2","y2","stroke","stroke-width","strokeWidth","d","target","href","Component","__webpack_exports__"],"mappings":"qHAGeA,GADEC,OAFjB,WAA0B,IAAaC,EAAbC,KAAaC,eAA0BC,EAAvCF,KAAuCG,MAAAD,IAAAH,EAAwB,OAAAG,EAAA,OAAiBE,OAAOC,GAAA,SAAYH,EAAA,oBAE5GI,oBCCjB,IAuBeC,EAvBUC,EAAQ,OAcjCC,ECTAC,KAAA,ODWEb,GATF,EAVA,SAAAc,GACEH,EAAQ,SAaV,KAEA,MAUgC,gCE1B5BI,IACDP,GAAI,IAAKK,KAAM,UAAYG,IAAI,kBAAkBC,MAAM,UAAUC,QAAQ,6BAA8BC,MAAO,IAAKC,MAAO,IAAKC,SAAU,EAAEC,OAAO,IAClJd,GAAI,IAAKK,KAAM,WAAYG,IAAI,kBAAkBC,MAAM,UAAUC,Q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UrJ,EAAA,OAAqDE,OAAOC,GAAAmI,EAAAtG,QAAgBsG,EAAAE,GAAAF,EAAA,cAAAgB,EAAAZ,GAAwC,OAAAY,EAAA7E,KAAA,GAAA6E,EAAA5E,OAAAa,KAAAvF,EAAA,QAAsDuI,YAAA,OAAArI,OAA0B2J,EAAAP,EAAA9G,KAAAkH,OAAAJ,EAAA1I,MAAA0I,EAAA1I,MAAA,OAAA+I,eAAAL,EAAAM,YAAAN,EAAAM,YAAA,SAAoHtB,EAAAe,OAAW,UAEn1DjJ,iBADjB,WAAoC,IAAaP,EAAbC,KAAaC,eAA0BC,EAAvCF,KAAuCG,MAAAD,IAAAH,EAAwB,OAAAG,EAAA,OAAiBuI,YAAA,aAAuBvI,EAAA,KAAUuI,YAAA,uBAAArI,OAA0C4J,OAAA,SAAAC,KAAA,qCAA3JjK,KAAuNoJ,GAAA,iEAAvNpJ,KAAuNoJ,GAAA,KAAAlJ,EAAA,KAA8FuI,YAAA,uBAAArI,OAA0C4J,OAAA,SAAAC,KAAA,6BAA/VjK,KAAmZoJ,GAAA,iEAAnZpJ,KAAmZoJ,GAAA,KAAAlJ,EAAA,KAA8FuI,YAAA,uBAAArI,OAA0C4J,OAAA,SAAAC,KAAA,oCAA3hBjK,KAAslBoJ,GAAA,sECE1nB,IAcAc,EAdyB1J,EAAQ,OAcjCC,CACEmB,EACA2G,GATF,EAVA,SAAA5H,GACEH,EAAQ,SAaV,KAEA,MAUe2J,EAAA,EAAAD,EAAiB","file":"static/js/app.5c5463d855fa5c7c0f66.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('router-view')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-0dc5660f\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-0dc5660f\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../node_modules/vue-loader/lib/selector?type=styles&index=0!./App.vue\")\n}\nvar normalizeComponent = require(\"!../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\nimport __vue_script__ from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\n/* template */\nimport __vue_template__ from \"!!../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-0dc5660f\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../node_modules/vue-loader/lib/selector?type=template&index=0!./App.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/App.vue\n// module id = null\n// module chunks = ","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// src/App.vue","var listData = [\n {id: 100, name: 'Calamus', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你', value: 123, delay: 120, fatherId: 0,tlevel:1},\n {id: 101, name: 'Calamus1', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 0, fatherId: 100,tlevel:1},\n {id: 102, name: 'Calamus2', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 100, fatherId: 100,tlevel:0},\n {id: 103, name: 'Calamus3', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 100,tlevel:0},\n {id: 104, name: 'Calamus4', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 200, fatherId: 100,tlevel:0},\n {id: 105, name: 'Calamus5', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 101,tlevel:0},\n {id: 106, name: 'Calamus6', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0},\n {id: 107, name: 'Calamus7', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0},\n {id: 108, name: 'Calamus8', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0},\n {id: 109, name: 'Calamus9', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0},\n {id: 110, name: 'Calamus10', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0},\n {id: 111, name: 'Calamus11', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0},\n {id: 112, name: 'Calamus12', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 300, fatherId: 103,tlevel:0},\n {id: 113, name: 'Calamus13', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 103,tlevel:0},\n {id: 114, name: 'Calamus14', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 108,tlevel:0},\n {id: 116, name: 'Calamus15', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 108,tlevel:0},\n {id: 117, name: 'Calamus16', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 108,tlevel:0},\n];\nlistData.forEach(function (v) {\n if (!v.delay) {\n v.delay = 200 * Math.random();\n }\n});\nexport const list = listData\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/list.js","\n\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// src/components/HelloWorld.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('vue-svg-tree',{ref:\"svgTree\",attrs:{\"treeData\":_vm.treeData,\"svgId\":\"svg\"}})],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-3e5cda44\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/HelloWorld.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-3e5cda44\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./HelloWorld.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./HelloWorld.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./HelloWorld.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-3e5cda44\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./HelloWorld.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-3e5cda44\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/HelloWorld.vue\n// module id = null\n// module chunks = ","import Vue from 'vue'\nimport Router from 'vue-router'\nimport HelloWorld from '@/components/HelloWorld'\n\nVue.use(Router)\n\nexport default new Router({\n routes: [\n {\n path: '/',\n name: 'HelloWorld',\n component: HelloWorld\n }\n ]\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/router/index.js","// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport Vue from 'vue'\nimport App from './App'\nimport router from './router'\n\nVue.config.productionTip = false\n\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n router,\n components: { App },\n template: ''\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js","\n\n\n\n\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// node_modules/vue-svg-tree/src/lib/index.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('div',{ref:\"treeContent\",staticClass:\"draw-area\",attrs:{\"id\":\"treeContent\"}},[_vm._l((_vm.levels),function(arr,index){return _c('div',{key:index},_vm._l((arr),function(v,index){return (!v.parent || v.parent.open)?_c('div',{key:index,staticClass:\"vnode\",class:{pnode: v.children && v.children.length > 0},style:('left:' + (v.left) + 'px; top:' + (v.top) + 'px'),on:{\"click\":function($event){return _vm.toggle(v)}}},[_c('div',{staticClass:\"text\"},[_c('div',{staticClass:\"node_title\"},[_c('span',{staticClass:\"OKR\",class:v.tlevel == '0' ? 'pink':'blue'},[_vm._v(\"\\n \"+_vm._s(v.tlevel == '0' ? 'C' : 'L')+\"\\n \")]),_vm._v(\" \"),_c('span',{staticClass:\"label\"},[_vm._v(\"\\n \"+_vm._s(v.name)+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"node_des\"},[_c('div',[_vm._v(_vm._s(v.content))])]),_vm._v(\" \"),_c('div',{staticClass:\"node_progress\"},[_vm._v(\"\\n \"+_vm._s(v.des)+\"\\n \")]),_vm._v(\" \"),_vm._m(0,true)])]):_vm._e()}),0)}),_vm._v(\" \"),(_vm.curveness)?_c('svg',{attrs:{\"id\":_vm.svgId}},_vm._l((_vm.list),function(link,index){return (link.deep > 0 && link.parent.open)?_c('line',{staticClass:\"link\",attrs:{\"x1\":link.left + 90,\"y1\":link.top,\"x2\":link.parent.left + 105,\"y2\":link.parent.top + 150,\"stroke\":link.color ? link.color : '#aaa',\"stroke-width\":link.strokeWidth ? link.strokeWidth : '1px'}}):_vm._e()}),0):_vm._e(),_vm._v(\" \"),(!_vm.curveness)?_c('svg',{attrs:{\"id\":_vm.svgId}},_vm._l((_vm.list),function(link,index){return (link.deep > 0 && link.parent.open)?_c('path',{staticClass:\"link\",attrs:{\"d\":link.path,\"stroke\":link.color ? link.color : '#aaa',\"stroke-width\":link.strokeWidth ? link.strokeWidth : '1px'}}):_vm._e()}),0):_vm._e()],2)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"showTips\"},[_c('a',{staticClass:\"tips_icon icon_edit \",attrs:{\"target\":\"_blank\",\"href\":\"https://www.cnblogs.com/calamus\"}},[_vm._v(\"\\n B\\n \")]),_vm._v(\" \"),_c('a',{staticClass:\"tips_icon icon_edit \",attrs:{\"target\":\"_blank\",\"href\":\"https://www.calamus.xyz\"}},[_vm._v(\"\\n C\\n \")]),_vm._v(\" \"),_c('a',{staticClass:\"tips_icon icon_edit \",attrs:{\"target\":\"_blank\",\"href\":\"https://github.com/calamus0427\"}},[_vm._v(\"\\n G\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-c49d3a12\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./node_modules/vue-svg-tree/src/lib/index.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-c49d3a12\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../../vue-loader/lib/selector?type=styles&index=0!./index.vue\")\n}\nvar normalizeComponent = require(\"!../../../vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../vue-loader/lib/selector?type=script&index=0!./index.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../vue-loader/lib/selector?type=script&index=0!./index.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-c49d3a12\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../vue-loader/lib/selector?type=template&index=0!./index.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-svg-tree/src/lib/index.vue\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /example/static/js/manifest.3ad1d5771e9b13dbdad2.js: -------------------------------------------------------------------------------- 1 | !function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a 2 | 3 | 4 | 5 | 6 | vue-svg-tree 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-svg-tree", 3 | "version": "1.0.2", 4 | "description": "A Vue.js project", 5 | "author": "calamus0427 <1211994507@qq.com>", 6 | "private": false, 7 | "main": "src/lib/index.js", 8 | "scripts": { 9 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 10 | "start": "npm run dev", 11 | "build": "node build/build.js" 12 | }, 13 | "dependencies": { 14 | "vue": "^2.5.2", 15 | "vue-router": "^3.0.1" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/calamus0427/vue-svg-tree.git" 20 | }, 21 | "files": [ 22 | "dist", 23 | "src", 24 | "example" 25 | ], 26 | "keywords": [ 27 | "vue", 28 | "tree", 29 | "calamus", 30 | "svg" 31 | ], 32 | "homepage": "https://github.com/calamus0427/vue-svg-tree#readme", 33 | "license": "MIT", 34 | "devDependencies": { 35 | "autoprefixer": "^7.1.2", 36 | "babel-core": "^6.22.1", 37 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 38 | "babel-loader": "^7.1.1", 39 | "babel-plugin-syntax-jsx": "^6.18.0", 40 | "babel-plugin-transform-runtime": "^6.22.0", 41 | "babel-plugin-transform-vue-jsx": "^3.5.0", 42 | "babel-preset-env": "^1.3.2", 43 | "babel-preset-stage-2": "^6.22.0", 44 | "chalk": "^2.0.1", 45 | "copy-webpack-plugin": "^4.0.1", 46 | "css-loader": "^0.28.0", 47 | "extract-text-webpack-plugin": "^3.0.0", 48 | "file-loader": "^1.1.4", 49 | "friendly-errors-webpack-plugin": "^1.6.1", 50 | "html-webpack-plugin": "^2.30.1", 51 | "node-notifier": "^5.1.2", 52 | "optimize-css-assets-webpack-plugin": "^3.2.0", 53 | "ora": "^1.2.0", 54 | "portfinder": "^1.0.13", 55 | "postcss-import": "^11.0.0", 56 | "postcss-loader": "^2.0.8", 57 | "postcss-url": "^7.2.1", 58 | "rimraf": "^2.6.0", 59 | "semver": "^5.3.0", 60 | "shelljs": "^0.7.6", 61 | "uglifyjs-webpack-plugin": "^1.1.1", 62 | "url-loader": "^0.5.8", 63 | "vue-loader": "^13.3.0", 64 | "vue-style-loader": "^3.0.1", 65 | "vue-template-compiler": "^2.5.2", 66 | "webpack": "^3.6.0", 67 | "webpack-bundle-analyzer": "^2.9.0", 68 | "webpack-dev-server": "^2.9.1", 69 | "webpack-merge": "^4.1.0" 70 | }, 71 | "engines": { 72 | "node": ">= 6.0.0", 73 | "npm": ">= 3.0.0" 74 | }, 75 | "browserslist": [ 76 | "> 1%", 77 | "last 2 versions", 78 | "not ie <= 8" 79 | ] 80 | } 81 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 23 | -------------------------------------------------------------------------------- /src/example/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 25 | 26 | -------------------------------------------------------------------------------- /src/example/list.js: -------------------------------------------------------------------------------- 1 | var listData = [ 2 | {id: 100, name: 'Calamus', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你', value: 123, delay: 120, fatherId: 0,tlevel:1}, 3 | {id: 101, name: 'Calamus1', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 0, fatherId: 100,tlevel:1}, 4 | {id: 102, name: 'Calamus2', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 100, fatherId: 100,tlevel:0}, 5 | {id: 103, name: 'Calamus3', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 100,tlevel:0}, 6 | {id: 104, name: 'Calamus4', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 200, fatherId: 100,tlevel:0}, 7 | {id: 105, name: 'Calamus5', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 101,tlevel:0}, 8 | {id: 106, name: 'Calamus6', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0}, 9 | {id: 107, name: 'Calamus7', des:'www.calamus.xyz',color:'#E1244E',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0}, 10 | {id: 108, name: 'Calamus8', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0}, 11 | {id: 109, name: 'Calamus9', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0}, 12 | {id: 110, name: 'Calamus10', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0}, 13 | {id: 111, name: 'Calamus11', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 102,tlevel:0}, 14 | {id: 112, name: 'Calamus12', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 300, fatherId: 103,tlevel:0}, 15 | {id: 113, name: 'Calamus13', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 103,tlevel:0}, 16 | {id: 114, name: 'Calamus14', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 108,tlevel:0}, 17 | {id: 116, name: 'Calamus15', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 108,tlevel:0}, 18 | {id: 117, name: 'Calamus16', des:'www.calamus.xyz',color:'#aaa',content:'你可以选择爱我或者不爱我,而我只能选择爱你或者更爱你',value: 123, fatherId: 108,tlevel:0}, 19 | ] 20 | listData.forEach(function (v) { 21 | if (!v.delay) { 22 | v.delay = 200 * Math.random(); 23 | } 24 | }); 25 | export const list = listData 26 | -------------------------------------------------------------------------------- /src/lib/index.js: -------------------------------------------------------------------------------- 1 | // import VueSvgTree from './index.vue' 2 | 3 | // /* istanbul ignore next */ 4 | // VueSvgTree.install = function(Vue) { 5 | // Vue.component(VueSvgTree.name, VueSvgTree); 6 | // } 7 | 8 | // export default VueSvgTree 9 | 10 | import VueSvgTree from './index.vue'; 11 | export default VueSvgTree; 12 | 13 | if (typeof window !== 'undefined' && window.Vue) { 14 | window.Vue.component(VueSvgTree.name, VueSvgTree); 15 | } 16 | -------------------------------------------------------------------------------- /src/lib/index.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 49 | 50 | 359 | 360 | 590 | 591 | 592 | -------------------------------------------------------------------------------- /src/lib/ruler.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 标尺选择工具 3 | * @author muzhilong 4 | */ 5 | import Vue from 'vue' 6 | 7 | /* global Vue */ 8 | Vue.component('ruler', { 9 | template: '

{{vmin}}{{vmax}}
', 10 | data: function () { 11 | return { 12 | vmin: 0, 13 | vmax: this._max || 100, 14 | startY: 0 15 | }; 16 | }, 17 | computed: { 18 | _min: function () { 19 | return typeof this.min === 'number' ? this.min : 0; 20 | }, 21 | _max: function () { 22 | return typeof this.max === 'number' ? this.max : 100; 23 | }, 24 | minTop: function () { 25 | var all = this._max - this._min; 26 | var now = Math.min(this.vmin, this.vmax); 27 | var percent = (now - this._min) / (this._max - this._min); 28 | return 'top:' + (100 - percent * 100) + 'px'; 29 | }, 30 | maxTop: function () { 31 | var all = this._max - this._min; 32 | var now = Math.max(this.vmin, this.vmax); 33 | var percent = (now - this._min) / (this._max - this._min); 34 | return 'top:' + (100 - percent * 100) + 'px'; 35 | }, 36 | // 1px代表的数值 37 | perPx: function () { 38 | return (this._max - this._min) / 100; 39 | } 40 | }, 41 | props: ['min', 'max', 'value'], 42 | created() { 43 | if (this.value) { 44 | this.vmin = parseFloat(this.value.min); 45 | this.vmax = parseFloat(this.value.max); 46 | if (this.vmin < this._min) { 47 | this.vmin = this._min; 48 | this.emit(); 49 | } 50 | else if (this.vmax > this._max) { 51 | this.vmax = this._max; 52 | this.emit(); 53 | } 54 | } 55 | else { 56 | this.vmin = this._min; 57 | this.vmax = this._max; 58 | } 59 | }, 60 | methods: { 61 | press: function (e) { 62 | this.startY = e.clientY; 63 | this.startDeg = 'v' + e.target.getAttribute('deg'); 64 | }, 65 | move: function (e) { 66 | if (!e.buttons) { 67 | return; 68 | } 69 | 70 | // console.log('drag:', e); 71 | var nowY = e.clientY; 72 | var move = nowY - this.startY; 73 | this.startY = nowY; 74 | var deg = 'v' + e.target.getAttribute('deg'); 75 | if (deg !== this.startDeg) { 76 | return; 77 | } 78 | 79 | if (typeof this[deg] === 'undefined') { 80 | return; 81 | } 82 | 83 | var val = this[deg] - move * this.perPx; 84 | if (val > this._max) { 85 | val = this._max; 86 | } 87 | 88 | if (val < this._min) { 89 | val = this._min; 90 | } 91 | 92 | if (this[deg] !== val) { 93 | this[deg] = val; 94 | if (this.vmin > this.vmax) { 95 | var a = this.vmax; 96 | this.vmax = this.vmin; 97 | this.vmin = a; 98 | } 99 | 100 | clearTimeout(this.timer); 101 | this.timer = setTimeout(this.emit, 100); 102 | } 103 | 104 | }, 105 | emit() { 106 | if (this.value) { 107 | this.value.min = this.vmin; 108 | this.value.max = this.vmax; 109 | } 110 | 111 | this.$emit('update', [this.vmin, this.vmax]); 112 | } 113 | } 114 | }); 115 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | 7 | Vue.config.productionTip = false 8 | 9 | /* eslint-disable no-new */ 10 | new Vue({ 11 | el: '#app', 12 | router, 13 | components: { App }, 14 | template: '' 15 | }) 16 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | 4 | Vue.use(Router) 5 | const _import_ = file => () => import('@/example/' + file + '.vue') 6 | 7 | export default new Router({ 8 | routes: [ 9 | { 10 | path: '/', 11 | name: 'home', 12 | component: _import_('index') 13 | } 14 | ] 15 | }) 16 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calamus0427/vue-svg-tree/b8abe8a28d8608d3184f93ff17863d1db8b25f72/static/.gitkeep -------------------------------------------------------------------------------- /vue-svg-tree-1.0.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calamus0427/vue-svg-tree/b8abe8a28d8608d3184f93ff17863d1db8b25f72/vue-svg-tree-1.0.0.tgz --------------------------------------------------------------------------------