<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
</view>
</template>
<script>
import test from "@/common/test.js"
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
this.title = test();
},
methods: {
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
//common/test.js
export default function() {
return '123123123';
};
3 个回复
honeyChen
请问怎么解决的
丹哥 - 丹哥
请问怎么解决的?我也遇到了同样的问题
5***@qq.com - 全能开发者
请问怎么解决这个?