<navigator :url="url">
<view>
<text>{{age >=18 ? '成年' : '未成年'}}</text>
</view>
</navigator>
data() {
return {
age: 12,
url:'../index/index'
}
},
<template>
<view class="content">
<image class="logo" :src="image"></image>
<navigator url="../hello/hello">
<view class="text-area">
<text class="title">{{title}}</text>
</view>
</navigator>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello',
url:"../hello/hello",
image:"../../static/logo.png"
}
},
onLoad() {
},
onPullDownRefresh(){
console.log(刷新);
},
onShareAppMessage () {
console.log(fenxiang);
},
methods: {
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200upx;
width: 200upx;
margin-top: 200upx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50upx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36upx;
color: #8f8f94;
}
</style>
v-if v-else