2.2.0 • Published 3 years ago

@orh/vue-kityminder v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

demo

Vue 3.x

  1. 安装
$ yarn add @orh/vue-kityminder@2
  1. 引入
import { createApp } from 'vue';
import App from './App.vue';
import VueKityminder from '@orh/vue-kityminder';

createApp(App).use(VueKityminder).mount('#app')
  1. 使用

示例代码

Vue 2.x

  1. 安装
$ yarn add @orh/vue-kityminder@1
  1. 引入
import VueKityminder from '@orh/vue-kityminder';

Vue.use(VueKityminder);

使用

<vue-kityminder
    style="height: 600px"
    ref="kityminder"
    theme="classic"
    template="fish-bone"
    :value="val"
    :toolbar-status="toolbar"
    @content-change="handleContent"
    @node-change="handleNode"
    @node-remove="handleRemove"
    @selection-change="handleSelection"
>
</vue-kityminder>

Props

属性说明类型默认值
value数据格式String
theme主题Stringfresh-blue
template模板Stringfiletree
toolbar-status工具栏的各项显示/隐藏Object{}
  • toolbar-status 选项列表,可根据需要选择性配置
选项功能类型默认值
show整个工具栏booleantrue
left左侧工具栏booleantrue
right右侧工具栏booleantrue
appendSiblingNode插入同级booleantrue
appendChildNode插入下级booleantrue
arrangeUp上移booleantrue
arrangeDown下移booleantrue
removeNode删除booleantrue
text文本框booleantrue
template模板booleantrue
theme主题booleantrue
hand模式booleantrue
resetLayout整理布局booleantrue
zoomOut缩小booleantrue
zoomIn放大booleantrue

Events

事件说明回调参数
content-change新增/编辑/删除时触发事件所有节点数据
node-change新增/编辑时触发事件,其中新增返回的节点 id0当前节点数据
node-remove删除时触发事件当前节点数据
selection-change当前选中的节点当前节点数据
template-change变更模板时触发当前模板标识名
theme-change变更主题时触发当前主题标识名
  • 删除按钮绑定的是双击事件

本地开发/预览

  1. 安装依赖
$ yarn
  1. 运行
$ yarn serve

License

MIT

2.2.0

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago