Skip to content

Commit c391ba7

Browse files
committed
Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into feature/bpm
2 parents c62833f + 2b38c02 commit c391ba7

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed
File renamed without changes.

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"*.ts": "$(capture).test.ts, $(capture).test.tsx",
139139
"*.tsx": "$(capture).test.ts, $(capture).test.tsx",
140140
"*.env": "$(capture).env.*",
141-
"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"
141+
"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"
142142
},
143143
"terminal.integrated.scrollback": 10000,
144144
"nuxt.isNuxtApp": false

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"description": "基于vue3、vite4、element-plus、typesScript",
55
"author": "xingyu",
66
"private": false,
7-
"type": "module",
87
"scripts": {
98
"i": "pnpm install",
109
"dev": "vite --mode env.local",

postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
plugins: {
33
autoprefixer: {}
44
}
File renamed without changes.

src/views/infra/build/index.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ const makeTemplate = () => {
135135
136136
/** 复制 **/
137137
const copy = async (text: string) => {
138-
const { copy, copied, isSupported } = useClipboard({ source: text })
138+
const textToCopy = JSON.stringify(text, null, 2)
139+
const { copy, copied, isSupported } = useClipboard({ source: textToCopy })
139140
if (!isSupported) {
140141
message.error(t('common.copyError'))
141142
} else {
@@ -149,17 +150,18 @@ const copy = async (text: string) => {
149150
/**
150151
* 代码高亮
151152
*/
152-
const highlightedCode = (code) => {
153+
const highlightedCode = (code: string) => {
153154
// 处理语言和代码
154155
let language = 'json'
155156
if (formType.value === 2) {
156157
language = 'xml'
157158
}
159+
// debugger
158160
if (!isString(code)) {
159-
code = JSON.stringify(code)
161+
code = JSON.stringify(code, null, 2)
160162
}
161163
// 高亮
162-
const result = hljs.highlight(language, code, true)
164+
const result = hljs.highlight(code, { language: language, ignoreIllegals: true })
163165
return result.value || ' '
164166
}
165167

0 commit comments

Comments
 (0)