Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into feature/bpm

pull/655/MERGE
YunaiV 2025-01-15 20:50:22 +08:00
commit c391ba7689
6 changed files with 8 additions and 7 deletions

View File

@ -138,7 +138,7 @@
"*.ts": "$(capture).test.ts, $(capture).test.tsx", "*.ts": "$(capture).test.ts, $(capture).test.tsx",
"*.tsx": "$(capture).test.ts, $(capture).test.tsx", "*.tsx": "$(capture).test.ts, $(capture).test.tsx",
"*.env": "$(capture).env.*", "*.env": "$(capture).env.*",
"package.json": "pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.eslintrc-auto-import.json,.gitignore,prettier.config.cjs,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.cjs,.eslintignore" "package.json": "pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.eslintrc-auto-import.json,.gitignore,prettier.config.js,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.js,.eslintignore"
}, },
"terminal.integrated.scrollback": 10000, "terminal.integrated.scrollback": 10000,
"nuxt.isNuxtApp": false "nuxt.isNuxtApp": false

View File

@ -4,7 +4,6 @@
"description": "基于vue3、vite4、element-plus、typesScript", "description": "基于vue3、vite4、element-plus、typesScript",
"author": "xingyu", "author": "xingyu",
"private": false, "private": false,
"type": "module",
"scripts": { "scripts": {
"i": "pnpm install", "i": "pnpm install",
"dev": "vite --mode env.local", "dev": "vite --mode env.local",

View File

@ -1,4 +1,4 @@
export default { module.exports = {
plugins: { plugins: {
autoprefixer: {} autoprefixer: {}
} }

View File

@ -135,7 +135,8 @@ const makeTemplate = () => {
/** 复制 **/ /** 复制 **/
const copy = async (text: string) => { const copy = async (text: string) => {
const { copy, copied, isSupported } = useClipboard({ source: text }) const textToCopy = JSON.stringify(text, null, 2)
const { copy, copied, isSupported } = useClipboard({ source: textToCopy })
if (!isSupported) { if (!isSupported) {
message.error(t('common.copyError')) message.error(t('common.copyError'))
} else { } else {
@ -149,17 +150,18 @@ const copy = async (text: string) => {
/** /**
* 代码高亮 * 代码高亮
*/ */
const highlightedCode = (code) => { const highlightedCode = (code: string) => {
// //
let language = 'json' let language = 'json'
if (formType.value === 2) { if (formType.value === 2) {
language = 'xml' language = 'xml'
} }
// debugger
if (!isString(code)) { if (!isString(code)) {
code = JSON.stringify(code) code = JSON.stringify(code, null, 2)
} }
// //
const result = hljs.highlight(language, code, true) const result = hljs.highlight(code, { language: language, ignoreIllegals: true })
return result.value || ' ' return result.value || ' '
} }