Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
star7th committed Oct 29, 2024
1 parent 6ef0b21 commit ecfc0a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 70 deletions.
2 changes: 2 additions & 0 deletions web_src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"turndown": "^7.1.1",
"turndown-plugin-gfm": "^1.0.2",
"url-search-params-polyfill": "^2.0.3",
"v-viewer": "1.7.4",
"viewerjs": "1.11.6",
"vue": "^2.6.12",
"vue-clipboard2": "^0.2.1",
"vue-i18n": "5.0.3",
Expand Down
64 changes: 0 additions & 64 deletions web_src/src/components/common/BigImg.vue

This file was deleted.

12 changes: 6 additions & 6 deletions web_src/src/components/common/Editormd.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<template>
<div :id="id" class="main-editor">
<!-- 放大图片 -->
<BigImg v-if="showImg" @clickit="showImg = false" :imgSrc="imgSrc"></BigImg>
</div>
</template>
<style src="@/../static/editor.md/css/editormd.min.css"></style>
Expand Down Expand Up @@ -139,8 +137,9 @@
</style>
<script>
import BigImg from '@/components/common/BigImg'
import { getUserInfoFromStorage } from '@/models/user.js'
import 'viewerjs/dist/viewer.css'
import { api as viewerApi } from 'v-viewer'
if (typeof window !== 'undefined') {
var $s = require('scriptjs')
}
Expand Down Expand Up @@ -318,12 +317,11 @@ export default {
}
},
components: {
BigImg
},
data() {
return {
instance: null,
showImg: false,
imgSrc: '',
user_token: '',
intervalId: 0
Expand Down Expand Up @@ -563,8 +561,10 @@ export default {
// 图片点击放大
$('#' + this.id + ' img').click(function() {
var img_url = $(this).attr('src')
that.showImg = true // 获取当前图片地址
that.imgSrc = img_url
viewerApi({
images: [img_url]
})
})
// 高亮关键字
Expand Down

0 comments on commit ecfc0a0

Please sign in to comment.