mirror of
https://github.com/Spythere/station-manager-2.0.git
synced 2026-05-03 21:48:14 +00:00
refactor: code organization
This commit is contained in:
@@ -21,18 +21,15 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { useStore } from '../store';
|
||||
|
||||
import { useSceneriesStore } from '../stores/sceneries.store';
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
return {
|
||||
store: useStore(),
|
||||
};
|
||||
},
|
||||
data: () => ({
|
||||
sceneriesStore: useSceneriesStore(),
|
||||
}),
|
||||
|
||||
computed: {
|
||||
changesResponseComp() {
|
||||
return this.store.changesResponse.map((ch) => ({
|
||||
return this.sceneriesStore.changesResponse.map((ch) => ({
|
||||
resolved: ch.split(' ')[0] == 'v',
|
||||
message: ch.replace(/^[v|x] /, ''),
|
||||
}));
|
||||
@@ -41,7 +38,7 @@ export default defineComponent({
|
||||
|
||||
methods: {
|
||||
closeCard() {
|
||||
this.store.changesResponse.length = 0;
|
||||
this.sceneriesStore.changesResponse.length = 0;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user