Browse Source

代码生成预览隐藏临时的文本域.

pull/373/head
Hacker 3 years ago committed by Gitee
parent
commit
b5301a3632
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
  1. 2
      ruoyi-generator/src/main/resources/templates/tool/gen/gen.html

2
ruoyi-generator/src/main/resources/templates/tool/gen/gen.html

@ -152,7 +152,7 @@
var language = templateName.substring(templateName.lastIndexOf(".") + 1);
var highCode = hljs.highlight(language, value).value;
items.push({
title: templateName , content: "<pre class=\"layui-code\"><a style=\"float:right\" href=\"javascript:copyText('" + codeName + "')\"><i class=\"fa fa-copy\"></i> 复制</a><code id=\"" + codeName + "\">" + highCode + "</code></pre><textarea id=\"t_" + codeName + "\"></textarea><script>function copyText(codeName){var text = document.getElementById(codeName).innerText;var input = document.getElementById(\"t_\"+codeName);input.value = text;input.select();document.execCommand(\"copy\");$.modal.msgSuccess(\"\");}<\/script>"
title: templateName , content: "<pre class=\"layui-code\"><a style=\"float:right\" href=\"javascript:copyText('" + codeName + "')\"><i class=\"fa fa-copy\"></i> 复制</a><code id=\"" + codeName + "\">" + highCode + "</code></pre><textarea id=\"t_" + codeName + "\" style='position: absolute;top: 0;left: 0;opacity: 0;z-index: -10;'></textarea><script>function copyText(codeName){var text = document.getElementById(codeName).innerText;var input = document.getElementById(\"t_\"+codeName);input.value = text;input.select();document.execCommand(\"copy\");$.modal.msgSuccess(\"\");}<\/script>"
})
}
});

Loading…
Cancel
Save