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 {
1818 store? : Store
1919 autoResize? : boolean
2020 showCompileOutput? : boolean
21+ showOpenSource? : boolean
2122 showImportMap? : boolean
2223 showTsConfig? : boolean
2324 clearConsole? : boolean
@@ -53,6 +54,7 @@ const props = withDefaults(defineProps<Props>(), {
5354 store : () => useStore (),
5455 autoResize: true ,
5556 showCompileOutput: true ,
57+ showOpenSource: false ,
5658 showImportMap: true ,
5759 showTsConfig: true ,
5860 clearConsole: true ,
@@ -105,6 +107,7 @@ defineExpose({ reload })
105107 ref =" output"
106108 :editor-component =" editor"
107109 :show-compile-output =" props.showCompileOutput"
110+ :show-open-source =" props.showOpenSource"
108111 :ssr =" !!props.ssr"
109112 />
110113 </template >
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ import {
1010const props = defineProps <{
1111 editorComponent: EditorComponentType
1212 showCompileOutput? : boolean
13- ssr: boolean
13+ ssr: boolean ,
14+ showOpenSource? : boolean
1415}>()
1516
1617const { store } = inject (injectKeyProps )!
@@ -34,7 +35,7 @@ const mode = computed<OutputModes>({
3435})
3536
3637const showSourceMap = computed (() => {
37- return mode .value === ' js' || mode .value === ' ssr'
38+ return props . showOpenSource && mode .value === ' js' || mode .value === ' ssr'
3839})
3940
4041function openSourceMap() {
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ const App = {
5858 theme : theme . value ,
5959 previewTheme : previewTheme . value ,
6060 editor : MonacoEditor ,
61+ showOpenSource : true ,
6162 // layout: 'vertical',
6263 ssr : true ,
6364 sfcOptions : {
You can’t perform that action at this time.
0 commit comments