🎉
This commit is contained in:
24
ui/Components/Value/index.js
Normal file
24
ui/Components/Value/index.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import StringValue from './String.vue';
|
||||
import ImageValue from './Image.vue';
|
||||
import SelectValue from './Select.vue';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
value: {
|
||||
type: null,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
render(h) {
|
||||
return h(
|
||||
this.type === 'Image' ? ImageValue :
|
||||
this.type === 'Number' ? StringValue :
|
||||
Array.isArray(this.type) ? SelectValue :
|
||||
null,
|
||||
{props: {value: this.value, type: this.type}})
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user