Closed ckvv closed 1 year ago
<script setup> import '@vue/repl/style.css'; import { Repl, ReplStore } from '@vue/repl'; import Monaco from '@vue/repl/monaco-editor'; import { ref, watch } from 'vue'; const code = ref(`<template>11</template>`) const store = new ReplStore(); watch(code, (v) => { store.setFiles({'src/App.vue': v}) }, { immediate: true }); </script> <template> <div> <input type="text" v-model="code"> <Repl :editor="Monaco" :store="store" :clear-console="false" /> </div> </template> <style> .editor { min-height: 300px !important; } </style>