代码生成预览支持高亮显示
This commit is contained in:
79
ruoyi-admin/src/main/resources/static/ajax/libs/highlight/default.min.css
vendored
Normal file
79
ruoyi-admin/src/main/resources/static/ajax/libs/highlight/default.min.css
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
/**
|
||||
* GitHub Gist Theme
|
||||
* Author : Anthony Attard - https://github.com/AnthonyAttard
|
||||
* Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #d73a49;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #6f42c1;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: #005cc5;
|
||||
}
|
||||
|
||||
.hljs-string {
|
||||
color: #032f62;
|
||||
}
|
1102
ruoyi-admin/src/main/resources/static/ajax/libs/highlight/highlight.min.js
vendored
Normal file
1102
ruoyi-admin/src/main/resources/static/ajax/libs/highlight/highlight.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -441,6 +441,25 @@ var sub = {
|
||||
}
|
||||
};
|
||||
|
||||
// 动态加载css文件
|
||||
function loadCss(file, headElem) {
|
||||
var link = document.createElement('link');
|
||||
link.href = file;
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
if (headElem) headElem.appendChild(link);
|
||||
else document.getElementsByTagName('head')[0].appendChild(link);
|
||||
}
|
||||
|
||||
// 动态加载js文件
|
||||
function loadJs(file, headElem) {
|
||||
var script = document.createElement('script');
|
||||
script.src = file;
|
||||
script.type = 'text/javascript';
|
||||
if (headElem) headElem.appendChild(script);
|
||||
else document.getElementsByTagName('head')[0].appendChild(script);
|
||||
}
|
||||
|
||||
/** 设置全局ajax处理 */
|
||||
$.ajaxSetup({
|
||||
complete: function(XMLHttpRequest, textStatus) {
|
||||
|
Reference in New Issue
Block a user