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,
|
type: String,
|
||||||
default: () => '{}',
|
default: () => '{}',
|
||||||
},
|
},
|
||||||
|
configVarName: {
|
||||||
|
default: () => null,
|
||||||
|
reuired: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const active = ref(0);
|
const active = ref(0);
|
||||||
|
@ -200,7 +204,7 @@ watch(active, function (newValue) {
|
||||||
|
|
||||||
const v = computed(() => {
|
const v = computed(() => {
|
||||||
loaded.value = false;
|
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 = {};
|
var p = {};
|
||||||
|
|
||||||
values.sections.forEach(function (section) {
|
values.sections.forEach(function (section) {
|
||||||
|
|
Loading…
Reference in New Issue