Coder Social home page Coder Social logo

单音频异步请求,报错,但是音频能播放,Invalid prop: custom validator check failed for prop "music". about vue-aplayer HOT 5 OPEN

xuhua1212 avatar xuhua1212 commented on June 10, 2024
单音频异步请求,报错,但是音频能播放,Invalid prop: custom validator check failed for prop "music".

from vue-aplayer.

Comments (5)

steeveen avatar steeveen commented on June 10, 2024

+1

from vue-aplayer.

EvilDjango avatar EvilDjango commented on June 10, 2024

就是组件会检查music这个属性,检查失败了,所以报错。我的解决方式是:把初始的music对象需要的属性都写上,值设为非空字符串。如下:
music: {
title: ' ',
artist: ' ',
src: ' ',
pic: ' ',
}

from vue-aplayer.

iiesx avatar iiesx commented on June 10, 2024

+1

from vue-aplayer.

iiesx avatar iiesx commented on June 10, 2024

异步请求加载初始化music,报上面的错误,而且请求到数据后,封面都加载显示了,点击播放时NotSupportedError: The element has no supported sources.

from vue-aplayer.

SuccessorZailong avatar SuccessorZailong commented on June 10, 2024

<aplayer v-if="music.src" :music="music"/>

建议 保证 music 实例化后,再渲染 aplayer 组件。

from vue-aplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.