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

View File

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

View File

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

View File

@ -113,10 +113,7 @@
</div> </div>
</section> </section>
</el-col> </el-col>
<transition <transition name="custom-classes-transition" enter-active-class="animated bounceInRight">
name="custom-classes-transition"
enter-active-class="animated bounceInRight"
>
<el-col id="cssBox" :span="12" v-show="showBox"> <el-col id="cssBox" :span="12" v-show="showBox">
<textarea id="cssEditor" type="textarea" placeholder="Custom css here."> <textarea id="cssEditor" type="textarea" placeholder="Custom css here.">
</textarea> </textarea>
@ -135,10 +132,14 @@
<p>扫码关注我的公众号,原创技术文章第一时间推送!</p> <p>扫码关注我的公众号,原创技术文章第一时间推送!</p>
</div> </div>
<span slot="footer" class="dialog-footer"> <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>
<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> </el-button>
</a>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -171,5 +172,3 @@
</body> </body>
</html> </html>