博客 window.open() gongasd
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -92,6 +92,7 @@ const onLeave = () => {
|
||||
align-items: center;
|
||||
width: 90px;
|
||||
height: 35px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
.page_title {
|
||||
font-size: 14px;
|
||||
|
||||
@@ -81,6 +81,7 @@ const onLeave = () => {
|
||||
align-items: center;
|
||||
width: 90px;
|
||||
height: 35px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
.page_title {
|
||||
font-size: 14px;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user