zhuoyuan.wang
2024-06-19 15ebe96f28cadec6a726c5324593a40bbf56205f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<template>
  <app-collapse-form title="正文">
    <app-wang-editor v-bind="wangEditorProps"/>
  </app-collapse-form>
</template>
 
<script setup>
 
const wangEditorRef = ref();
 
const wangEditorProps = {
  ref: wangEditorRef,
}
 
const onSetData = ({content}) => {
  wangEditorRef.value.init({value: content});
}
 
const onGetData = () => {
  return wangEditorRef.value.getValue();
}
 
defineExpose({
  /**
   * 初始化
   */
  onSetData,
  onGetData
});
 
</script>