<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [![gL8KOI.md.png](https://z3.ax1x.com/2021/05/22/gL8KOI.md.png)](https://www.guqule.com) 丸子官方網站:[www.guqule.com](https://www.guqule.com) 丸子客服微信:hackdxd * [ ] **特別注意提醒** 除了丸子小程序其他渠道購買全部為盜版產品,丸子客服微信:hackdxd ## 代碼高亮設置 想要實現小程序的代碼高亮,可以參考這一篇《[基于 wxParse 實現 WordPress 版小程序代碼高亮](https://www.imahui.com/minapp/993.html)》。 第一步:需要下載修改版 wxParse ,解壓替換掉小程序源碼包里的 wxParse 目錄。 第二步:需要對內容進行轉換解析。搜索:`WxParse.wxParse('article', 'html', res.content.rendered, this,5)`,更改為: ~~~ let contents = res.content.rendered.replace(/<pre[^>]*><code class=\"([^\s]*)\">/g, "<pre class=\"pure-highlightjs $1\">").replace(/<\/code><\/pre>/g, "</pre>") WxParse.wxParse('article', 'html', contents, this,5) ~~~ 第三步:需要引用代碼高亮樣式。打開 detail.wxss 引用樣式`@import "../../wxParse/prism.wxss";` 第四步:添加內容時,需要使用高亮代碼: ~~~ <pre class="pure-highlightjs"><code class="高亮語言,比如php,javascript等"> 高亮代碼部分... </code></pre> ~~~ 完成以上步驟,就可以實現小程序內容代碼高亮。 丸子小程序資訊版已經提供了代碼高亮版本,但是考慮到大部分小程序都不需要代碼高亮功能,因此,默認是未啟用代碼高亮,如果需要啟用微信小程序資訊版代碼高亮,方法如下: 1、修改 html2json.js 文件,把 //var highlight = require(‘./highlight.js’); 斜杠注釋刪掉 2、修改 detail.wxss 文件,引入代碼高亮樣式 @import “../../wxParse/prism.wxss”; 3、修改 mixins.js 文件,把`WxParse.wxParse('article', 'html', res.content.rendered, this,5)`更改如下: ~~~ let contents = res.content.rendered.replace(/<pre[^>]*><code class=\"([^\s]*)\">/g, "<pre class=\"pure-highlightjs $1\">").replace(/<\/code><\/pre>/g, "</pre>") WxParse.wxParse('article', 'html', contents, this,5) ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看