c5_labsci/fapp/ciyon_ap/pages/demo/case/comlife.vue
2026-01-27 00:52:00 +08:00

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">
readymountedactivatedshowdetacheddeactivatedunmountedhide<br/>
</view>
</view>
<view class="ciy-card">
<view class="title">lifetimes</view>
<view class="content">
attacheddetached
</view>
</view>
<view class="ciy-card">
<view class="title">pageLifetime</view>
<view class="content">
showhideattacheddetached
</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>