File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export interface Props {
18
18
store? : Store
19
19
autoResize? : boolean
20
20
showCompileOutput? : boolean
21
+ showOpenSource? : boolean
21
22
showImportMap? : boolean
22
23
showTsConfig? : boolean
23
24
clearConsole? : boolean
@@ -53,6 +54,7 @@ const props = withDefaults(defineProps<Props>(), {
53
54
store : () => useStore (),
54
55
autoResize: true ,
55
56
showCompileOutput: true ,
57
+ showOpenSource:false ,
56
58
showImportMap: true ,
57
59
showTsConfig: true ,
58
60
clearConsole: true ,
@@ -105,6 +107,7 @@ defineExpose({ reload })
105
107
ref =" output"
106
108
:editor-component =" editor"
107
109
:show-compile-output =" props.showCompileOutput"
110
+ :show-open-source =" props.showOpenSource"
108
111
:ssr =" !!props.ssr"
109
112
/>
110
113
</template >
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ import {
10
10
const props = defineProps <{
11
11
editorComponent: EditorComponentType
12
12
showCompileOutput? : boolean
13
- ssr: boolean
13
+ ssr: boolean ,
14
+ showOpenSource? : boolean
14
15
}>()
15
16
16
17
const { store } = inject (injectKeyProps )!
@@ -34,7 +35,7 @@ const mode = computed<OutputModes>({
34
35
})
35
36
36
37
const showSourceMap = computed (() => {
37
- return mode .value === ' js' || mode .value === ' ssr'
38
+ return props . showOpenSource && mode .value === ' js' || mode .value === ' ssr'
38
39
})
39
40
40
41
function openSourceMap() {
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ const App = {
58
58
theme : theme . value ,
59
59
previewTheme : previewTheme . value ,
60
60
editor : MonacoEditor ,
61
+ showOpenSource : true ,
61
62
// layout: 'vertical',
62
63
ssr : true ,
63
64
sfcOptions : {
You can’t perform that action at this time.
0 commit comments