daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Aug 16th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <template>
  2.     <div>
  3.         <ais-index :search-store="searchStore1"></ais-index>
  4.         <ais-index :search-store="searchStore2"></ais-index>
  5.         <your-map-component :results="combinedResults"></your-map-component>
  6.     </div>
  7. </template>
  8.  
  9. <script>
  10. import { createFromAlgoliaCredentials } from 'vue-instantsearch';
  11.  
  12. const searchStore1 = createFromAlgoliaCredentials('appId', 'apiKey');
  13. searchStore1.indexName = '<index1>';
  14. const searchStore2 = createFromAlgoliaCredentials('appId', 'apiKey');
  15. searchStore2.indexName = '<index2>';
  16.  
  17. export default {
  18.     data() {
  19.         return {
  20.             searchStore1,
  21.             searchStore2,
  22.         }
  23.     },
  24.  
  25.     computed() {
  26.         combinedResults() {
  27.             return searchStore1.results.concat(searchStore2.results);
  28.         }
  29.     }
  30. }
  31. </script>
RAW Paste Data
Top