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

                # Online表單 JS增強實現下拉聯動 > > 需求 :online表單使用JS增強實現省市區下拉聯動 [TOC] ## 示例效果 ![](https://img.kancloud.cn/ec/51/ec518d26975fa27e41a4525e28200468_1638x589.png) ## 配置步驟: ### ~~1. 新建字典(2021-3月之后版本可忽略此步驟)~~ ~~新建一個空的數據字典,字典項名稱為空,數據值打個空格就可以錄入了~~ >[info] 2021-3月之后版本可忽略此步驟 ![](https://img.kancloud.cn/ea/48/ea482f98385cfb1d0f60280c12a88c25_1661x316.png) ### 2. online表單添加字段 在online表單中新增3個字段,pro,city,area 詳細配置如下, 必須配置`下拉框`,且字典code一定要寫 >[info] `2021-3月之后版本可忽略字典code配置,頁面屬性下拉框一定要配置` ![](https://img.kancloud.cn/e2/62/e262e1e4c4ba8fd2641d71969f4eb4b3_1330x427.png) ![](https://img.kancloud.cn/b5/e8/b5e8601abba49b59b3a4137beebe3373_1048x441.png) ![](https://img.kancloud.cn/d5/f4/d5f46a478c6bc26cb4a2a30abb1b4b5e_1266x453.png) ### 3.編寫js增強 ![](https://img.kancloud.cn/63/cf/63cf5da5fcd049c8ead4a0fc4a66b650_1005x603.png) 代碼示例: ``` //示例中數據寫死,實際需要自己寫請求, loaded(){ that.changeOptions('pro',[ {value:'1',text:'安徽省'}, {value:'2',text:'河南省'} ]) } onlChange(){ return { pro(){ let value = event.value let cityOptions = [] if(value=='2'){ cityOptions = [{text:'鄭州市',value:'2-1'},{text:'開封市',value:'2-2'}] }else{ cityOptions = [{text:'合肥市',value:'1-1'},{text:'蕪湖市',value:'1-2'}] } that.changeOptions('city',cityOptions); } city(){ let value = event.value let areaOptions = [] if(value=='1-1'){ areaOptions= [{text:'包河區',value:'1-1-1'},{text:'臨江縣',value:'1-1-2'}] }else{ areaOptions= [{text:'其他區',value:'xxx'},{text:'其他縣',value:'xxxxx'}] } that.changeOptions('area',areaOptions); } } } ```
                  <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>

                              哎呀哎呀视频在线观看