Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

platform-select.js 780B

12345678910111213141516171819202122232425
  1. export const PlatformSelect = {
  2. props: ['platform'],
  3. template: `
  4. <div class="pv-platform-select">
  5. <a class="pv-platform-select__link"
  6. :class="{'pv-platform-select__link--active': this.platform !== 'ios' && this.platform !== 'android'}"
  7. :href="getLocation() + '?platform=all'">All</a>
  8. <a class="pv-platform-select__link"
  9. :class="{'pv-platform-select__link--active': this.platform === 'ios'}"
  10. :href="getLocation() + '?platform=ios'">iOS</a>
  11. <a class="pv-platform-select__link"
  12. :class="{'pv-platform-select__link--active': this.platform === 'android'}"
  13. :href="getLocation() + '?platform=android'">Android</a>
  14. </div>
  15. `,
  16. methods: {
  17. getLocation() {
  18. return location.pathname;
  19. }
  20. }
  21. };