fix: fix type error 'window.open is not a function'

修复错误
This commit is contained in:
yanglbme 2019-12-10 21:47:04 +08:00
parent f01c3fe280
commit 2a8f4d9179
4 changed files with 19 additions and 32 deletions

View File

@ -198,8 +198,8 @@ let app = new Vue({
localStorage.removeItem('__editor_content');
localStorage.removeItem('__css_content');
this.setDefaultContent();
this.editor.focus();
this.cssEditor.setValue(DEFAULT_CSS_CONTENT);
this.editor.focus();
this.refresh();
}).catch(() => {
this.editor.focus();
@ -263,9 +263,6 @@ let app = new Vue({
type: 'warning'
});
}
},
visit(url) {
window.open(url);
}
},
updated() {

View File

@ -44,12 +44,4 @@ strong {
/* 脚注文字 */
footnote {
}
`

View File

@ -16,7 +16,6 @@ let setColor = setColorWithTemplate(default_theme);
function customCssWithTemplate(jsonString, color) {
let custom_theme = JSON.parse(JSON.stringify(default_theme));
// block
console.log(jsonString)
custom_theme.block.h1['border-bottom'] = `2px solid ${color}`;
custom_theme.block.h2['background'] = color;
custom_theme.block.h3['border-left'] = `3px solid ${color}`;

View File

@ -113,10 +113,7 @@
</div>
</section>
</el-col>
<transition
name="custom-classes-transition"
enter-active-class="animated bounceInRight"
>
<transition name="custom-classes-transition" enter-active-class="animated bounceInRight">
<el-col id="cssBox" :span="12" v-show="showBox">
<textarea id="cssEditor" type="textarea" placeholder="Custom css here.">
</textarea>
@ -135,10 +132,14 @@
<p>扫码关注我的公众号,原创技术文章第一时间推送!</p>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="success" plain @click="visit('https://github.com/doocs/md')">GitHub 仓库
<a href="https://github.com/doocs/md" target="_blank">
<el-button type="success" plain>GitHub 仓库
</el-button>
<el-button type="success" plain @click="visit('https://gitee.com/doocs/md')">Gitee 仓库
</a>
<a href="https://gitee.com/doocs/md" target="_blank">
<el-button type="success" plain>Gitee 仓库
</el-button>
</a>
</span>
</el-dialog>
</div>
@ -171,5 +172,3 @@
</body>
</html>