fix: 统一修改富文本详情样式问题
This commit is contained in:
parent
7ffa913080
commit
b6cad47426
|
@ -57,6 +57,7 @@
|
||||||
"dayjs": "^1.11.9",
|
"dayjs": "^1.11.9",
|
||||||
"echarts": "^5.4.3",
|
"echarts": "^5.4.3",
|
||||||
"fastq": "^1.15.0",
|
"fastq": "^1.15.0",
|
||||||
|
"github-markdown-css": "^5.5.1",
|
||||||
"hotbox-minder": "1.0.15",
|
"hotbox-minder": "1.0.15",
|
||||||
"jsencrypt": "^3.3.2",
|
"jsencrypt": "^3.3.2",
|
||||||
"jsonpath-plus": "^8.0.0",
|
"jsonpath-plus": "^8.0.0",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="p-1"> <MsAvatar avatar="word" /></div>
|
<div class="p-1"> <MsAvatar avatar="word" /></div>
|
||||||
<div class="flex w-full flex-col">
|
<div class="flex w-full flex-col">
|
||||||
<div class="font-medium text-[var(--color-text-1)]">{{ props.element.createUser }}</div>
|
<div class="font-medium text-[var(--color-text-1)]">{{ props.element.createUser }}</div>
|
||||||
<div v-dompurify-html="props.element.content" class="mt-[4px] text-[var(--color-text-2)]"></div>
|
<div v-dompurify-html="props.element.content" class="markdown-body mt-[4px]"></div>
|
||||||
|
|
||||||
<div class="mb-4 mt-[16px] flex flex-row items-center">
|
<div class="mb-4 mt-[16px] flex flex-row items-center">
|
||||||
<div class="text-[var(--color-text-4)]">{{
|
<div class="text-[var(--color-text-4)]">{{
|
||||||
|
|
|
@ -6,7 +6,7 @@ import '@arco-themes/vue-ms-theme-default/index.less';
|
||||||
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||||
import SvgIcon from '@/components/pure/svg-icon/index.vue';
|
import SvgIcon from '@/components/pure/svg-icon/index.vue';
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
|
import 'github-markdown-css/github-markdown-light.css';
|
||||||
// eslint-disable-next-line import/no-unresolved
|
// eslint-disable-next-line import/no-unresolved
|
||||||
import 'virtual:svg-icons-register';
|
import 'virtual:svg-icons-register';
|
||||||
import directive from './directive';
|
import directive from './directive';
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
:placeholder="t('bugManagement.edit.contentPlaceholder')"
|
:placeholder="t('bugManagement.edit.contentPlaceholder')"
|
||||||
:upload-image="handleUploadImage"
|
:upload-image="handleUploadImage"
|
||||||
/>
|
/>
|
||||||
<div v-else v-dompurify-html="form?.description || '-'" class="text-[var(--color-text-3)]"></div>
|
<div v-else v-dompurify-html="form?.description || '-'" class="markdown-body"></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="contentEditAble" class="mt-[8px] flex justify-end">
|
<div v-if="contentEditAble" class="mt-[8px] flex justify-end">
|
||||||
<a-button type="secondary" @click="handleCancel">{{ t('common.cancel') }}</a-button>
|
<a-button type="secondary" @click="handleCancel">{{ t('common.cancel') }}</a-button>
|
||||||
|
@ -159,41 +159,41 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {Message} from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
|
||||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||||
import {FormRuleItem} from '@/components/pure/ms-form-create/types';
|
import { FormRuleItem } from '@/components/pure/ms-form-create/types';
|
||||||
import MsIconfont from '@/components/pure/ms-icon-font/index.vue';
|
import MsIconfont from '@/components/pure/ms-icon-font/index.vue';
|
||||||
import MsRichText from '@/components/pure/ms-rich-text/MsRichText.vue';
|
import MsRichText from '@/components/pure/ms-rich-text/MsRichText.vue';
|
||||||
import MsFileList from '@/components/pure/ms-upload/fileList.vue';
|
import MsFileList from '@/components/pure/ms-upload/fileList.vue';
|
||||||
import {MsFileItem} from '@/components/pure/ms-upload/types';
|
import { MsFileItem } from '@/components/pure/ms-upload/types';
|
||||||
import RelateFileDrawer from '@/components/business/ms-link-file/associatedFileDrawer.vue';
|
import RelateFileDrawer from '@/components/business/ms-link-file/associatedFileDrawer.vue';
|
||||||
import TransferModal from '@/views/case-management/caseManagementFeature/components/tabContent/transferModal.vue';
|
import TransferModal from '@/views/case-management/caseManagementFeature/components/tabContent/transferModal.vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
checkFileIsUpdateRequest,
|
checkFileIsUpdateRequest,
|
||||||
createOrUpdateBug,
|
createOrUpdateBug,
|
||||||
deleteFileOrCancelAssociation,
|
deleteFileOrCancelAssociation,
|
||||||
downloadFileRequest,
|
downloadFileRequest,
|
||||||
editorUploadFile,
|
editorUploadFile,
|
||||||
getAssociatedFileList,
|
getAssociatedFileList,
|
||||||
previewFile,
|
previewFile,
|
||||||
transferFileRequest,
|
transferFileRequest,
|
||||||
updateFile,
|
updateFile,
|
||||||
uploadOrAssociationFile,
|
uploadOrAssociationFile,
|
||||||
} from '@/api/modules/bug-management';
|
} from '@/api/modules/bug-management';
|
||||||
import {getModules, getModulesCount} from '@/api/modules/project-management/fileManagement';
|
import { getModules, getModulesCount } from '@/api/modules/project-management/fileManagement';
|
||||||
import {useI18n} from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import {useAppStore} from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
import {downloadByteFile, sleep} from '@/utils';
|
import { downloadByteFile, sleep } from '@/utils';
|
||||||
|
|
||||||
import {BugEditCustomFieldItem, BugEditFormObject} from '@/models/bug-management';
|
import { BugEditCustomFieldItem, BugEditFormObject } from '@/models/bug-management';
|
||||||
import {AssociatedList, AttachFileInfo} from '@/models/caseManagement/featureCase';
|
import { AssociatedList, AttachFileInfo } from '@/models/caseManagement/featureCase';
|
||||||
import {TableQueryParams} from '@/models/common';
|
import { TableQueryParams } from '@/models/common';
|
||||||
|
|
||||||
import {convertToFileByBug, convertToFileByDetail} from '@/views/bug-management/utils';
|
import { convertToFileByBug, convertToFileByDetail } from '@/views/bug-management/utils';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'BugDetailTab',
|
name: 'BugDetailTab',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ defineOptions({
|
||||||
templateId: props.detailInfo.templateId,
|
templateId: props.detailInfo.templateId,
|
||||||
customFields,
|
customFields,
|
||||||
};
|
};
|
||||||
console.log(tmpObj)
|
console.log(tmpObj);
|
||||||
// 执行保存操作
|
// 执行保存操作
|
||||||
const res = await createOrUpdateBug({ request: tmpObj, fileList: fileList.value as unknown as File[] });
|
const res = await createOrUpdateBug({ request: tmpObj, fileList: fileList.value as unknown as File[] });
|
||||||
if (res) {
|
if (res) {
|
||||||
|
|
|
@ -282,7 +282,12 @@
|
||||||
id: JSON.parse(platformInfo.value.demand_platform_config).zentaoId,
|
id: JSON.parse(platformInfo.value.demand_platform_config).zentaoId,
|
||||||
caseId: props.caseId,
|
caseId: props.caseId,
|
||||||
demandPlatform: platformInfo.value.platform_key,
|
demandPlatform: platformInfo.value.platform_key,
|
||||||
demandList,
|
demandList: propsRes.value.selectorStatus === 'all' ? [] : demandList,
|
||||||
|
functionalDemandBatchRequest: {
|
||||||
|
keyword: platformKeyword.value,
|
||||||
|
excludeIds: [...propsRes.value.excludeKeys],
|
||||||
|
selectAll: propsRes.value.selectorStatus === 'all',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
drawerLoading.value = true;
|
drawerLoading.value = true;
|
||||||
|
@ -386,6 +391,8 @@
|
||||||
switch (platformInfo.value.platform_key) {
|
switch (platformInfo.value.platform_key) {
|
||||||
case 'zentao':
|
case 'zentao':
|
||||||
return t('caseManagement.featureCase.zentao');
|
return t('caseManagement.featureCase.zentao');
|
||||||
|
case 'jira':
|
||||||
|
return t('caseManagement.featureCase.jira');
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
:upload-image="handleUploadImage"
|
:upload-image="handleUploadImage"
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
/>
|
/>
|
||||||
<div v-else v-dompurify-html="detailForm?.prerequisite || '-'"></div>
|
<div v-else v-dompurify-html="detailForm?.prerequisite || '-'" class="markdown-body"></div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
field="step"
|
field="step"
|
||||||
|
@ -69,6 +69,7 @@
|
||||||
<div
|
<div
|
||||||
v-if="detailForm.caseEditType === 'TEXT' && !isEditPreposition"
|
v-if="detailForm.caseEditType === 'TEXT' && !isEditPreposition"
|
||||||
v-dompurify-html="detailForm.textDescription || '-'"
|
v-dompurify-html="detailForm.textDescription || '-'"
|
||||||
|
class="markdown-body"
|
||||||
></div>
|
></div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
|
@ -82,7 +83,7 @@
|
||||||
v-model:filed-ids="expectedResultFileIds"
|
v-model:filed-ids="expectedResultFileIds"
|
||||||
:upload-image="handleUploadImage"
|
:upload-image="handleUploadImage"
|
||||||
/>
|
/>
|
||||||
<div v-else v-dompurify-html="detailForm.expectedResult || '-'"></div>
|
<div v-else v-dompurify-html="detailForm.expectedResult || '-'" class="markdown-body"></div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="description" :label="t('caseManagement.featureCase.remark')">
|
<a-form-item field="description" :label="t('caseManagement.featureCase.remark')">
|
||||||
<MsRichText
|
<MsRichText
|
||||||
|
@ -91,7 +92,7 @@
|
||||||
v-model:raw="detailForm.description"
|
v-model:raw="detailForm.description"
|
||||||
:upload-image="handleUploadImage"
|
:upload-image="handleUploadImage"
|
||||||
/>
|
/>
|
||||||
<div v-else v-dompurify-html="detailForm.description || '-'"></div>
|
<div v-else v-dompurify-html="detailForm.description || '-'" class="markdown-body"></div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<div v-if="isEditPreposition" class="flex justify-end">
|
<div v-if="isEditPreposition" class="flex justify-end">
|
||||||
<a-button type="secondary" @click="handleCancel">{{ t('common.cancel') }}</a-button>
|
<a-button type="secondary" @click="handleCancel">{{ t('common.cancel') }}</a-button>
|
||||||
|
|
|
@ -255,7 +255,8 @@ export default {
|
||||||
'caseManagement.featureCase.associatedSuccess': 'Associated with success',
|
'caseManagement.featureCase.associatedSuccess': 'Associated with success',
|
||||||
'caseManagement.featureCase.defectSource': 'defect Source',
|
'caseManagement.featureCase.defectSource': 'defect Source',
|
||||||
'caseManagement.featureCase.sortSuccess': 'Sort successfully',
|
'caseManagement.featureCase.sortSuccess': 'Sort successfully',
|
||||||
'caseManagement.featureCase.zentao': 'zentao',
|
'caseManagement.featureCase.zentao': 'ZenTao',
|
||||||
|
'caseManagement.featureCase.jira': 'JIRA',
|
||||||
'caseManagement.featureCase.searchPlaceholder': 'Search by ID, name, or tag',
|
'caseManagement.featureCase.searchPlaceholder': 'Search by ID, name, or tag',
|
||||||
'caseManagement.featureCase.ModuleOwned': 'Module owned',
|
'caseManagement.featureCase.ModuleOwned': 'Module owned',
|
||||||
};
|
};
|
||||||
|
|
|
@ -251,6 +251,7 @@ export default {
|
||||||
'caseManagement.featureCase.defectSource': '缺陷来源',
|
'caseManagement.featureCase.defectSource': '缺陷来源',
|
||||||
'caseManagement.featureCase.sortSuccess': '排序成功',
|
'caseManagement.featureCase.sortSuccess': '排序成功',
|
||||||
'caseManagement.featureCase.zentao': '禅道',
|
'caseManagement.featureCase.zentao': '禅道',
|
||||||
|
'caseManagement.featureCase.jira': 'JIRA',
|
||||||
'caseManagement.featureCase.searchPlaceholder': '通过ID、名称或标签搜索',
|
'caseManagement.featureCase.searchPlaceholder': '通过ID、名称或标签搜索',
|
||||||
'caseManagement.featureCase.ModuleOwned': '所属模块',
|
'caseManagement.featureCase.ModuleOwned': '所属模块',
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue