info.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <style>
  2. </style>
  3. <template>
  4. <div class="ability-info-wrap">
  5. <div class="ability-info-head">
  6. <section class="ability-info-icon">
  7. <img :src="ability.img_url" />
  8. </section>
  9. <section class="ability-info-name">
  10. <h3>{{ability.name}}</h3>
  11. </section>
  12. </div>
  13. <div class="ability-info-describe">
  14. <ul>
  15. <li>
  16. <h3>技能描述</h3>
  17. <p>{{ability.desc}}</p>
  18. </li>
  19. <li>
  20. <h3>冷却时间</h3>
  21. <p>
  22. <span>10/9/7/6</span>
  23. <label>秒</label>
  24. </p>
  25. </li>
  26. <li>
  27. <h3>施法消耗</h3>
  28. <p>
  29. <span>50/60/70/80/90</span>
  30. <label>法力</label>
  31. </p>
  32. </li>
  33. <li>
  34. <h3>施法范围</h3>
  35. <p>无</p>
  36. </li>
  37. </ul>
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. import Vue from 'vue';
  43. import lib from 'lib';
  44. export default {
  45. data () {
  46. return {
  47. ability : {}
  48. }
  49. },
  50. mounted () {
  51. this.getData();
  52. },
  53. beforeDestroy () {
  54. },
  55. methods: {
  56. getData(){
  57. let self = this,
  58. url = `${lib.apiUrl}/champion/?var=Ashe`;
  59. lib.get(url,ret => {
  60. let ability = ret.champion_list[0].pqwer[1];//q技能
  61. self.ability = ability;
  62. })
  63. }
  64. }
  65. }
  66. </script>