home.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <div class="home">
  2. <header>
  3. <span>{{_t('current')}}</span>
  4. <span>
  5. <ui-select
  6. v-value="current"
  7. >
  8. <template v-for="item in languages">
  9. <option>{{item}}</option>
  10. </template>
  11. </ui-select>
  12. </span>
  13. </header>
  14. <section class="control">
  15. <i class="fa fa-pencil-square-o" aria-hidden="true"
  16. :edit="state === 'edit'"
  17. @click="changeEdit"
  18. ></i>
  19. <i class="fa fa-plus" aria-hidden="true"
  20. @click="changeCreate"
  21. ></i>
  22. </section>
  23. <section class="list">
  24. <ul>
  25. <li
  26. v-for="item in languages"
  27. >
  28. <div class="edit"
  29. :edit="state === 'edit'"
  30. >
  31. <i class="fa fa-minus-circle" aria-hidden="true"
  32. @click="deleteLanguage(item)"
  33. ></i>
  34. </div>
  35. <div class="name">
  36. {{item}}
  37. </div>
  38. <div class="path">
  39. {{_getLanguagePath(item)}}
  40. </div>
  41. </li>
  42. </ul>
  43. </section>
  44. <div class="popup"
  45. v-if="state === 'create'"
  46. :active="state === 'create'"
  47. >
  48. <div class="mask"></div>
  49. <div class="language">
  50. <h3>{{_t('create_language')}}</h3>
  51. <ui-prop
  52. :name="_t('language')"
  53. >
  54. <ui-input
  55. v-value="_language"
  56. ></ui-input>
  57. </ui-prop>
  58. <div class="button">
  59. <ui-button
  60. @click="createLanguage(_language)"
  61. >{{_t('create')}}</ui-button>
  62. <ui-button
  63. @click="changeCreate"
  64. >{{_t('cancel')}}</ui-button>
  65. </div>
  66. </div>
  67. </div>
  68. </div>