he-tree icon indicating copy to clipboard operation
he-tree copied to clipboard

Pro version - example not working

Open GTCrais opened this issue 3 years ago • 1 comments

The example given with the Pro version isn't working because it's written for the old version of the plugin:

import {Tree, // Base tree
  Fold, Check, Draggable, // plugins
} from 'he-tree-vue'
import 'he-tree-vue/dist/he-tree-vue.css' // base style
import DraggablePro from 'yourpath/DraggablePro.vue'

DraggablePro.LICENSE_NUMBER = 'your license number'

export default {
  components: {
    Tree: Tree.mixPlugins([Fold, Check, Draggable, DraggablePro]),
  },
}

Specifically, this has to be replaced:

import {Tree, // Base tree
  Fold, Check, Draggable, // plugins
} from 'he-tree-vue'

with this:

import {Tree, Draggable, BaseTree} from '@he-tree/vue2';

And then BaseTree doesn't have mixPlugins method.

Please give instructions on how to use it with https://github.com/phphe/he-tree/ Vue 2.

GTCrais avatar Mar 01 '22 08:03 GTCrais

I've figured it out - create new Tree.vue component:

<script>
	import { BaseTree, Draggable } from "@he-tree/vue2";
	import DraggablePro from "@/view/components/DraggablePro";
	import '@he-tree/vue2/dist/he-tree-vue2.css';

	export default {
		extends: BaseTree,
		mixins: [Draggable, DraggablePro]
	}
</script>

GTCrais avatar Mar 01 '22 09:03 GTCrais