-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16e98ef
commit ccf1f13
Showing
4 changed files
with
58 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
|
||
<template> | ||
<div> | ||
<h1>Hello</h1> | ||
<h1>Hello {{ airportName }}</h1> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
airportName: { | ||
type: String, | ||
required: true | ||
} | ||
}, | ||
}; | ||
</script> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,40 @@ | ||
<template> | ||
<select id="airport-dropdown"> | ||
<option>Select an airport</option> | ||
<option>Denver International Airport</option> | ||
<option>Dallas Fort Worth</option> | ||
<option>Los Angeles International Airport</option> | ||
<option>JFK Airport</option> | ||
<option>Cancun International Airport</option> | ||
<div> | ||
<select id="airport-dropdown" v-model="selectedAirport" @change="handleAirportChange"> | ||
<option disabled value="">Select an airport</option> | ||
<option value="Denver International Airport">Denver International Airport</option> | ||
<option value="Dallas Fort Worth">Dallas Fort Worth</option> | ||
<option value="Los Angeles International Airport">Los Angeles International Airport</option> | ||
<option value="JFK International Airport">JFK Airport</option> | ||
<option value="Cancun International Airport">Cancun International Airport</option> | ||
<!-- Add other options with their respective names --> | ||
</select> | ||
</template> | ||
<button @click="search">Search</button> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
selectedAirport: '' | ||
}; | ||
}, | ||
methods: { | ||
handleAirportChange() { | ||
console.log('Selected Airport:', this.selectedAirport); | ||
}, | ||
search() { | ||
if (this.selectedAirport) { | ||
this.$router.push({ | ||
name: 'airport-details', | ||
params: { airportName: this.selectedAirport } | ||
}); | ||
} | ||
} | ||
} | ||
}; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters