qii404 261a7de2cf
Feature/load all keys (#770)
Load all keys support!
due to conflict, can only merge via "squash and merge"
Co-authored-by: Ricardo Tondello <rkdtondello@gmail.com>
2022-01-24 21:34:03 +08:00

32 lines
714 B
JavaScript

<template>
<div>
<!-- </textarea> -->
<el-input ref='textInput' :disabled='disabled' type='textarea' :value='contentDisplay'></el-input>
</div>
</template>
<script type="text/javascript">
export default {
props: ['content', 'contentVisible', 'disabled'],
computed: {
contentDisplay() {
return this.$util.bufToBinary(this.content);
},
},
watch: {
content() {
// refresh
this.$nextTick(() => {
this.$refs.textInput.$refs.textarea.value = this.contentDisplay;
});
},
},
methods: {
getContent() {
const content = this.$refs.textInput.$refs.textarea.value;
return this.$util.binaryStringToBuffer(content);
},
},
}
</script>