miniprogram-demo/pages/API/screen-brightness/screen-brightness.wxml

26 lines
913 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!--pages/API/screen-brightness/screen-brightness.wxml-->
<import src="../../common/head.wxml" />
<import src="../../common/foot.wxml" />
<view class="container">
<template is="head" data="{{title: 'get/set/ScreenBrightness'}}"/>
<view class="tips">目前仅iOS支持安卓暂时不支持</view>
<view class="page-body">
<view class="page-body-info">
<view class="page-body-title">当前屏幕亮度</view>
<text class="page-body-text-screen-brightness">{{screenBrightness}}</text>
</view>
<view class="page-section page-section-gap">
<view class="page-section-title">设置屏幕亮度</view>
<view class="body-view">
<slider bindchange="changeBrightness" value="{{screenBrightness}}" min="0" max="1" step="0.1"/>
</view>
</view>
<button type="primary" bindtap="keepScreenOn">设置常亮</button>
</view>
<template is="foot" />
</view>