Add prop for global config var name
This commit is contained in:
parent
527bf23a65
commit
9d5c64cc37
|
@ -188,6 +188,10 @@ const props = defineProps({
|
|||
type: String,
|
||||
default: () => '{}',
|
||||
},
|
||||
configVarName: {
|
||||
default: () => null,
|
||||
reuired: false,
|
||||
},
|
||||
});
|
||||
|
||||
const active = ref(0);
|
||||
|
@ -200,7 +204,7 @@ watch(active, function (newValue) {
|
|||
|
||||
const v = computed(() => {
|
||||
loaded.value = false;
|
||||
var values = window.adrema_event ? window.adrema_event : JSON.parse(props.value);
|
||||
var values = window[props.configVarName] ? window[props.configVarName] : JSON.parse(props.value);
|
||||
var p = {};
|
||||
|
||||
values.sections.forEach(function (section) {
|
||||
|
|
Loading…
Reference in New Issue