mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
fix: fix type error 'window.open is not a function'
修复错误
This commit is contained in:
parent
f01c3fe280
commit
2a8f4d9179
@ -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() {
|
||||||
|
@ -44,12 +44,4 @@ strong {
|
|||||||
/* 脚注文字 */
|
/* 脚注文字 */
|
||||||
footnote {
|
footnote {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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}`;
|
||||||
|
29
index.html
29
index.html
@ -21,12 +21,12 @@
|
|||||||
<link rel="stylesheet" href="assets/css/app.css">
|
<link rel="stylesheet" href="assets/css/app.css">
|
||||||
|
|
||||||
|
|
||||||
<!-- codemirror -->
|
<!-- codemirror -->
|
||||||
<link rel="stylesheet" href="libs/css/codemirror.min.css">
|
<link rel="stylesheet" href="libs/css/codemirror.min.css">
|
||||||
<link rel="stylesheet" href="libs/css/show-hint.css">
|
<link rel="stylesheet" href="libs/css/show-hint.css">
|
||||||
<link rel="stylesheet" href="libs/css/style-mirror.css">
|
<link rel="stylesheet" href="libs/css/style-mirror.css">
|
||||||
<link href="https://cdn.jsdelivr.net/npm/animate.css@3.5.1" rel="stylesheet" type="text/css">
|
<link href="https://cdn.jsdelivr.net/npm/animate.css@3.5.1" rel="stylesheet" type="text/css">
|
||||||
<!-- 默认CSS -->
|
<!-- 默认CSS -->
|
||||||
<script src="assets/scripts/themes/default-theme-css.js"></script>
|
<script src="assets/scripts/themes/default-theme-css.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@ -113,15 +113,12 @@
|
|||||||
</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>
|
||||||
</el-col>
|
</el-col>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-main>
|
</el-main>
|
||||||
@ -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>
|
<el-button type="success" plain>GitHub 仓库
|
||||||
<el-button type="success" plain @click="visit('https://gitee.com/doocs/md')">Gitee 仓库
|
</el-button>
|
||||||
</el-button>
|
</a>
|
||||||
|
<a href="https://gitee.com/doocs/md" target="_blank">
|
||||||
|
<el-button type="success" plain>Gitee 仓库
|
||||||
|
</el-button>
|
||||||
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -147,7 +148,7 @@
|
|||||||
<script src="libs/scripts/axios.min.js"></script>
|
<script src="libs/scripts/axios.min.js"></script>
|
||||||
<script src="libs/scripts/marked.min.js"></script>
|
<script src="libs/scripts/marked.min.js"></script>
|
||||||
|
|
||||||
<!-- codemirror -->
|
<!-- codemirror -->
|
||||||
<script src="libs/scripts/codemirror/codemirror.min.js"></script>
|
<script src="libs/scripts/codemirror/codemirror.min.js"></script>
|
||||||
<script src="libs/scripts/codemirror/css.js"></script>
|
<script src="libs/scripts/codemirror/css.js"></script>
|
||||||
<script src="libs/scripts/codemirror/matchbrackets.js"></script>
|
<script src="libs/scripts/codemirror/matchbrackets.js"></script>
|
||||||
@ -171,5 +172,3 @@
|
|||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user