Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <div class="panel">
  3. <side-bar :role="user.status" :active="active">
  4. </side-bar>
  5. <div>{{active}}, {{hash}}</div>
  6. <div v-if="loading">
  7. </div>
  8. <div v-else-if="!loading"></div>
  9. </div>
  10. </template>
  11. <script>
  12. import SideBar from "./sidebar.vue"
  13. const user = {
  14. firstName: "test",
  15. lastName: "user",
  16. id: 12,
  17. status: 1,
  18. }
  19. function active() {
  20. if (this.hash == '' || this.hash == '#') {
  21. return 1
  22. } else if (/^#new\/?/.exec(this.hash)) {
  23. return 2
  24. } else if (/^#estimates\/?/.exec(this.hash)) {
  25. return 3
  26. } else if (/^#settings\/?/.exec(this.hash)) {
  27. return 4
  28. } else if (/^#sign-out\/?/.exec(this.hash)) {
  29. return 5
  30. } else {
  31. return 0
  32. }
  33. }
  34. export default {
  35. components: {SideBar},
  36. computed: {active},
  37. data() {
  38. return {
  39. loading: true, user: user, hash: ''
  40. }
  41. },
  42. created() {
  43. window.onhashchange = () => this.hash = window.location.hash
  44. }
  45. }
  46. </script>