`,
- props: ['selectedItem']
+ props: ['selecteditem', 'searchstring', 'placeholderstring', 'displayeditem', 'materialtype']
}
const { createApp } = Vue
-createApp({
+const app1 = createApp({
components: {
'navig-component': navigComponent,
'hamburger-component': hamburgerComponent
@@ -364,22 +363,23 @@ createApp({
}
}
}
-}).mount('#app1');
+})
+app1.mount('#app1');
-createApp({
+const app2 = createApp({
components: {
'onesearch-component': onesearchComponent
},
methods: {
selectDropdown(item, itemName) {
- this.displayedItem = itemName; // swap in current item at the top of the dropdown
- this.selectedItem = item; // store the data from the dropdown selection
- this.placeholderString = 'Enter search term here';
+ this.displayeditem = itemName; // swap in current item at the top of the dropdown
+ this.selecteditem = item; // store the data from the dropdown selection
+ this.placeholderstring = 'Enter search term here';
},
submitSearch() {
- if (this.displayedItem === 'Define Your Search') {
- this.placeholderString = 'Please make a selection';
- this.searchString = ''; // remove the search string
+ if (this.displayeditem === 'Define Your Search') {
+ this.placeholderstring = 'Please make a selection';
+ this.searchstring = ''; // remove the search string
if (!this.$refs.blueBorder1.classList.contains('open')) { // if the dropdown is not open
this.$refs.oneSearchMenu.click(); // open the dropdown
}
@@ -391,11 +391,11 @@ createApp({
},
data() {
return {
- selectedItem: {}, // initialize the data from the dropdown selection
- searchString: '', // initialize an empty search string
- placeholderString: 'Enter search term here', // initialize the placeholder
- displayedItem: 'Define Your Search', // the text displayed a the top of the OneSearch dropdown
- materialType: {
+ selecteditem: {}, // initialize the data from the dropdown selection
+ searchstring: '', // initialize an empty search string
+ placeholderstring: 'Enter search term here', // initialize the placeholder
+ displayeditem: 'Define Your Search', // the text displayed a the top of the OneSearch dropdown
+ materialtype: {
Books: {
fullName: 'Books',
baseUrl: 'https://cuny-kb.primo.exlibrisgroup.com/discovery/search',
@@ -439,4 +439,5 @@ createApp({
}
}
}
-}).mount('#app2');
+})
+app2.mount('#app2');