mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-21 03:48:36 -05:00
feat(ui): vue-cli-ui.js file example
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
module.exports = api => {
|
||||
api.addClientAddon({
|
||||
id: 'vue-webpack',
|
||||
url: 'http://localhost:8042/index.js'
|
||||
})
|
||||
|
||||
api.addView({
|
||||
id: 'vue-webpack-test-view',
|
||||
name: 'test-webpack-route',
|
||||
icon: 'pets',
|
||||
// icon: 'http://localhost:4000/_plugin/%40vue%2Fcli-service/webpack-icon.svg',
|
||||
tooltip: 'Test view from webpack addon'
|
||||
})
|
||||
|
||||
api.onAction('test-action', params => {
|
||||
console.log('test-action called', params)
|
||||
|
||||
setTimeout(() => {
|
||||
api.callAction('other-action', { foo: 'bar' })
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user