|
|
@ -123,14 +123,14 @@ export default {
|
|
|
|
//绘制音频波形图
|
|
|
|
//绘制音频波形图
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
// var wavesurfer = WaveSurfer.create({
|
|
|
|
this.wavesurfer = WaveSurfer.create({
|
|
|
|
// container: this.$refs.waveForm,
|
|
|
|
container: this.$refs.waveForm,
|
|
|
|
// waveColor: "white",
|
|
|
|
waveColor: "white",
|
|
|
|
// progressColor: "#42e8e0",
|
|
|
|
progressColor: "#42e8e0",
|
|
|
|
// cursorColor: "transparent",
|
|
|
|
cursorColor: "transparent",
|
|
|
|
// barWidth: 3
|
|
|
|
barWidth: 3
|
|
|
|
// });
|
|
|
|
});
|
|
|
|
// wavesurfer.load(require("./从别后.mp3"));
|
|
|
|
this.wavesurfer.load(require('./一吻天荒.mp3'));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
@ -141,21 +141,8 @@ export default {
|
|
|
|
//编辑按钮
|
|
|
|
//编辑按钮
|
|
|
|
editSong() {},
|
|
|
|
editSong() {},
|
|
|
|
//试听按钮操做
|
|
|
|
//试听按钮操做
|
|
|
|
listenSong() {
|
|
|
|
listenSong(row) {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.wavesurfer.playPause()
|
|
|
|
var wavesurfer = WaveSurfer.create({
|
|
|
|
|
|
|
|
container: this.$refs.waveForm,
|
|
|
|
|
|
|
|
waveColor: "white",
|
|
|
|
|
|
|
|
progressColor: "#42e8e0",
|
|
|
|
|
|
|
|
cursorColor: "transparent",
|
|
|
|
|
|
|
|
barWidth: 3
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
wavesurfer.load(require("./从别后.mp3"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wavesurfer.on("ready", function() {
|
|
|
|
|
|
|
|
wavesurfer.play();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
download() {},
|
|
|
|
download() {},
|
|
|
|
// 取消按钮
|
|
|
|
// 取消按钮
|
|
|
|