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

                ### 場景: 在某些表單中,需要根據一個表單字段的值,控制另外一個字段的顯示與隱藏,常見的如問卷調查中,會根據性別或是年齡區別顯示不同的問題。 ### 調用api: | 語法| 說明| | --- | --- | | **`this.sh.字段名=true/false`** | 只控制字段的顯示隱藏,設置為false表示當前字段隱藏,只是看不見,其實表單中依然存在 | | **`this.sh.字段名_load=true/false`** | 控制字段的加載與否,設置為false表示當前字段不加載 | ### 示例 #### 示例1.監聽性別字段的改變事件,控制年齡字段的展示與否 - 配置 ![](https://img.kancloud.cn/32/42/3242fda2733e905ccef64e3be190be21_789x379.png) - 代碼 ``` onlChange(){ return { sex(){ if(event.value == '1'){ this.sh.age_load = true }else{ this.sh.age_load = false } } } } ``` - 表單效果 ![](https://img.kancloud.cn/76/63/7663263d3648cd9de38fc4cd393a81fb_1462x504.png) #### 示例2.表單加載后,根據性別字段,控制年齡字段的展示與否 - 配置 ![](https://img.kancloud.cn/de/8b/de8b74a3f2ccd2fd863d698154796fe6_794x401.png) - 代碼 ``` loaded(){ if(this.isUpdate.value === true){ //編輯頁面判斷性別的值 let data = this.getFieldsValue(); if(data.sex == '1'){ this.sh.age_load = true }else{ this.sh.age_load = false } }else{ // 新增頁面顯示 this.sh.age_load = true } } ``` - 表單效果 ![](https://img.kancloud.cn/81/00/8100dfddb67e9453d9ca57177a6aa31d_1684x504.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>

                              哎呀哎呀视频在线观看