Files
Yi.Admin/Yi.BBS.Vue3/src/components/MavonEdit.vue
2023-03-10 22:02:19 +08:00

31 lines
631 B
Vue

<template>
<mavon-editor
:subfield="subfield"
:codeStyle="props.codeStyle"
:ishljs="true"
:style="{minHeight:props.height,maxHeight:'50rem'}"
class="edit"
@change="change"
></mavon-editor>
</template>
<script setup>
// Local Registration
import { mavonEditor } from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
import { ref } from 'vue';
const props = defineProps(['height','modelValue',"codeStyle"])
const emit=defineEmits(['update:modelValue'])
const subfield = true;
const change=(value ,render)=>
{
emit('update:modelValue', render)
}
</script>
<style scoped>
.edit
{
width: 100%;
}
</style>