diff --git a/null/2023/03/31/微信图片_20230309105034_20230331133032A001.png b/null/2023/03/31/微信图片_20230309105034_20230331133032A001.png new file mode 100644 index 000000000..01a74043b Binary files /dev/null and b/null/2023/03/31/微信图片_20230309105034_20230331133032A001.png differ diff --git a/null/2023/03/31/微信图片_20230309105034_20230331133325A001.png b/null/2023/03/31/微信图片_20230309105034_20230331133325A001.png new file mode 100644 index 000000000..01a74043b Binary files /dev/null and b/null/2023/03/31/微信图片_20230309105034_20230331133325A001.png differ diff --git a/null/2023/03/31/微信图片_20230309105034_20230331133414A002.png b/null/2023/03/31/微信图片_20230309105034_20230331133414A002.png new file mode 100644 index 000000000..01a74043b Binary files /dev/null and b/null/2023/03/31/微信图片_20230309105034_20230331133414A002.png differ diff --git a/ruoyi-file/pom.xml b/ruoyi-file/pom.xml new file mode 100644 index 000000000..117edcebe --- /dev/null +++ b/ruoyi-file/pom.xml @@ -0,0 +1,35 @@ + + + + ruoyi-vue-plus + com.ruoyi + 4.6.0 + + 4.0.0 + + ruoyi-file + + + 文件存放模块 + + + + + + + com.ruoyi + ruoyi-common + + + + + + + + diff --git a/ruoyi-ui/src/utils/loadBeautifier.js b/ruoyi-ui/src/utils/loadBeautifier.js new file mode 100644 index 000000000..cec9ccd2f --- /dev/null +++ b/ruoyi-ui/src/utils/loadBeautifier.js @@ -0,0 +1,28 @@ +import loadScript from './loadScript' +import ELEMENT from 'element-ui' +import pluginsConfig from './pluginsConfig' + +let beautifierObj + +export default function loadBeautifier(cb) { + const { beautifierUrl } = pluginsConfig + if (beautifierObj) { + cb(beautifierObj) + return + } + + const loading = ELEMENT.Loading.service({ + fullscreen: true, + lock: true, + text: '格式化资源加载中...', + spinner: 'el-icon-loading', + background: 'rgba(255, 255, 255, 0.5)' + }) + + loadScript(beautifierUrl, () => { + loading.close() + // eslint-disable-next-line no-undef + beautifierObj = beautifier + cb(beautifierObj) + }) +} diff --git a/ruoyi-ui/src/utils/loadMonaco.js b/ruoyi-ui/src/utils/loadMonaco.js new file mode 100644 index 000000000..9bb64f14a --- /dev/null +++ b/ruoyi-ui/src/utils/loadMonaco.js @@ -0,0 +1,40 @@ +import loadScript from './loadScript' +import ELEMENT from 'element-ui' +import pluginsConfig from './pluginsConfig' + +// monaco-editor单例 +let monacoEidtor + +/** + * 动态加载monaco-editor cdn资源 + * @param {Function} cb 回调,必填 + */ +export default function loadMonaco(cb) { + if (monacoEidtor) { + cb(monacoEidtor) + return + } + + const { monacoEditorUrl: vs } = pluginsConfig + + // 使用element ui实现加载提示 + const loading = ELEMENT.Loading.service({ + fullscreen: true, + lock: true, + text: '编辑器资源初始化中...', + spinner: 'el-icon-loading', + background: 'rgba(255, 255, 255, 0.5)' + }) + + !window.require && (window.require = {}) + !window.require.paths && (window.require.paths = {}) + window.require.paths.vs = vs + + loadScript(`${vs}/loader.js`, () => { + window.require(['vs/editor/editor.main'], () => { + loading.close() + monacoEidtor = window.monaco + cb(monacoEidtor) + }) + }) +} diff --git a/ruoyi-ui/src/views/tool/build/FormDrawer.vue b/ruoyi-ui/src/views/tool/build/FormDrawer.vue new file mode 100644 index 000000000..49f737da3 --- /dev/null +++ b/ruoyi-ui/src/views/tool/build/FormDrawer.vue @@ -0,0 +1,333 @@ +