feat: 🚀 图片排序

This commit is contained in:
2025-07-17 15:51:07 +08:00
parent e2261c5fc4
commit fd0aaee998
4 changed files with 6 additions and 7 deletions

View File

@@ -60,7 +60,7 @@ const getQAListDetails = async () => {
//这里是传给基本信息组件的表单数据
dataStore.editRuleForm = cloneDeep(data);
if (!data.answer) {
editorRef!.value!.clearEditor();
editorRef?.value?.clearEditor();
}
// dataStore.editRuleForm.answer = convertSpanToDiv(dataStore.editRuleForm.answer);
@@ -97,11 +97,11 @@ const handleReset = () => {
const resetFields = () => {
if (!formRef.value!.ruleFormRef) return;
formRef!.value!.ruleFormRef.resetFields();
editorRef!.value!.clearEditor();
editorRef?.value?.clearEditor();
for (let key in dataStore.editRuleForm) {
dataStore.editRuleForm[key] = "";
}
dataStore.editRuleForm.sort = 1;
dataStore.editRuleForm.sort = 0;
// dataStore.value = "";
};

View File

@@ -80,7 +80,7 @@ const getArticleListDetails = async () => {
const { data } = result;
dataStore.editRuleForm = data;
if (!data.content) {
editorRef.value.clearEditor(); // 调用子组件的清空方法
editorRef?.value?.clearEditor(); // 调用子组件的清空方法
}
// dataStore.editRuleForm.content = convertSpanToDiv(dataStore.editRuleForm.content);
let is = dataStore.editFormData[1].options.some((item: any) =>
@@ -151,7 +151,7 @@ const handleConfirmClick = () => {
const handleReset = () => {
if ($route.query.type === "add") {
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
editorRef.value.clearEditor(); // 调用子组件的清空方法
editorRef?.value?.clearEditor(); // 调用子组件的清空方法
// if (!data.detail) {
// dataStore.detail = "";
// editorRef.value.clearEditor(); // 调用子组件的清空方法

View File

@@ -40,11 +40,10 @@ export const initDetailParams = (dataStore: any, data: any, editorRef: any) => {
stock_qty: data.stock_qty,
id: data.id
});
console.log(dataStore.basicInfoRuleForm, "= dataStore.basicInfoRuleForm=");
//详情
if (!data.detail) {
dataStore.detail = "";
editorRef.value.clearEditor(); // 调用子组件的清空方法
editorRef?.value?.clearEditor(); // 调用子组件的清空方法
} else {
dataStore.detail = cloneDeep(data.detail);
}