Refactor components

This commit is contained in:
Gennady Grishkovtsov
2018-08-09 22:14:12 +03:00
parent 2e1a0a93f9
commit cf55cf8853
7 changed files with 265 additions and 178 deletions

View File

@@ -1,13 +1,22 @@
import AudioRecorder from './audio-recorder.vue'
import AudioPlayer from './components/player.vue'
import AudioRecorder from './components/recorder.vue'
export default {
install: function (Vue) {
const components = {
AudioPlayer,
AudioRecorder,
install (Vue) {
if (this.installed) {
return
}
this.installed = true
Vue.component('audio-player', AudioPlayer)
Vue.component('audio-recorder', AudioRecorder)
}
}
export default components
export { AudioPlayer, AudioRecorder }