Discover: sidebarFilter toggle button done.
This commit is contained in:
@@ -11,8 +11,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { storeToRefs } from 'pinia';
|
||||
import LoginStore from '@/stores/login.js';
|
||||
import LoadingStore from '@/stores/loading.js';
|
||||
import AllMapDataStore from '@/stores/allMapData.js';
|
||||
import Header from "@/components/Header.vue";
|
||||
import Navbar from "@/components/Navbar.vue";
|
||||
import Loading from '@/components/Loading.vue';
|
||||
@@ -22,11 +24,19 @@ export default {
|
||||
setup() {
|
||||
const loginStore = LoginStore();
|
||||
const loadingStore = LoadingStore();
|
||||
const allMapDataStore = AllMapDataStore();
|
||||
const { checkLogin } = loginStore;
|
||||
const { tempFilterId, temporaryData, postRuleData } = storeToRefs(allMapDataStore);
|
||||
|
||||
return {
|
||||
checkLogin,
|
||||
loadingStore,
|
||||
return { checkLogin, loadingStore, temporaryData, tempFilterId, postRuleData };
|
||||
},
|
||||
watch: {
|
||||
$route: function(route) {
|
||||
if(route.name !== 'Discover') {
|
||||
this.tempFilterId = null;
|
||||
this.temporaryData = []
|
||||
this.postRuleData = []
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
Reference in New Issue
Block a user