File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 44 <a
55 href =" https://github.com/vue-styleguidist/vue-live/tree/master/demo"
66 >Check out the source for this demo</a >
7- <h2 >With imported components</h2 >
8- <VueLive :code =" codeTemplate" :layout =" CustomLayout" :components =" registeredComponents" />
7+ <h2 >With imported components and the code-editor lineNumers </h2 >
8+ <VueLive :editorProps = " {lineNumbers: true} " : code =" codeTemplate" :layout =" CustomLayout" :components =" registeredComponents" />
99 <h2 >Display Single File Components</h2 >
1010 <VueLive :code =" codeSfc" :layout =" CustomLayout" />
1111 <h2 >Pure JavaScript code</h2 >
Original file line number Diff line number Diff line change 99 :components =" components"
1010 >
1111 <template v-slot :editor >
12- <PrismEditor v-model =" stableCode" @change =" updatePreview" :language =" prismLang" />
12+ <PrismEditor v-model =" stableCode" @change =" updatePreview" :language =" prismLang" v-bind = " editorProps " />
1313 </template >
1414 <template v-slot :preview >
1515 <Preview
@@ -100,6 +100,15 @@ export default {
100100 layoutProps: {
101101 type: Object ,
102102 default: undefined
103+ },
104+ /**
105+ * they can change the vue-prism-editor props
106+ * there props will use to the vue-prism-editor example { lineNumbers }
107+ * more https://github.com/koca/vue-prism-editor
108+ */
109+ editorProps: {
110+ type: Object ,
111+ default : () => ({})
103112 }
104113 },
105114 data () {
You can’t perform that action at this time.
0 commit comments