2019-04-28 17:11:57 -07:00
|
|
|
<template>
|
|
|
|
<div>
|
2020-04-20 05:35:27 -07:00
|
|
|
<mk-textarea v-model="v">{{ hpml.interpolate(value.text) }}</mk-textarea>
|
2019-04-28 17:11:57 -07:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2020-01-29 11:37:25 -08:00
|
|
|
import MkTextarea from '../ui/textarea.vue';
|
2019-04-28 17:11:57 -07:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2020-01-29 11:37:25 -08:00
|
|
|
components: {
|
|
|
|
MkTextarea
|
|
|
|
},
|
2019-04-28 17:11:57 -07:00
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
required: true
|
|
|
|
},
|
2020-04-20 05:35:27 -07:00
|
|
|
hpml: {
|
2019-04-28 17:11:57 -07:00
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
v: this.value.default,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
v() {
|
2020-04-20 05:35:27 -07:00
|
|
|
this.hpml.updatePageVar(this.value.name, this.v);
|
|
|
|
this.hpml.eval();
|
2019-04-28 17:11:57 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|