<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                #### WXS(WeiXin Script)是小程序的一套腳本語言,結合`WXML`,可以構建出頁面的結構。 wxml中的數據,需要過濾的話,無法像vue中那樣,直接添加一個函數去使用,在微信小程序中通常用wxs來過濾。 具體使用方法(不支持es6語法): 1.新建一個wxs文件,推薦建在utils中 ![](https://img.kancloud.cn/61/e2/61e267fbd10607384e46c13632f66a7d_490x320.png) ``` 案例:過濾字符串,添加對應單位 function fornatCount(count){ var countVal = parseInt(count); if(countVal > 100000000){ return (countVal / 100000000).toFixed(1) + "億" }else if(countVal > 10000){ return (countVal / 10000).toFixed(1) + "萬" }else{ return countVal + "" } } // 不支持es6,使用common.js的方式導出 module.exports = { fornatCount : fornatCount } ``` 2.在wxml文件中,通過wxs標簽引入wxs文件,類似script標簽 ``` module:引入的模塊名,自定義,在標簽中使用 <wxs src="../../utils/format.wxs" module="format"></wxs> ``` 3.使用方法 ``` format:引入時自定義的模塊名 fornatCount:執行的方法名 <view class="count"> 播放:{{format.fornatCount(item.playCount) }}</view> ``` 效果圖: ![](https://img.kancloud.cn/ac/8a/ac8a1a74a57e1b25e201a1551d781a88_574x314.png)
                  <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>

                              哎呀哎呀视频在线观看