logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/

unit_setting.vue (1062B)


  1. <template>
  2. <span
  3. v-if="matchesExpertLevel"
  4. class="UnitSetting"
  5. >
  6. <label
  7. :for="path"
  8. class="size-label"
  9. >
  10. <slot />
  11. </label>
  12. {{ ' ' }}
  13. <input
  14. :id="path"
  15. class="input number-input"
  16. type="number"
  17. :step="step"
  18. :disabled="disabled"
  19. :min="min || 0"
  20. :value="stateValue"
  21. @change="updateValue"
  22. >
  23. <Select
  24. :id="path"
  25. :model-value="stateUnit"
  26. :disabled="disabled"
  27. class="unit-input unstyled"
  28. @change="updateUnit"
  29. >
  30. <option
  31. v-for="option in units"
  32. :key="option"
  33. :value="option"
  34. >
  35. {{ getUnitString(option) }}
  36. </option>
  37. </Select>
  38. {{ ' ' }}
  39. <ModifiedIndicator
  40. :changed="isChanged"
  41. :onclick="reset"
  42. />
  43. </span>
  44. </template>
  45. <script src="./unit_setting.js"></script>
  46. <style lang="scss">
  47. .UnitSetting {
  48. .number-input {
  49. max-width: 6.5em;
  50. text-align: right;
  51. }
  52. .unit-input,
  53. .unit-input select {
  54. min-width: 4em;
  55. width: auto;
  56. }
  57. }
  58. </style>