mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
fix: no voice in speech page; custom personal page redirect notworking. feat: sync sroll bar between question display page an obs component
This commit is contained in:
32
src/components/MonacoEditorComponent.vue
Normal file
32
src/components/MonacoEditorComponent.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<div ref="editorContainer" :style="`height: ${height}px;`"></div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { editor } from 'monaco-editor'; // 全部导入
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
const value = defineModel<string>('value')
|
||||
|
||||
const { language, height = 400 } = defineProps<{
|
||||
language: string
|
||||
height?: number
|
||||
}>()
|
||||
|
||||
const editorContainer = ref()
|
||||
|
||||
onMounted(() => {
|
||||
const e = editor.create(editorContainer.value, {
|
||||
value: value.value,
|
||||
language: language,
|
||||
minimap: {
|
||||
enabled: true
|
||||
},
|
||||
colorDecorators: true,
|
||||
automaticLayout: true
|
||||
})
|
||||
e.onDidChangeModelContent(() => {
|
||||
value.value = e.getValue()
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { VideoCollectTable } from '@/api/api-models'
|
||||
import { CURRENT_HOST } from '@/data/constants';
|
||||
import router from '@/router'
|
||||
import { Clock24Regular, NumberRow24Regular } from '@vicons/fluent'
|
||||
import {
|
||||
@@ -28,7 +29,7 @@ const renderCountdown: CountdownProps['render'] = (info: { hours: number; minute
|
||||
function onClick() {
|
||||
if (props.canClick == true) {
|
||||
if (props.from == 'user') {
|
||||
window.open('https://vtsuru.live/video-collect/' + props.item.shortId, '_blank')
|
||||
window.open(`${CURRENT_HOST}video-collect/` + props.item.shortId, '_blank')
|
||||
} else {
|
||||
router.push({ name: 'manage-videoCollect-Detail', params: { id: props.item.id } })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user