60 lines
1.3 KiB
Vue
60 lines
1.3 KiB
Vue
<template>
|
|
<ciy-header title="组件生命周期事件"></ciy-header>
|
|
<ciy-test></ciy-test>
|
|
<view class="txt-lggg txt-center py4">
|
|
<view @tap="gourl" data-url="/pages/pub/paper?id=1">跳转测试</view>
|
|
</view>
|
|
<view class="ciy-card">
|
|
<view class="title">H5页面</view>
|
|
<view class="content">
|
|
mounted: 页面建立<br/>
|
|
activated: 二次进入<br/>
|
|
deactivated: 页面离开<br/>
|
|
unmounted: 页面销毁<br/>
|
|
</view>
|
|
</view>
|
|
<view class="ciy-card">
|
|
<view class="title">event</view>
|
|
<view class="content">
|
|
ready、mounted、activated、show、detached、deactivated、unmounted、hide<br/>
|
|
</view>
|
|
</view>
|
|
<view class="ciy-card">
|
|
<view class="title">lifetimes</view>
|
|
<view class="content">
|
|
attached、detached
|
|
</view>
|
|
</view>
|
|
<view class="ciy-card">
|
|
<view class="title">pageLifetime</view>
|
|
<view class="content">
|
|
show、hide、attached、detached
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<style>
|
|
</style>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
ciy_arearpc: []
|
|
}
|
|
},
|
|
onLoad() {},
|
|
watch: {},
|
|
computed: {},
|
|
methods: {
|
|
async loadjs(js) {
|
|
var retjson = await this.load_ciydict(this.file_stor('/dict/' + js + '.js'));
|
|
if (json.code != 1)
|
|
return this.alert(json.errmsg);
|
|
this.ciy_arearpc = retjson.arr;
|
|
},
|
|
demo() {
|
|
}
|
|
}
|
|
}
|
|
</script> |