(window.webpackJsonp=window.webpackJsonp||[]).push([[246],{451:function(t,e,n){"use strict";n.r(e);var r=n(42),a=Object(r.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"导出离线文档"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#导出离线文档"}},[t._v("#")]),t._v(" 导出离线文档")]),t._v(" "),n("div",{staticClass:"custom-block warning"},[n("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),n("p",[n("code",[t._v("knife4j")]),t._v(" 版本>2.0.1 使用此规则,离线文档导出功能目前暂时未提供导出Word和PDF,推荐大家使用一款MD的渲染软件("),n("a",{attrs:{href:"https://typora.io/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Typora"),n("OutboundLink")],1),t._v(")进行导出")])]),t._v(" "),n("p",[t._v("在以前的开发人员使用Swagger的时候,希望Swagger能够导出一份精细的文档,不管是集成何种方式,使用方法都是比较繁琐的,而且导出的文档效果也不尽如人意")]),t._v(" "),n("p",[t._v("为了解决这个问题,"),n("code",[t._v("Knife4j")]),t._v("在前端界面直接集成了两种导出Swagger文档的方式,主要是导出Markdown和离线Html")]),t._v(" "),n("p",[t._v("对于使用者来说,能把过程简单化是最好的,而"),n("code",[t._v("Knfie4j")]),t._v("提供的导出功能就是如此简单")]),t._v(" "),n("p",[t._v("在前端Ui界面中的"),n("code",[t._v("文档管理 => 离线文档")]),t._v(" 菜单栏,我们点击后可以看到如下界面：")]),t._v(" "),n("p",[n("img",{attrs:{src:"/knife4j/images/knife4j/plus/exportDocument.png",alt:""}})]),t._v(" "),n("p",[t._v("直接点击下载Markdown,"),n("code",[t._v("Knife4j")]),t._v("就会为我们生成一份精细的MD文档,效果图如下：")]),t._v(" "),n("p",[n("img",{attrs:{src:"/knife4j/images/knife4j/3.png",alt:""}})]),t._v(" "),n("p",[t._v("导出的Html效果,"),n("a",{attrs:{href:"https://doc.xiaominfo.com/Knife4j-Offline-Html.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("点击我预览在线效果"),n("OutboundLink")],1),t._v("，如下图：")]),t._v(" "),n("p",[n("img",{attrs:{src:"/knife4j/images/knife4j/5.png",alt:""}})]),t._v(" "),n("comment-comment")],1)}),[],!1,null,null,null);e.default=a.exports}}]);