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 {
1414 showImportMap? : boolean
1515 clearConsole? : boolean
1616 sfcOptions? : SFCOptions
17- layout? : string
17+ layout? : ' horizontal ' | ' vertical '
1818 ssr? : boolean
1919 previewOptions? : {
2020 headHTML? : string
@@ -38,9 +38,9 @@ const props = withDefaults(defineProps<Props>(), {
3838 bodyHTML: ' ' ,
3939 customCode: {
4040 importCode: ' ' ,
41- useCode: ' '
42- }
43- })
41+ useCode: ' ' ,
42+ },
43+ }),
4444})
4545
4646if (! props .editor ) {
@@ -61,7 +61,7 @@ sfcOptions.script.fs = {
6161 readFile(file : string ) {
6262 if (file .startsWith (' /' )) file = file .slice (1 )
6363 return store .state .files [file ].code
64- }
64+ },
6565}
6666
6767store .init ()
Original file line number Diff line number Diff line change 22import { ref , reactive , computed , inject } from ' vue'
33import { Store } from ' ./store'
44
5- const props = defineProps <{ layout? : string }>()
5+ const props = defineProps <{ layout? : ' horizontal ' | ' vertical ' }>()
66const isVertical = computed (() => props .layout === ' vertical' )
77
88const container = ref ()
@@ -13,10 +13,10 @@ const showOutput = ref(store.initialShowOutput)
1313
1414const state = reactive ({
1515 dragging: false ,
16- split: 50
16+ split: 50 ,
1717})
1818
19- const boundSplit = computed (()=> {
19+ const boundSplit = computed (() => {
2020 const { split } = state
2121 return split < 20 ? 20 : split > 80 ? 80 : split
2222})
@@ -53,7 +53,7 @@ function dragEnd() {
5353 :class =" {
5454 dragging: state.dragging,
5555 'show-output': showOutput,
56- vertical: isVertical
56+ vertical: isVertical,
5757 }"
5858 @mousemove =" dragMove"
5959 @mouseup =" dragEnd"
You can’t perform that action at this time.
0 commit comments