<template>
<view class="content">
<!-- <myHeader></myHeader> -->
<image class="logo" src="/static/logo.png" @tap="goJump"></image>
<view>
<text class="title">{{title}}</text>
</view>
</view>
</template>
<script>
import myHeader from '../../components/my-header.vue';
export default {
data() {
return {
title: 'Hello'
}
},
components:{
myHeader
},
onLoad() {
console.log(11)
this.title = 'nihao';
},
methods: {
goJump(){
uni.navigateTo({
url: '../list/list'
});
}
},
computed:{
searchText(){
return this.$store.state.searchText;
}
}
}
</script>
<style>
.content {
text-align: center;
height: 400upx;
}
.logo{
height: 200upx;
width: 200upx;
margin-top: 200upx;
}
.title {
font-size: 36upx;
color: #8f8f94;
}
</style>
B页面
<template>
<view>
<view>{{searchText}}</view>
<view class="" @tap="goFile">
<view>1</view>
<view>1</view>
<view>1</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
onLoad() {
},
methods:{
setList(){
},
goFile(){
uni.navigateTo({
url: '../file/file'
});
}
},
computed:{
searchText(){
return this.$store.state.searchText;
}
}
}
</script>
<style>
</style>
2 个回复
2***@qq.com (作者)
DCloud_heavensoft
a页面onShow会触发