# loading插件
用于展示loading动画,提供show/hide方法
# 引入
import { H5Player } from '@tencent/thumbplayer-h5';
import { UILoadingPlugin } from '@tencent/thumbplayer-plugin-ui-loading';
const player = new H5Player({ container: '#demo', plugins: [UILoadingPlugin.pluginName] });
const UILoading = player.plugins[UILoadingPlugin.pluginName];
UILoading.show();
UILoading.show('text');
UILoading.hide()
# 插件API
# hide
▸ hide(): void
隐藏loading
Returns: void
# show
▸ show(text?
: string): void
展示loading
# Parameters:
Name | Type | Default value |
---|---|---|
text | string | '' |
Returns: void