2019-07-10 11:30:51 +02:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div>{{ script.interpolate(value.title) }}</div>
|
2020-01-29 20:37:25 +01:00
|
|
|
<mk-radio v-for="x in value.values" v-model="v" :value="x" :key="x">{{ x }}</mk-radio>
|
2019-07-10 11:30:51 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2020-01-29 20:37:25 +01:00
|
|
|
import MkRadio from '../ui/radio.vue';
|
2019-07-10 11:30:51 +02:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2020-01-29 20:37:25 +01:00
|
|
|
components: {
|
|
|
|
MkRadio
|
|
|
|
},
|
2019-07-10 11:30:51 +02:00
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
script: {
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
v: this.value.default,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
v() {
|
2020-04-12 20:23:23 +02:00
|
|
|
this.script.aoiScript.updatePageVar(this.value.name, this.v);
|
2019-07-10 11:30:51 +02:00
|
|
|
this.script.eval();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|