1.0.6 • Published 4 years ago

tree-graph-vue v1.0.6

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago
████████╗██████╗ ███████╗███████╗     ██████╗ ██████╗  █████╗ ██████╗ ██╗  ██╗
╚══██╔══╝██╔══██╗██╔════╝██╔════╝    ██╔════╝ ██╔══██╗██╔══██╗██╔══██╗██║  ██║
   ██║   ██████╔╝█████╗  █████╗█████╗██║  ███╗██████╔╝███████║██████╔╝███████║
   ██║   ██╔══██╗██╔══╝  ██╔══╝╚════╝██║   ██║██╔══██╗██╔══██║██╔═══╝ ██╔══██║
   ██║   ██║  ██║███████╗███████╗    ╚██████╔╝██║  ██║██║  ██║██║     ██║  ██║
   ╚═╝   ╚═╝  ╚═╝╚══════╝╚══════╝     ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝  ╚═╝

tree-graph-vue

vue 樹狀思維導圖組件 Dendrogram Component

在線 DEMO OnlineDemo

編譯 Build Setup

# install dependencies
yarn install

# serve with hot reload at localhost:8080
yarn dev

# build for production with minification
yarn build

安裝 Install

yarn add tree-graph-vue

用法 Usage

<template>
  <div id="app">
    <h3>多列視圖</h3>
    <tree :nodes="nodes" :startId="nodes[0].id" />
    <h3>單列視圖</h3>
    <tree-single :nodes="nodes" :startId="nodes[0].id" />
  </div>
</template>
import TreeGraph from "tree-graph-vue";
Vue.use(TreeGraph);

操作

操作按鍵
新增子節點Tab
新增兄弟節點Enter
刪除節點Delete
保存樹(file 模式)Command/Ctrl + S

組件屬性

屬性說明類型是否必須默認值
nodes節點Array-
startId根節點 idString-
singleColumn是否是單列視圖Booleanfalse
uncontrolled是否為非受控組件Booleantrue
ITEM_HEIGHT節點元素高度Number50
BLOCK_HEIGHT節點塊高度Number30
FONT_SIZE節點字體大小Number14
INDENT縮進Number25
AVATAR_WIDTH頭像寬度Number22
CHECK_BOX_WIDTH勾選框寬度Number18
handleClickNode點擊節點事件Function-
handleClickDot點擊收起/展開事件Function-
handleCheck點擊勾選框事件Function-
handleChangeNodeText更改節點名事件Function-
handleAddNext向後添加兄弟節點事件Function-
handleAddChild添加子節點事件Function-
handleDeleteNode刪除節點事件Function-
handleSave保存樹Function-

節點屬性

屬性說明類型
id節點 idString
text節點文本String
fatherId父節點 idString
children子節點 idArray
contract是否收起子節點Boolean
showAvatar是否顯示頭像Boolean
avatarUri頭像地址String
showCheckbox是否顯示勾選框Boolean
checked是否勾選Boolean
showStatus是否顯示節點狀態Boolean
hour節點(任務)工時Number
limitDay節點(任務)剩余天數Number
1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago