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

78 lines
1.5 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{
display block
width 136px
height 46px
line-height 46px
margin 0 10px
border-radius 8px
text-align center
font-weight bold
font-size: 14px;
white-space nowrap
text-decoration: none;
cursor pointer
&.start{
background-color #fd0404
color #ffffff
&:hover{
background-color #ec2e2e
}
}
&.star{
background-color #ffffff
color #fd0404
&:hover{
background-color #f3f3f3
}
}
}
}
}
</style>