diff --git a/orion-ops-ui/src/components/view/editor/index.vue b/orion-ops-ui/src/components/view/editor/index.vue
index 95ab6218..b3a7480f 100644
--- a/orion-ops-ui/src/components/view/editor/index.vue
+++ b/orion-ops-ui/src/components/view/editor/index.vue
@@ -22,7 +22,6 @@
import { createDefaultOptions } from './core';
import { onBeforeUnmount, onMounted, ref, watch } from 'vue';
import { useAppStore } from '@/store';
- import { language as shellLanguage } from 'monaco-editor/esm/vs/basic-languages/shell/shell.js';
const appStore = useAppStore();
@@ -83,48 +82,6 @@
emits('update:modelValue', value);
emits('change', value);
});
-
- // FIXME test containerClass
- // TODO
- // 代码提示
- monaco.languages.registerCompletionItemProvider('shell', {
- provideCompletionItems() {
- const suggestions: any = [];
- // 这个keywords就是java.java文件中有的
- shellLanguage.keywords?.forEach((item: any) => {
- suggestions.push({
- label: item,
- kind: monaco.languages.CompletionItemKind.Keyword,
- insertText: item,
- });
- });
- shellLanguage.operators?.forEach((item: any) => {
- suggestions.push({
- label: item,
- kind: monaco.languages.CompletionItemKind.Operator,
- insertText: item,
- });
- });
- shellLanguage.builtinFunctions?.forEach((item: any) => {
- suggestions.push({
- label: item,
- kind: monaco.languages.CompletionItemKind.Function,
- insertText: item,
- });
- });
- shellLanguage.builtinVariables?.forEach((item: any) => {
- suggestions.push({
- label: item,
- kind: monaco.languages.CompletionItemKind.Variable,
- insertText: item,
- });
- });
- return {
- suggestions,
- };
- },
- });
-
emits('editor-mounted', editor);
};
@@ -166,10 +123,10 @@
}
});
- onMounted(() => {
- init();
- });
+ // 初始化
+ onMounted(init);
+ // 卸载
onBeforeUnmount(() => {
editor?.dispose();
editor = undefined;
diff --git a/orion-ops-ui/src/components/view/shell-editor/shell-editor-modal.vue b/orion-ops-ui/src/components/view/shell-editor/shell-editor-modal.vue
new file mode 100644
index 00000000..06afb00a
--- /dev/null
+++ b/orion-ops-ui/src/components/view/shell-editor/shell-editor-modal.vue
@@ -0,0 +1,106 @@
+
+