mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
merge
This commit is contained in:
parent
aa317742da
commit
41ab4b5a2f
@ -17,11 +17,12 @@ limitations under the License. -->
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, onUnmounted } from "vue";
|
import { onMounted, ref, onUnmounted } from "vue";
|
||||||
|
import { useDemandLogStore } from "@/store/modules/demand-log";
|
||||||
|
|
||||||
/*global Nullable */
|
/*global Nullable */
|
||||||
|
const demandLogStore = useDemandLogStore();
|
||||||
const monacoInstance = ref();
|
const monacoInstance = ref();
|
||||||
const logContent = ref<Nullable<HTMLDivElement>>(null);
|
const logContent = ref<Nullable<HTMLDivElement>>(null);
|
||||||
const logs = ref<string>("");
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
import("monaco-editor/esm/vs/editor/editor.api").then((monaco) => {
|
import("monaco-editor/esm/vs/editor/editor.api").then((monaco) => {
|
||||||
@ -31,7 +32,7 @@ onMounted(() => {
|
|||||||
function monacoInstanceGen(monaco: any) {
|
function monacoInstanceGen(monaco: any) {
|
||||||
monaco.languages.register({ id: "custom" });
|
monaco.languages.register({ id: "custom" });
|
||||||
monacoInstance.value = monaco.editor.create(logContent.value, {
|
monacoInstance.value = monaco.editor.create(logContent.value, {
|
||||||
value: logs.value,
|
value: demandLogStore.logs,
|
||||||
language: "javascript",
|
language: "javascript",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user