init
This commit is contained in:
9
xhs-mini-demos/component-case/lifecycle/lifecycle.css
Normal file
9
xhs-mini-demos/component-case/lifecycle/lifecycle.css
Normal file
@@ -0,0 +1,9 @@
|
||||
.input {
|
||||
margin: 15px auto;
|
||||
width: 80%;
|
||||
/* border-bottom: 1px solid black; */
|
||||
}
|
||||
.text {
|
||||
margin: 15px auto;
|
||||
width: 80%;
|
||||
}
|
||||
26
xhs-mini-demos/component-case/lifecycle/lifecycle.js
Normal file
26
xhs-mini-demos/component-case/lifecycle/lifecycle.js
Normal file
@@ -0,0 +1,26 @@
|
||||
Page({
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: 'lifecycle',
|
||||
path: 'packageAPI/pages/lifecycle/lifecycle',
|
||||
};
|
||||
},
|
||||
data: {
|
||||
load: false,
|
||||
show: false,
|
||||
hide: false,
|
||||
unload: false,
|
||||
},
|
||||
onLoad() {
|
||||
xhs.showToast({ title: 'pageOnLoad' });
|
||||
},
|
||||
onShow() {
|
||||
xhs.showToast({ title: 'pageOnShow' });
|
||||
},
|
||||
onHide() {
|
||||
xhs.showToast({ title: 'pageOnHide' });
|
||||
},
|
||||
onUnload() {
|
||||
xhs.showToast({ title: 'pageOnUnload' });
|
||||
},
|
||||
});
|
||||
4
xhs-mini-demos/component-case/lifecycle/lifecycle.json
Normal file
4
xhs-mini-demos/component-case/lifecycle/lifecycle.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "lifecycle"
|
||||
}
|
||||
18
xhs-mini-demos/component-case/lifecycle/lifecycle.xhsml
Normal file
18
xhs-mini-demos/component-case/lifecycle/lifecycle.xhsml
Normal file
@@ -0,0 +1,18 @@
|
||||
<view class="container">
|
||||
<view class="page-body">
|
||||
<view class="page-section">
|
||||
<view>
|
||||
<text>load:{{load}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>show:{{show}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>hide:{{hide}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>unload:{{unload}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user