mirror of
https://github.com/sharkdp/bat.git
synced 2025-06-18 06:15:56 +01:00
Add tests for Vue component syntax
This commit is contained in:
committed by
David Peter
parent
5ec4936a4f
commit
cc6f6fdb1d
tests/syntax-tests
55
tests/syntax-tests/source/Vue/example.vue
Normal file
55
tests/syntax-tests/source/Vue/example.vue
Normal file
@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div id="app" class="container-fluid">
|
||||
<AppHeader></AppHeader>
|
||||
<transition name="page" mode="out-in" v-if="!isLoading">
|
||||
<router-view></router-view>
|
||||
</transition>
|
||||
<AppLoadingIndicator></AppLoadingIndicator>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AppHeader from "@/components/AppHeader";
|
||||
import AppLoadingIndicator from "@/components/AppLoadingIndicator";
|
||||
import { mapGetters } from "vuex";
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
components: {
|
||||
AppHeader,
|
||||
AppLoadingIndicator,
|
||||
},
|
||||
beforeCreate() {
|
||||
this.$store.dispatch("fetchData");
|
||||
},
|
||||
data: {
|
||||
message: "Hello!"
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
isLoading: "isLoading",
|
||||
}),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: rgba(72, 163, 184, 0.05) !important;
|
||||
}
|
||||
|
||||
.page-enter-active,
|
||||
.page-leave-active {
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.page-enter,
|
||||
.page-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.page-enter:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
</style>
|
Reference in New Issue
Block a user