博客 window.open() gongasd

This commit is contained in:
simple321vip
2022-04-11 01:01:11 +08:00
parent eb9ffdf27b
commit fc2aa9d22b
8 changed files with 67 additions and 3 deletions
+6 -1
View File
@@ -11,6 +11,8 @@ import MdEditor from 'md-editor-v3';
import 'md-editor-v3/lib/style.css';
import { reactive, ref } from 'vue';
import { get_blogs } from '../../api/blog'
import router from '../../router/index'
type Blog = {
blog_id: number,
@@ -36,7 +38,10 @@ text.value = "开始吧肿瘤"
const openBlog = () => {
window.open("11111")
const { href } = router.resolve({
path: '/blog=1'
});
window.open(href, '_blank');
}
</script>
+19
View File
@@ -0,0 +1,19 @@
<template>
<md-editor v-model="text" previewOnly />
</template>
<script setup lang="ts">
import MdEditor from 'md-editor-v3';
import { ref } from 'vue';
import { useRoute } from 'vue-router'
import { get_blog } from '../../api/blog'
let text = ref<string>('')
const route = useRoute()
get_blog(route.query).then(response => {
console.log(response.data)
})
</script>
<style>
</style>
+1
View File
@@ -92,6 +92,7 @@ const onLeave = () => {
align-items: center;
width: 90px;
height: 35px;
padding-left: 15px;
}
.page_title {
font-size: 14px;
+1
View File
@@ -81,6 +81,7 @@ const onLeave = () => {
align-items: center;
width: 90px;
height: 35px;
padding-left: 15px;
}
.page_title {
font-size: 14px;
+2 -1
View File
@@ -36,6 +36,7 @@
<el-button class="plus_button" @click="addPage">+</el-button>
</div>
<div></div>
</div>
</template>
@@ -143,7 +144,7 @@ const addPage = () => {
.nav_tabs {
display: flex;
flex-direction: column;
width: 70px;
width: 55px;
padding: 0px;
}