Guest User

Untitled

a guest
Nov 16th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. <template>
  2. <div>
  3. <h2 class="has-text-danger">Your Address</h2>
  4.  
  5. <vue-google-autocomplete
  6. ref="address"
  7. id="map"
  8. class="form-control"
  9. placeholder="Please type your address"
  10. v-on:placechanged="getAddressData"
  11. country="fr"
  12. p></vue-google-autocomplete>
  13. <h2>Date</h2>
  14.  
  15. <timeselector v-model="timeMonday"></timeselector>
  16. <VueCtkDateTimePicker v-model="yourValue"></VueCtkDateTimePicker>
  17.  
  18. <h1 class="title">DEBUG :</h1>
  19. <ul>
  20. <li>address field value : {{address}}</li>
  21. <li>dateTime value : {{yourValue}}</li>
  22. </ul>
  23. <dispoTime/>
  24. </div>
  25. </template>
  26.  
  27. <script>
  28. import VueCtkDateTimePicker from "vue-ctk-date-time-picker";
  29. import VueGoogleAutocomplete from "vue-google-autocomplete";
  30. import Timeselector from 'vue-timeselector';
  31. import dispoTime from './components/dispoTime'
  32.  
  33. export default {
  34. components: { VueGoogleAutocomplete,dispoTime, VueCtkDateTimePicker,Timeselector},
  35.  
  36. data: function() {
  37. return {
  38. address: "",
  39. yourValue: null,
  40. timeMonday:null
  41. };
  42. },
  43.  
  44. mounted() {
  45. // To demonstrate functionality of exposed component functions
  46. // Here we make focus on the user input
  47. this.$refs.address.focus();
  48. },
  49. computed: {},
  50. methods: {
  51. /**
  52. * When the location found
  53. * @param {Object} addressData Data of the found location
  54. * @param {Object} placeResultData PlaceResult object
  55. * @param {String} id Input container ID
  56. */
  57. getAddressData: function(addressData, placeResultData, id) {
  58. this.address = addressData;
  59. }
  60. }
  61. };
  62. </script>
  63.  
  64. <style lang="scss">
  65. @charset "utf-8";
  66.  
  67. // Import Bulma core
  68. @import "bulma";
  69. @import "vue-ctk-date-time-picker/dist/vue-ctk-date-time-picker";
  70. </style>
Advertisement
Add Comment
Please, Sign In to add comment