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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### 提示框: ## wx.showToast(OBJECT) ### 顯示消息提示框 OBJECT參數說明: ![](https://box.kancloud.cn/d4b812b7f046ddaadb175019660cfafd_782x379.png) ### 示例代碼: wx.showToast({ title: '成功', icon: 'success', duration: 2000 }) ## wx.hideToast() ### 隱藏消息提示框 wx.showToast({ title: '加載中', icon: 'loading', duration: 10000 }) setTimeout(function(){ wx.hideToast() },2000) ![](https://box.kancloud.cn/8299c6855f94000fa4655abec916f1c0_389x528.png) ## wx.hideLoading() 隱藏loading提示框 wx.showLoading({ title: '加載中', }) setTimeout(function(){ wx.hideLoading() },2000) ## wx.showModal(OBJECT) ### 顯示模態彈窗 ![](https://box.kancloud.cn/a00876cd02ba9bf395872c90fcf83831_884x625.png) ### 示例代碼: wx.showModal({ title: '提示', content: '這是一個模態彈窗', success: function(res) { if (res.confirm) { console.log('用戶點擊確定') } } }) ![](https://box.kancloud.cn/a1fbb91920271b402e4bf8d7cd39e614_397x506.png) ## wx.showActionSheet(OBJECT) ### 顯示操作菜單 OBJECT參數說明: ![](https://box.kancloud.cn/89167d98e4848694f7240257a0d5c31c_789x335.png) success返回參數說明: ![](https://box.kancloud.cn/dd42965a7601c941e6580f46d063e350_677x146.png) wx.showActionSheet({ itemList: ['A', 'B', 'C'], success: function(res) { if (!res.cancel) { console.log(res.tapIndex) } } }) ![](https://box.kancloud.cn/d7e539fe5c2c6fc456a0540d20bdeed6_352x520.png) ### 設置導航條 ## wx.setNavigationBarTitle(OBJECT) ### 動態設置當前頁面的標題。 OBJECT參數說明: ![](https://box.kancloud.cn/6ac2d24464452afa24c8bb61af82c31b_769x269.png) ### 示例代碼: wx.setNavigationBarTitle({ title: '當前頁面' }) ## showNavigationBarLoading() ### 在當前頁面顯示導航條加載動畫。 ## hideNavigationBarLoading() ### 隱藏導航條加載動畫。 頁面跳轉: ## wx.navigateTo(OBJECT) 保留當前頁面,跳轉到應用內的某個頁面,使用wx.navigateBack可以返回到原頁面。 OBJECT參數說明: ![](https://box.kancloud.cn/228cd4dd6479ab49915346ac6a31b692_898x297.png) ### 示例代碼: wx.navigateTo({ url: 'test?id=1' }) //test.js Page({ onLoad: function(option){ console.log(option.query) } }) >[warning]注意:為了不讓用戶在使用小程序時造成困擾,我們規定頁面路徑只能是五層,請盡量避免多層級的交互方式。 ## wx.redirectTo(OBJECT) 關閉當前頁面,跳轉到應用內的某個頁面。 OBJECT參數說明: ![](https://box.kancloud.cn/511bbbe955d3e3a63d84df395a3cff76_770x270.png) ### 示例代碼: wx.redirectTo({ url: 'test?id=1' }) ## wx.navigateBack(OBJECT) 關閉當前頁面,返回上一頁面或多級頁面。可通過 getCurrentPages()) 獲取當前的頁面棧,決定需要返回幾層。 OBJECT參數說明: ![](https://box.kancloud.cn/2321f8420fd701531669f38023de8fc2_767x89.png) ## wx.createAnimation(OBJECT) 創建一個動畫實例animation。調用實例的方法來描述動畫。最后通過動畫實例的export方法導出動畫數據傳遞給組件的animation屬性。 >[warning]注意: export 方法每次調用后會清掉之前的動畫操作 OBJECT參數說明: ![](https://box.kancloud.cn/b17340b9d73876e14a96396e601a9287_908x277.png) var animation = wx.createAnimation({ transformOrigin: "50% 50%", duration: 1000, timingFunction: "ease", delay: 0 }) ## animation 動畫實例可以調用以下方法來描述動畫,調用結束后會返回自身,支持鏈式調用的寫法。 ### 樣式: ![](https://box.kancloud.cn/c7cafc02de0f8986ba81611c0eaae56d_821x505.png) ### 旋轉: ![](https://box.kancloud.cn/4bffeb25940aab7a232555c7f73188ec_713x331.png) ### 縮放: ![](https://box.kancloud.cn/0bae7e6fec724ff830ac5c99bc99bd8c_893x342.png) ### 偏移: ![](https://box.kancloud.cn/616a6e568d1b8e0351df51c0b8d7ad60_890x322.png) ### 傾斜: ![](https://box.kancloud.cn/355b3963c8e70d5f5cbf050eb71c2691_945x217.png) ### 矩陣變形: ![](https://box.kancloud.cn/d815095e0d03a84b5ab122b7ed0cbebd_783x163.png) ## 動畫隊列 調用動畫操作方法后要調用 step() 來表示一組動畫完成,可以在一組動畫中調用任意多個動畫方法,一組動畫中的所有動畫會同時開始,一組動畫完成后才會進行下一組動畫。step 可以傳入一個跟 wx.createAnimation() 一樣的配置參數用于指定當前組動畫的配置。 ### 示例: <view animation="{{animationData}}" style="background:red;height:100rpx;width:100rpx"></view> Page({ data: { animationData: {} }, onShow: function(){ var animation = wx.createAnimation({ duration: 1000, timingFunction: 'ease', }) this.animation = animation animation.scale(2,2).rotate(45).step() this.setData({ animationData:animation.export() }) setTimeout(function() { animation.translate(30).step() this.setData({ animationData:animation.export() }) }.bind(this), 1000) }, rotateAndScale: function () { // 旋轉同時放大 this.animation.rotate(45).scale(2, 2).step() this.setData({ animationData: this.animation.export() }) }, rotateThenScale: function () { // 先旋轉后放大 this.animation.rotate(45).step() this.animation.scale(2, 2).step() this.setData({ animationData: this.animation.export() }) }, rotateAndScaleThenTranslate: function () { // 先旋轉同時放大,然后平移 this.animation.rotate(45).scale(2, 2).step() this.animation.translate(100, 100).step({ duration: 1000 }) this.setData({ animationData: this.animation.export() }) } }) ## wx.hideKeyboard() 收起鍵盤。 ## wx.stopPullDownRefresh() 停止當前頁面下拉刷新。 ## 指定model ![](https://box.kancloud.cn/a4ea8ca3e2aef35907eeca0f3d7878c0_741x522.png) 指定哪個modal,可以通過hidden屬性來進行選擇。 <!--show.wxml--> <view class="container" class="zn-uploadimg"> <button type="primary"bindtap="modalinput">modal有輸入框</button> </view> <modal hidden="{{hiddenmodalput}}" title="請輸入驗證碼" confirm-text="提交" cancel-text="重置" bindcancel="cancel" bindconfirm="confirm"> <input type='text'placeholder="請輸入內容" auto-focus/> </modal> `show.js` //獲取應用實例 var app = getApp() Page({ data:{ hiddenmodalput:true, //可以通過hidden是否掩藏彈出框的屬性,來指定那個彈出框 }, //點擊按鈕痰喘指定的hiddenmodalput彈出框 modalinput:function(){ this.setData({ hiddenmodalput: !this.data.hiddenmodalput }) }, //取消按鈕 cancel: function(){ this.setData({ hiddenmodalput: true }); }, //確認 confirm: function(){ this.setData({ hiddenmodalput: true }) } }) ![](https://box.kancloud.cn/354aea705f225e3c0cee12f590369965_364x511.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>

                              哎呀哎呀视频在线观看