File tree Expand file tree Collapse file tree 2 files changed +23
-23
lines changed
Expand file tree Collapse file tree 2 files changed +23
-23
lines changed Original file line number Diff line number Diff line change @@ -2,29 +2,29 @@ import KatexParser from './plugin/KatexParser'
22import { toolbarBtn } from './toolbar-button/toolbarBtn'
33import _ from 'lodash'
44
5- function set ( obj , config ) {
6- for ( let key in config ) {
7- if ( typeof obj [ key ] === 'object' && ! Array . isArray ( obj [ key ] ) ) {
8- set ( obj [ key ] , config )
9- }
10- obj [ key ] = config [ key ]
5+ function set ( obj , config ) {
6+ for ( let key in config ) {
7+ if ( typeof obj [ key ] === 'object' && ! Array . isArray ( obj [ key ] ) ) {
8+ set ( obj [ key ] , config )
119 }
12- return obj
10+ obj [ key ] = config [ key ]
11+ }
12+ return obj
1313}
1414
15- export let defaultConfig = {
16- height : '500px' ,
17- parsers : [
18- KatexParser
19- ] ,
20- toolbarConfig : toolbarBtn ,
21- editorOption : {
22- mode : 'markdown' ,
23- lineNumbers : true ,
24- lineWrapping : true
25- }
15+ export let defaultConfig = {
16+ height : '500px' ,
17+ parsers : [
18+ KatexParser
19+ ] ,
20+ toolbarConfig : toolbarBtn ,
21+ editorOption : {
22+ mode : 'markdown' ,
23+ lineNumbers : true ,
24+ lineWrapping : true
25+ }
2626}
2727
28- export function getConfig ( config ) {
29- return set ( _ . cloneDeep ( defaultConfig ) , config )
28+ export function getConfig ( config ) {
29+ return set ( _ . cloneDeep ( defaultConfig ) , config )
3030}
Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ export default {
6363 },
6464 config: {
6565 type: Object ,
66- default : function () {
67- return defaultConfig
68- }
66+ default : function () {
67+ return defaultConfig
68+ }
6969 }
7070 },
7171 data () {
You can’t perform that action at this time.
0 commit comments