<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC=2,3] Template Adapter 用來實現支持多種類型的模版引擎,如:`ejs`,`swig`等。 ## 支持模版引擎類型 * `base` * `ejs`?ejs 模版引擎 * `jade` * `swig`?一種支持模版繼承的模版引擎 * `nunjucks`?一種類似 jinja2 的模版引擎,功能非常強大 ## 模版引擎配置 模版引擎配置如下,可以在?`src/common/config/view.js`?中修改: ~~~ export default { type: "ejs", options: { //具體模版引擎額外的配置 } }; ~~~ ## 使用模版引擎 模版引擎會在視圖里自動調用,默認情況不需要手工調用使用。如果在有些場景非要使用的話,可以通過下面的方式加載對應的模版引擎: ~~~ let EjsTemplate = think.adapter("template", "ejs"); let instance = new EjsTemplate(...args); ~~~ ## 擴展模版引擎類型 可以通過下面的命令創建一個名為?`foo`?Template 類: ~~~ thinkjs adapter template/foo ~~~ 執行完成后,會創建文件?`src/common/adapter/template/foo.js`。擴展緩存類需要實現如下的方法: ~~~ export default class extends think.adapter.template { /** * get compiled content * @params {String} templateFile 模版文件目錄 * @params {Object} tVar 模版變量 * @params {Object} config 模版引擎配置 * @return {Promise} [] */ run(templateFile, tVar, config){ } } ~~~ 框架里的 Template 實現請見?[https://github.com/75team/thinkjs/tree/master/src/adapter/template](https://github.com/75team/thinkjs/tree/master/src/adapter/template)。 ## 使用第三方緩存 Adapter 如何使用第三方的緩存 Adapter 請參見?[Adapter -> 介紹](https://thinkjs.org/zh-CN/doc/2.0/adapter_intro.html#使用第三方-adapter)。
                  <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>

                              哎呀哎呀视频在线观看