<dy-page-loadbar>
Example
Loading...
<dy-button @click=${()=>{const Loadbar=customElements.get('dy-page-loadbar');Loadbar.start();setTimeout(()=>Loadbar.end(),3000);}}> 显示页面加载器 </dy-button>
import { Loadbar } from '@duoyun-fe/duoyun-ui/elements/page-loadbar';
function onClick() {
Loadbar.start();
setTimeout(() => Loadbar.end(), 3000);
}API
Shadow DOM; Extends GemElement
Static Properties
| Property | Type |
|---|---|
instance |
DuoyunPageLoadbarElement | undefined |
timer |
number |
Static Methods
| Method | Type | Description |
|---|---|---|
start |
({ delay }?: { delay?: number; }) => Promise<void> |
在延时时间内结束将不会显示加载条 |
end |
() => Promise<void> |
