防止在flex中被挤压变形
This commit is contained in:
		@@ -8,6 +8,7 @@ export default class MusicList {
 | 
				
			|||||||
        this.audio = new Audio()
 | 
					        this.audio = new Audio()
 | 
				
			||||||
        this.audio.autoplay = true
 | 
					        this.audio.autoplay = true
 | 
				
			||||||
        this.audio.controls = true
 | 
					        this.audio.controls = true
 | 
				
			||||||
 | 
					        this.audio.style.flexShrink = 0 // 防止在flex中被挤压变形
 | 
				
			||||||
        this.audio.addEventListener('play', () => {
 | 
					        this.audio.addEventListener('play', () => {
 | 
				
			||||||
            this.event.onplay(this.playing)
 | 
					            this.event.onplay(this.playing)
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
@@ -29,7 +30,6 @@ export default class MusicList {
 | 
				
			|||||||
                whiteSpace: 'nowrap',
 | 
					                whiteSpace: 'nowrap',
 | 
				
			||||||
                overflowX: 'hidden', // 溢出时隐藏
 | 
					                overflowX: 'hidden', // 溢出时隐藏
 | 
				
			||||||
                overflowY: 'auto',   // 溢出时显示滚动条
 | 
					                overflowY: 'auto',   // 溢出时显示滚动条
 | 
				
			||||||
                maxHeight: '70vh',   // 最大高度
 | 
					 | 
				
			||||||
                listStyle: 'disc',   // 实心圆
 | 
					                listStyle: 'disc',   // 实心圆
 | 
				
			||||||
                padding: '0 1.1rem', // 列表左右留白
 | 
					                padding: '0 1.1rem', // 列表左右留白
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user