mirror of
https://github.com/kevin-DL/vue-audio-recorder.git
synced 2026-01-23 15:51:26 +00:00
Refactor components
This commit is contained in:
15
src/index.js
15
src/index.js
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user