showlrc -> lrc

This commit is contained in:
DIYgod
2018-03-08 00:35:14 +08:00
parent 021df59e85
commit f29066f1b6
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ export default (options) => {
narrow: false,
autoplay: false,
mutex: true,
showlrc: 0,
lrc: 0,
theme: '#b7daff',
loop: 'all',
order: 'list',
+4 -4
View File
@@ -30,7 +30,7 @@ class APlayer {
this.randomOrder = utils.randomOrder(this.options.music.length);
if (this.options.showlrc) {
if (this.options.lrc) {
this.container.classList.add('aplayer-withlrc');
}
if (this.options.music.length > 1) {
@@ -49,7 +49,7 @@ class APlayer {
// save lrc
this.container = this.options.container;
if (this.options.showlrc === 2 || this.options.showlrc === true) {
if (this.options.lrc === 2 || this.options.lrc === true) {
const lrcEle = this.container.getElementsByClassName('aplayer-lrc-content');
for (let i = 0; i < lrcEle.length; i++) {
if (this.options.music[i]) {
@@ -67,10 +67,10 @@ class APlayer {
this.template.time.classList.add('aplayer-time-narrow');
}
if (this.options.showlrc) {
if (this.options.lrc) {
this.lrc = new Lrc({
container: this.template.lrc,
async: this.options.showlrc === 3,
async: this.options.lrc === 3,
content: this.options.music.map((item) => item.lrc),
player: this,
});