mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
refactor: project directory structure
This commit is contained in:
parent
c1193a5b8c
commit
e5a5889931
367 changed files with 710 additions and 756 deletions
34
app/src/components/CodeEditor/CodeEditor.vue
Normal file
34
app/src/components/CodeEditor/CodeEditor.vue
Normal file
|
@ -0,0 +1,34 @@
|
|||
<script setup lang="ts">
|
||||
import {VAceEditor} from 'vue3-ace-editor'
|
||||
import 'ace-builds/src-noconflict/mode-nginx'
|
||||
import 'ace-builds/src-noconflict/theme-monokai'
|
||||
import {computed} from 'vue'
|
||||
|
||||
const props = defineProps(['content', 'defaultHeight'])
|
||||
|
||||
const emit = defineEmits(['update:content'])
|
||||
|
||||
const value = computed({
|
||||
get() {
|
||||
return props.content ?? ''
|
||||
},
|
||||
set(value) {
|
||||
emit('update:content', value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-ace-editor
|
||||
v-model:value="value"
|
||||
lang="nginx"
|
||||
theme="monokai"
|
||||
:style="{
|
||||
minHeight: defaultHeight || '100vh',
|
||||
borderRadius: '5px'
|
||||
}"/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue