File size: 442 Bytes
4d70170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { setupDevtoolsPlugin } from '@vue/devtools-api'

export default {
  install: (app) => {
    setupDevtoolsPlugin({
      id: 'simple-plugin',
      label: 'Simple devtools plugin',
      app,
    }, (api) => {
      api.on.visitComponentTree((payload, ctx) => {
        payload.treeNode.tags.push({
          label: 'simple plugin',
          textColor: 0xFFAAAA,
          backgroundColor: 0xFFEEEE,
        })
      })
    })
  },
}