Skip to content

Commit b0701ab

Browse files
author
Guillaume Chau
committed
feat(ui): vue-cli-ui.js file example
1 parent 7341156 commit b0701ab

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/@vue/cli-ui/vue-cli-ui.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = api => {
2+
api.addClientAddon({
3+
id: 'vue-webpack',
4+
url: 'http://localhost:8042/index.js'
5+
})
6+
7+
api.addView({
8+
id: 'vue-webpack-test-view',
9+
name: 'test-webpack-route',
10+
icon: 'pets',
11+
// icon: 'http://localhost:4000/_plugin/%40vue%2Fcli-service/webpack-icon.svg',
12+
tooltip: 'Test view from webpack addon'
13+
})
14+
15+
api.onAction('test-action', params => {
16+
console.log('test-action called', params)
17+
18+
setTimeout(() => {
19+
api.callAction('other-action', { foo: 'bar' })
20+
}, 1000)
21+
})
22+
}

0 commit comments

Comments
 (0)