refactor: 页面布局样式优化和接口合理性优化
Former-commit-id: 4af1b0aa5aca3569f540e3bcad99f6e14741e855
This commit is contained in:
22
src/views/component/editor.vue
Normal file
22
src/views/component/editor.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import Editor from '@/components/WangEditor/index.vue';
|
||||
import { ElForm } from 'element-plus';
|
||||
import { reactive, ref, toRefs } from 'vue';
|
||||
|
||||
const dataFormRef = ref(ElForm);
|
||||
|
||||
const state = reactive({
|
||||
formData: {
|
||||
content: '初始内容'
|
||||
}
|
||||
});
|
||||
|
||||
const { formData } = toRefs(state);
|
||||
</script>
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="dataFormRef" :model="formData">
|
||||
<editor v-model="formData.content" style="height: 600px" />
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user