实现效果图:
import Editor from "@/components/tools/Editor.vue";
<Editor :value="goodsDetailData" :estyle="'height:min-content'" class="disable" :no-toolbar="true"
:placeholder="''" v-if="showEditor"></Editor>
// 获取商品详情数据
const goodsDetailData = ref([] as any);
const getgoodsDetailData = () => {
if (props?.record?.productDesc) {
// goodsDetailData.value = JSON.parse(props?.record?.productDesc);
goodsDetailData.value = props?.record?.productDesc;
console.log(goodsDetailData.value, 'goodsDetailData.value');
showEditorFn()
}
};
//刷新富文本组件
const showEditor = ref(false)
const showEditorFn = () => {
showEditor.value = false;
nextTick(() => {
showEditor.value = true;
})
}