feat: 🚀 切换富文本编辑器

This commit is contained in:
2025-05-07 17:55:49 +08:00
parent 4bd5797772
commit ab003714bf
28 changed files with 1145 additions and 132 deletions

View File

@@ -16,7 +16,7 @@
</el-tab-pane>
<el-tab-pane label="产品详情" name="third">
<div style="width: 1280px; margin: 0 auto">
<WangEditor v-model:value="dataStore.detail" />
<Editor v-model:value="dataStore.detail" />
</div>
</el-tab-pane>
<el-tab-pane label="相关信息" name="related">
@@ -42,7 +42,7 @@
<script setup lang="ts" name="productEditIndex">
import { ref, reactive } from "vue";
//getProductAttrsApi
import Editor from "@/components/Editor/index.vue";
import {
getProductDetailsApi,
getProductListApi,
@@ -60,7 +60,7 @@ import { addLabelValue } from "./utils/common/addLabelValue";
//组件引入
import basicInfo from "./components/basicInfo.vue";
import imgInfo from "./components/imgInfo.vue";
import WangEditor from "@/components/WangEditor/index.vue";
//import WangEditor from "@/components/WangEditor/index.vue";
import FormTable from "@/components/FormTable/index.vue";
const $route = useRoute();

View File

@@ -1,5 +1,5 @@
import { cloneDeep } from "lodash-es";
// import { convertSpanToDiv } from "@/utils/convertSpanToDiv";
const hasIdRecursive = (data: any, targetId: any) => {
for (let i = 0; i < data.length; i++) {
const item = data[i];
@@ -42,6 +42,7 @@ export const initDetailParams = (dataStore: any, data: any) => {
});
//详情
dataStore.detail = cloneDeep(data.detail);
//dataStore.detail = convertSpanToDiv(dataStore.detail);
//图片
dataStore.imgInfoData.cover_image = data.cover_image;
dataStore.imgInfoData.video_url = data.video_url;