init
This commit is contained in:
16
xhs-mini-demos/component-case/resizable/resizable.js
Normal file
16
xhs-mini-demos/component-case/resizable/resizable.js
Normal 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,
|
||||
});
|
||||
},
|
||||
});
|
||||
5
xhs-mini-demos/component-case/resizable/resizable.json
Normal file
5
xhs-mini-demos/component-case/resizable/resizable.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "屏幕旋转",
|
||||
"pageOrientation": "auto"
|
||||
}
|
||||
13
xhs-mini-demos/component-case/resizable/resizable.wxs
Normal file
13
xhs-mini-demos/component-case/resizable/resizable.wxs
Normal file
@@ -0,0 +1,13 @@
|
||||
function renderResizable(status) {
|
||||
console.log(status)
|
||||
switch(status) {
|
||||
case "lock":
|
||||
return '锁定屏幕中';
|
||||
case "unlock":
|
||||
return "可旋转屏幕";
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
renderResizable: renderResizable
|
||||
}
|
||||
14
xhs-mini-demos/component-case/resizable/resizable.xhsml
Normal file
14
xhs-mini-demos/component-case/resizable/resizable.xhsml
Normal 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>
|
||||
Reference in New Issue
Block a user