mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
style: remove code theme option
This commit is contained in:
parent
d42f98bcf1
commit
c5f570e391
@ -137,34 +137,14 @@ const WxRenderer = function (opts) {
|
||||
numbers.push('<li></li>')
|
||||
}
|
||||
const lang = infoString || '';
|
||||
const codeTheme = store.state.codeTheme;
|
||||
let result;
|
||||
|
||||
switch (codeTheme) {
|
||||
case 'wechat':
|
||||
result = `
|
||||
<section class="code-snippet__${codeTheme} code-snippet__js">
|
||||
<ul class="code-snippet__line-index code-snippet__js">${numbers.join('')}</ul>
|
||||
<pre class="code__pre code-snippet__js" data-lang="${lang}">
|
||||
${codeLines.join('')}
|
||||
</pre>
|
||||
</section>
|
||||
`;
|
||||
break;
|
||||
case 'github':
|
||||
result = `
|
||||
const codeTheme = 'github';
|
||||
return `
|
||||
<section class="code-snippet__${codeTheme}">
|
||||
<pre class="code__pre" data-lang="${lang}">
|
||||
${codeLines.join('')}
|
||||
</pre>
|
||||
</section>
|
||||
`;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
renderer.codespan = (text, infoString) => `<code ${getStyles('codespan')}>${text}</code>`
|
||||
renderer.listitem = text => `<span ${getStyles('listitem')}><span style="margin-right: 10px;"><%s/></span>${text}</span>`
|
||||
|
@ -47,16 +47,6 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="selectCodeTheme" size="mini" placeholder="选择代码块样式" clearable @change="codeThemeChanged">
|
||||
<el-option v-for="theme in config.codeThemeOption" :key="theme.value"
|
||||
:label="theme.label"
|
||||
:value="theme.value">
|
||||
<span class="select-item-left">{{ theme.label }}</span>
|
||||
<span class="select-item-right">{{ theme.desc }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-tooltip content="自定义颜色" :effect="effect" placement="top">
|
||||
<el-color-picker v-model="selectColor" size="mini" show-alpha @change="colorChanged"></el-color-picker>
|
||||
</el-tooltip>
|
||||
|
Loading…
Reference in New Issue
Block a user