wails-template-vue/frontend/src/views/Home.vue

78 lines
1.6 KiB
Vue
Raw Normal View History

2021-09-08 08:58:58 +08:00
<template>
<div class="home">
2021-09-09 05:16:10 +08:00
<!-- Logo -->
<img class="logo" alt="Vue logo" src="../assets/logo.png" />
<HelloWorld :msg="$t('homepage.welcome')" />
<!-- Bottom button -->
<!-- 底部按钮 -->
<div class="link">
<OpenLink href="https://beta.wails.io" class="btn start">{{ $t('homepage.getting-started') }}</OpenLink>
<OpenLink
href="https://github.com/misitebao/wails-template-vue"
class="btn star"
>{{ $t('homepage.star-me') }}</OpenLink>
</div>
2021-09-08 08:58:58 +08:00
</div>
</template>
<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
export default {
name: "Home",
components: {
2021-09-09 05:16:10 +08:00
HelloWorld
2021-09-08 08:58:58 +08:00
},
setup() {
2021-09-09 05:16:10 +08:00
return {};
2021-09-08 08:58:58 +08:00
},
};
</script>
2021-09-09 05:16:10 +08:00
<style lang="stylus">
.home{
.logo{
display block
width 620px
height 280px
margin 30px auto 10px
}
.link{
display flex
flex-direction row
flex-wrap nowrap
align-items center
justify-content center
margin 24px auto
.btn{
2021-09-09 12:09:20 +08:00
display: block;
width: 150px;
height: 50px;
line-height: 50px;
margin: 12px 30px;
border-radius: 8px;
text-align: center;
font-weight: 700;
font-size: 16px;
white-space: nowrap;
2021-09-09 05:16:10 +08:00
text-decoration: none;
2021-09-09 12:09:20 +08:00
cursor: pointer;
2021-09-09 05:16:10 +08:00
&.start{
background-color #fd0404
color #ffffff
&:hover{
background-color #ec2e2e
}
}
&.star{
background-color #ffffff
color #fd0404
&:hover{
background-color #f3f3f3
}
}
}
}
}
</style>