logo

pleroma-fe

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

choice_setting.js (756B)


  1. import Select from 'src/components/select/select.vue'
  2. import Setting from './setting.js'
  3. export default {
  4. ...Setting,
  5. components: {
  6. ...Setting.components,
  7. Select
  8. },
  9. props: {
  10. ...Setting.props,
  11. options: {
  12. type: Array,
  13. required: false
  14. },
  15. optionLabelMap: {
  16. type: Object,
  17. required: false,
  18. default: {}
  19. }
  20. },
  21. computed: {
  22. ...Setting.computed,
  23. realOptions () {
  24. if (this.realSource === 'admin') {
  25. return this.backendDescriptionSuggestions.map(x => ({
  26. key: x,
  27. value: x,
  28. label: this.optionLabelMap[x] || x
  29. }))
  30. }
  31. return this.options
  32. }
  33. },
  34. methods: {
  35. ...Setting.methods,
  36. getValue (e) {
  37. return e
  38. }
  39. }
  40. }