How to cache canvas shapes with Vue

获取Konva最新的信息

If you want to cache a node in vue app, you need to have an access to Konva node and use node.cache() function.

To get an access to a node you can use references and component.getNode() method:

Instruction: try to drag whole stage. Then try again with cached group.

You should see much better performance.

// in template:
<v-group ref="group">
// later in the code:
this.$refs.group.getNode().cache();
Next