This commit is contained in:
2025-09-14 00:21:54 +08:00
commit d40b3bbd62
766 changed files with 36275 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
Page({
onShareAppMessage() {
return {
title: '屏幕旋转',
path: 'package/API/pages/resizable/resizable',
};
},
data: {
status: 'lock',
},
handleStatusChange(e) {
this.setData({
status: e.currentTarget.dataset.status,
});
},
});

View File

@@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTitleText": "屏幕旋转",
"pageOrientation": "auto"
}

View File

@@ -0,0 +1,13 @@
function renderResizable(status) {
console.log(status)
switch(status) {
case "lock":
return '锁定屏幕中';
case "unlock":
return "可旋转屏幕";
}
}
module.exports = {
renderResizable: renderResizable
}

View File

@@ -0,0 +1,14 @@
<wxs src="./resizable.wxs" module="resizable" />
<view class="container">
<view class="page-body">
<view class="page-section">
<view style="text-align:center">
<!-- 当前屏幕状态:{{resizable.renderResizable(status)}} -->
旋转屏幕
</view>
<image src="http://mmbiz.qpic.cn/sz_mmbiz_png/GEWVeJPFkSHALb0g5rCc4Jf5IqDfdwhWJ43I1IvriaV5uFr9fLAuv3uxHR7DQstbIxhNXFoQEcxGzWwzQUDBd6Q/0?wx_fmt=png" mode="aspectFit" style="width: 100%"></image>
<!-- <button type="primary" data-status="unlock" bind:tap="handleStatusChange">打开屏幕旋转</button>
<button type="primary" data-status="lock" bind:tap="handleStatusChange">锁定屏幕</button> -->
</view>
</view>
</view>