File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export interface Props {
14
14
showImportMap? : boolean
15
15
clearConsole? : boolean
16
16
sfcOptions? : SFCOptions
17
- layout? : string
17
+ layout? : ' horizontal ' | ' vertical '
18
18
ssr? : boolean
19
19
previewOptions? : {
20
20
headHTML? : string
@@ -38,9 +38,9 @@ const props = withDefaults(defineProps<Props>(), {
38
38
bodyHTML: ' ' ,
39
39
customCode: {
40
40
importCode: ' ' ,
41
- useCode: ' '
42
- }
43
- })
41
+ useCode: ' ' ,
42
+ },
43
+ }),
44
44
})
45
45
46
46
if (! props .editor ) {
@@ -61,7 +61,7 @@ sfcOptions.script.fs = {
61
61
readFile(file : string ) {
62
62
if (file .startsWith (' /' )) file = file .slice (1 )
63
63
return store .state .files [file ].code
64
- }
64
+ },
65
65
}
66
66
67
67
store .init ()
Original file line number Diff line number Diff line change 2
2
import { ref , reactive , computed , inject } from ' vue'
3
3
import { Store } from ' ./store'
4
4
5
- const props = defineProps <{ layout? : string }>()
5
+ const props = defineProps <{ layout? : ' horizontal ' | ' vertical ' }>()
6
6
const isVertical = computed (() => props .layout === ' vertical' )
7
7
8
8
const container = ref ()
@@ -13,10 +13,10 @@ const showOutput = ref(store.initialShowOutput)
13
13
14
14
const state = reactive ({
15
15
dragging: false ,
16
- split: 50
16
+ split: 50 ,
17
17
})
18
18
19
- const boundSplit = computed (()=> {
19
+ const boundSplit = computed (() => {
20
20
const { split } = state
21
21
return split < 20 ? 20 : split > 80 ? 80 : split
22
22
})
@@ -53,7 +53,7 @@ function dragEnd() {
53
53
:class =" {
54
54
dragging: state.dragging,
55
55
'show-output': showOutput,
56
- vertical: isVertical
56
+ vertical: isVertical,
57
57
}"
58
58
@mousemove =" dragMove"
59
59
@mouseup =" dragEnd"
You can’t perform that action at this time.
0 commit comments