Skip to content

Commit 7d6a39c

Browse files
committedMar 13, 2022
renamed tempaltes
1 parent 6eb114c commit 7d6a39c

File tree

4 files changed

+49
-4
lines changed

4 files changed

+49
-4
lines changed
 

Diff for: ‎index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
</head>
1010

1111
<body>
12-
<div id="app"></div>
12+
<div id="app">
13+
<!-- built files will be auto injected by using vue-magic -->
14+
</div>
1315
<script type="module" src="/src/main.ts"></script>
1416
</body>
1517

Diff for: ‎src/components/ComponentTemplate.vue renamed to ‎src/components/TemplateComponent.vue

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { mapState, mapMutations, mapActions, mapGetters } from "vuex";
1313
// components import
1414
1515
export default defineComponent({
16-
name: "ComponentTemplate",
16+
name: "TemplateComponent",
1717
components: {},
1818
props: {
1919
prop1: { type: String, required: true },
@@ -24,17 +24,21 @@ export default defineComponent({
2424
data: () => ({}),
2525
watch: {},
2626
computed: {
27-
...mapState([]),
27+
...mapState(["storeCounter", "storeTestString"]),
2828
...mapGetters([]),
2929
getterTemplate() {
3030
return "";
3131
},
32+
getStateTemplate() {
33+
this.$store.state.storeCounter;
34+
},
3235
},
3336
methods: {
3437
...mapActions([]),
3538
...mapMutations([]),
3639
functionTemplate: function () {},
3740
},
41+
3842
created() {},
3943
mounted() {
4044
this.$store.dispatch("mutationTemplate");

Diff for: ‎src/components/TemplateCopyPaste.vue

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<template>
2+
<v-container>
3+
<h1 class="mt-4">This is just a template</h1>
4+
<p>No syntax knowledge, much cry!</p>
5+
</v-container>
6+
</template>
7+
8+
<script lang="ts">
9+
import { defineComponent } from "vue";
10+
import { mapState, mapMutations, mapActions, mapGetters } from "vuex";
11+
12+
// components import
13+
14+
export default defineComponent({
15+
name: "TemplateCopyPaste",
16+
components: {},
17+
props: {},
18+
setup() {
19+
return {};
20+
},
21+
data: () => ({}),
22+
watch: {},
23+
computed: {
24+
...mapState([]),
25+
...mapGetters([]),
26+
},
27+
methods: {
28+
...mapActions([]),
29+
...mapMutations([]),
30+
},
31+
created() {},
32+
mounted() {},
33+
unmounted() {},
34+
destoryed() {},
35+
});
36+
</script>
37+
38+
<style scoped lang="scss"></style>
39+
<style lang="scss"></style>

Diff for: ‎src/store/store.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class State {
1212
moduleB!: typeof moduleB.state;
1313

1414
storeCounter: number = 0;
15-
storeTestVar: string = "store-test-1";
15+
storeTestString: string = "store-test-1";
1616
dataSets = [];
1717
}
1818

0 commit comments

Comments
 (0)
Please sign in to comment.