mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-14 16:36:18 -08:00
添加尺寸错误验证
This commit is contained in:
1 parent
a6816d68fa
commit
a51b0debd9
3 files changed
+14
-9
No files matched your search
@@ -715,11 +715,10 @@
|
||||
errorHandle(this.$container, "No container element found by ".concat(art.option.container));
|
||||
}
|
||||
|
||||
if (art.constructor.instances.some(function (art) {
|
||||
return art.template.$container === _this.$container;
|
||||
})) {
|
||||
errorHandle(false, 'Cannot mount multiple instances on the same dom element');
|
||||
}
|
||||
errorHandle(art.constructor.instances.every(function (art) {
|
||||
return art.template.$container !== _this.$container;
|
||||
}), 'Cannot mount multiple instances on the same dom element');
|
||||
errorHandle(this.$container.clientWidth && this.$container.clientHeight, 'The width and height of the container cannot be 0');
|
||||
|
||||
if (art.whitelist.state) {
|
||||
this.initDesktop();
|
||||
|
||||
Reference in new issue
Block a user