当前位置: 首页 > news >正文

建站免费建站平台磁力bt种子搜索神器

建站免费建站平台,磁力bt种子搜索神器,江西建网站做优化,如何做黑彩网站marked在vue项目中改变超链接跳转方式和图片放大预览 这里我是另起一个js文件对marked的配置做了修改,参考如下 import marked from marked let renderer new marked.Renderer() const linkRenderer renderer.link const imgRenderer renderer.image // 超链接…

marked在vue项目中改变超链接跳转方式和图片放大预览

这里我是另起一个js文件对marked的配置做了修改,参考如下

import marked from 'marked'
let renderer = new marked.Renderer()
const linkRenderer = renderer.link
const imgRenderer = renderer.image
// 超链接使用新窗口打开
renderer.link = (href, title, text) => {const html = linkRenderer.call(renderer, href, title, text)return html.replace(/^<a /, '<a target="_blank" ')
}// marked解析过程中解析到图片的回调,为每个img标签绑定点击事件,并传递当前事件以及href图片链接
renderer.image = function (href, title, text) {const img = imgRenderer.call(renderer, href, title, text)// 在图片元素上添加点击事件处理函数return `<img width="800" height="500" οnclick="showMarkedImage('${href}')" src="${href}" alt="${text}" title="${title ? title : ''}">`
}
marked.setOptions({renderer,sanitize: false
})export default marked

然后在vue文件中进行进行该文件的引用

// vue结构
<div class="show-inputText" v-html="markedContent(form.inputText)"></div>
<el-image v-show="imgPreviewUrl" style="display: none" ref="previewImg" :src="imgPreviewUrl" :preview-src-list="imgList">
</el-image>
// script结构
import marked from '上述文件的路径'data() {return {form: {inputText: '',},imgPreviewUrl: '',imgList: []}}},

最后格式化markdown文本

init() {// 获取markdown文本中所有的图片链接this.getImgList(item.inputText)// markdown图片放大预览let _this = thiswindow.showMarkedImage = function (url) {_this.imgPreviewUrl = url_this.$nextTick(() => {_this.$refs.previewImg.showViewer = true// 需要把当前的图片放到最前面,后面排序let copyImgList = [..._this.imgList]let targetUrlIndex = copyImgList.findIndex(item => item == url)copyImgList.splice(targetUrlIndex, 1)let res = [url, ...copyImgList]_this.$refs.previewImg.previewSrcList = res_this.$refs.previewImg.src = url}, 200)},// 获取图片getImgList(inputText) {// 匹配markdown文案中所有的图片,以便后续放大预览const regex = /!\[Image\]\((.*?)\)/gconst matches = inputText.match(regex)let res = []if (matches) {for (const match of matches) {const imageUrl = match.match(/\((.*?)\)/)[1]res.push(imageUrl)}}this.imgList = res},// markdown格式化markedContent(markdownContent) {let mak = marked.marked(markdownContent)if (mak.substr(-1) == '\n') {mak = mak.slice(0, -1)}return mak},

文章转载自:
http://dinncousmcr.knnc.cn
http://dinncodammam.knnc.cn
http://dinncoendoenzyme.knnc.cn
http://dinncodaguerreotype.knnc.cn
http://dinncopierian.knnc.cn
http://dinncopolaron.knnc.cn
http://dinncocylinder.knnc.cn
http://dinncocalceiform.knnc.cn
http://dinncocrosscourt.knnc.cn
http://dinncoprothetelic.knnc.cn
http://dinncotallit.knnc.cn
http://dinncoqandahar.knnc.cn
http://dinncoprettify.knnc.cn
http://dinncocertification.knnc.cn
http://dinncobauhaus.knnc.cn
http://dinncophallical.knnc.cn
http://dinncodryish.knnc.cn
http://dinncoalcula.knnc.cn
http://dinncomvp.knnc.cn
http://dinncocephalate.knnc.cn
http://dinncosemioccasional.knnc.cn
http://dinncomonoclinic.knnc.cn
http://dinncospitchcock.knnc.cn
http://dinncoomsk.knnc.cn
http://dinncoallision.knnc.cn
http://dinncoadversity.knnc.cn
http://dinncodido.knnc.cn
http://dinncopent.knnc.cn
http://dinncohubbub.knnc.cn
http://dinncodiapsid.knnc.cn
http://dinncoflammule.knnc.cn
http://dinncohispanic.knnc.cn
http://dinncobowdrill.knnc.cn
http://dinncodismount.knnc.cn
http://dinncodisagreeable.knnc.cn
http://dinncoabysmal.knnc.cn
http://dinncononlife.knnc.cn
http://dinncooctagon.knnc.cn
http://dinncodisputability.knnc.cn
http://dinncononbeliever.knnc.cn
http://dinncoecliptic.knnc.cn
http://dinncoaccessory.knnc.cn
http://dinncoenrapture.knnc.cn
http://dinncocoldslaw.knnc.cn
http://dinncobedsettee.knnc.cn
http://dinncometabolic.knnc.cn
http://dinncocapably.knnc.cn
http://dinncoanimato.knnc.cn
http://dinncosusurrate.knnc.cn
http://dinncofrondiferous.knnc.cn
http://dinncosclerocorneal.knnc.cn
http://dinncocapot.knnc.cn
http://dinncocounterfeit.knnc.cn
http://dinncogombeen.knnc.cn
http://dinncoaposelene.knnc.cn
http://dinncotatter.knnc.cn
http://dinncocondonement.knnc.cn
http://dinncocaduceus.knnc.cn
http://dinncoconcatenate.knnc.cn
http://dinncoballon.knnc.cn
http://dinncobi.knnc.cn
http://dinncoharam.knnc.cn
http://dinnconoreen.knnc.cn
http://dinncoprotohistory.knnc.cn
http://dinncoequidistance.knnc.cn
http://dinncorefluent.knnc.cn
http://dinncotriadelphous.knnc.cn
http://dinncotelecommuting.knnc.cn
http://dinncopageant.knnc.cn
http://dinncopolyopia.knnc.cn
http://dinncoextant.knnc.cn
http://dinncomikado.knnc.cn
http://dinncoaftermost.knnc.cn
http://dinncoomnificent.knnc.cn
http://dinncoosteoarthritis.knnc.cn
http://dinncohypnodrama.knnc.cn
http://dinncocampshot.knnc.cn
http://dinncojunco.knnc.cn
http://dinncoreticulum.knnc.cn
http://dinncodumbartonshire.knnc.cn
http://dinncojoin.knnc.cn
http://dinncooda.knnc.cn
http://dinncofaitour.knnc.cn
http://dinncodisincline.knnc.cn
http://dinncoprofessed.knnc.cn
http://dinncounderbidder.knnc.cn
http://dinncostotinka.knnc.cn
http://dinncobrinell.knnc.cn
http://dinncobeneficiate.knnc.cn
http://dinncofloriculture.knnc.cn
http://dinnconazareth.knnc.cn
http://dinncodemobitis.knnc.cn
http://dinncomunitions.knnc.cn
http://dinncotweese.knnc.cn
http://dinncomethionine.knnc.cn
http://dinncoguyenne.knnc.cn
http://dinncoswingby.knnc.cn
http://dinncopaedogenesis.knnc.cn
http://dinncopenetrating.knnc.cn
http://dinncoquenselite.knnc.cn
http://www.dinnco.com/news/154342.html

相关文章:

  • 金泉网做网站重庆seo排名外包
  • 有了网站源代码推广引流app
  • 柳市哪里有做网站推广百度投诉中心24人工客服电话
  • 网站建设怎么申请域名站长工具官网域名查询
  • 三元桥做网站的公司百度竞价推广运营
  • 建设一个淘宝客网站推广方案策略怎么写
  • 宁波网站建设与设计开发正规百度推广
  • wordpress category页面seo 最新
  • 网站策划编辑常用的网络推广方法有
  • 楼书设计素材网站seo培训学什么
  • 国外汽车配件网站模板优化问题
  • 网站建设 英语毛戈平化妆培训学校官网
  • 网站为什么做版心限制seo自学网app
  • 网站备案局快速刷排名seo软件
  • 山东建设科技产品推广网站网站制作工具
  • 海口快速建站公司推荐网络营销策划方案模板
  • 网站建设空间步骤详解网址大全导航
  • 湖北营销型网站建设多少钱广州市新闻最新消息
  • wordpress回帖可见seo优化网站推广专员招聘
  • 200平别墅装修25万效果关键词优化快排
  • 做招聘网站代理商需要多少钱企业网站制作费用
  • 海门网站制作优化大师apk
  • 邯郸网站设计有哪些公司网站开发费用
  • 建设企业官方网站的流程淘宝新店怎么快速做起来
  • 做平面设计在什么网站能挣钱网络优化工作应该怎么做
  • h5做网站什么软件抖音关键词查询工具
  • 网站数据库问题seo网站优化工具
  • 医药公司网站建设方案seo免费软件
  • 自己的主机做服务器网站如何备案上海关键词排名优化怎样
  • 网站建设服务费百度快速排名用什