Skip to content

Commit

Permalink
fix(status-bar): 修复了状态条加载时和加载完成时显示异常
Browse files Browse the repository at this point in the history
  • Loading branch information
hacxy committed Mar 12, 2024
1 parent 7686904 commit ca1fd28
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/src/guide/index.md
Expand Up @@ -27,7 +27,7 @@ Cubism 5 向后兼容了 Live2D Model 3 并支持 Live2D Model 4 ,但它无法
## 快速开始

> [!WARNING]
> 本项目从 `0.4.0` 版本开始将不再采用自动加载组件的模式, 现在你可以通过 `loadOml2d` 方法加载组件至 body 中, 或者为其指定一个父元素.
> 本项目从 `0.4.0` 版本开始将不再采用自动加载组件的模式, 现在你可以通过 `loadOml2d` 方法加载组件至 body 中, 或者通过`parentElement`选项为其指定一个父元素.
### 安装

Expand Down
7 changes: 4 additions & 3 deletions packages/oh-my-live2d/src/modules/status-bar.ts
Expand Up @@ -97,15 +97,16 @@ export class StatusBar {
}

showLoading(): void {
this.setContent(
this.popup(
`
<div style="margin-bottom:3px;">加载中</div>
<svg class="oml2d-icon oml2d-loading" aria-hidden="true">
<use xlink:href="#icon-loading"></use>
</svg>
`
`,
SystemState.info,
false
);
void this.slideIn();
}

hideLoading(): void {
Expand Down
8 changes: 4 additions & 4 deletions tests/vite-app/index.html
Expand Up @@ -8,9 +8,9 @@
</head>
<body>
<div id="app"></div>
<!-- <script src="./src/main.ts" type="module"></script> -->
<script src="index.min.js"></script>
<script>
<script src="./src/main.ts" type="module"></script>
<!-- <script src="index.min.js"></script> -->
<!-- <script>
OML2D.loadOml2d({
models: [
{
Expand All @@ -30,6 +30,6 @@
// }
]
});
</script>
</script> -->
</body>
</html>

0 comments on commit ca1fd28

Please sign in to comment.