Skip to content

Commit

Permalink
Update CHANGELOG_CN.md and template.js
Browse files Browse the repository at this point in the history
  • Loading branch information
zhw2590582 committed Dec 23, 2023
1 parent 0a0b159 commit 434aa3d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [5.1.0] - 2023-12-23

- 插件函数改为支持异步返回
- 当播放地址发生错误到达上限后,不会再主动销毁播放器
- 分离语言文件,核心代码不再捆绑多国语言 [语言设置](https://artplayer.org/document/start/i18n.html)
Expand Down
2 changes: 1 addition & 1 deletion docs/compiled/artplayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/compiled/artplayer.legacy.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions docs/uncompiled/artplayer/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/uncompiled/artplayer/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/artplayer/dist/artplayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/artplayer/dist/artplayer.legacy.js

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions packages/artplayer/src/template.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { errorHandle, query, addClass, replaceElement, isMobile } from './utils';
import { errorHandle, query, addClass, isMobile } from './utils';

export default class Template {
constructor(art) {
Expand All @@ -22,8 +22,6 @@ export default class Template {

this.query = this.query.bind(this);
this.$container.dataset.artId = art.id;
this.$original = this.$container.cloneNode(true);

this.init();
}

Expand Down Expand Up @@ -135,7 +133,7 @@ export default class Template {

destroy(removeHtml) {
if (removeHtml) {
replaceElement(this.$original, this.$container);
this.$container.innerHTML = '';
} else {
addClass(this.$player, 'art-destroy');
}
Expand Down

0 comments on commit 434aa3d

Please sign in to comment.