2021-03-11 14:55:14 +00:00
|
|
|
import Select from 'src/components/select/select.vue'
|
2023-03-12 12:32:13 +00:00
|
|
|
import Setting from './setting.js'
|
|
|
|
|
2021-03-11 14:55:14 +00:00
|
|
|
export default {
|
2023-03-16 21:18:55 +00:00
|
|
|
...Setting,
|
2021-03-11 14:55:14 +00:00
|
|
|
components: {
|
2023-03-16 21:18:55 +00:00
|
|
|
...Setting.components,
|
|
|
|
Select
|
2021-03-11 14:55:14 +00:00
|
|
|
},
|
2023-03-12 12:32:13 +00:00
|
|
|
props: {
|
|
|
|
...Setting.props,
|
|
|
|
options: {
|
|
|
|
type: Array,
|
2023-03-20 21:36:47 +00:00
|
|
|
required: false
|
|
|
|
},
|
|
|
|
optionLabelMap: {
|
|
|
|
type: Object,
|
|
|
|
required: false,
|
|
|
|
default: {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...Setting.computed,
|
|
|
|
realOptions () {
|
2023-03-21 20:46:40 +00:00
|
|
|
if (this.realSource === 'admin') {
|
2023-03-20 21:36:47 +00:00
|
|
|
return this.backendDescriptionSuggestions.map(x => ({
|
|
|
|
key: x,
|
|
|
|
value: x,
|
|
|
|
label: this.optionLabelMap[x] || x
|
|
|
|
}))
|
|
|
|
}
|
|
|
|
return this.options
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
...Setting.methods,
|
|
|
|
getValue (e) {
|
|
|
|
return e
|
2021-03-11 14:55:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|