This commit is contained in:
@@ -19,13 +19,11 @@ interface Props {
|
|||||||
nextLine?: number
|
nextLine?: number
|
||||||
currentLineText?: string
|
currentLineText?: string
|
||||||
nextLineText?: string
|
nextLineText?: string
|
||||||
height?: number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
language: "python",
|
language: "python",
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
height: 600,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const code = ref(props.modelValue)
|
const code = ref(props.modelValue)
|
||||||
@@ -260,7 +258,7 @@ watch(
|
|||||||
:tabSize="4"
|
:tabSize="4"
|
||||||
:style="{
|
:style="{
|
||||||
fontSize: props.fontSize + 'px',
|
fontSize: props.fontSize + 'px',
|
||||||
height: props.height + 'px',
|
maxHeight: '600px',
|
||||||
}"
|
}"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
@ready="onReady"
|
@ready="onReady"
|
||||||
|
|||||||
@@ -12,9 +12,8 @@ import { useIntervalFn } from "@vueuse/core"
|
|||||||
import DebugEditor from "./DebugEditor.vue"
|
import DebugEditor from "./DebugEditor.vue"
|
||||||
|
|
||||||
// 组合式函数和类型
|
// 组合式函数和类型
|
||||||
import { code, input, reset, size, output, status } from "../composables/code"
|
import { code, size, output, status } from "../composables/code"
|
||||||
import { Status } from "../types"
|
import { Status } from "../types"
|
||||||
import { debug } from "../api"
|
|
||||||
|
|
||||||
// ==================== Props 和 Emits ====================
|
// ==================== Props 和 Emits ====================
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
Reference in New Issue
Block a user