miniprogram-demo/packageAPI/pages/timer/timer.wxml

25 lines
853 B
Plaintext
Raw Normal View History

2020-12-08 10:44:25 +08:00
<!--pages/API/get-network-type/get-network-type.wxml-->
<import src="../../common/head.wxml" />
<import src="../../common/foot.wxml" />
<view class="container">
2021-04-27 17:15:17 +08:00
<template is="head" data="{{title: '定时器'}}"/>
2020-12-08 10:44:25 +08:00
<view class="page-body">
<view class="page-section">
2021-04-27 17:15:17 +08:00
<view>setInterval 1s 一次随机改变result</view>
<view>setTimeout 1s 后随机改变result</view>
2020-12-08 10:44:25 +08:00
<view>result: {{result}}</view>
<view class="btn-area">
<button type="primary" bindtap="handleClearInterval">clearInterval</button>
<button type="primary" bindtap="handleClearTimeout">clearTimeout</button>
<button type="primary" bindtap="handleSetInterval">setInterval</button>
<button type="primary" bindtap="handleSetTimeout">setTimeout</button>
</view>
</view>
</view>
<template is="foot" />
</view>