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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ~~~ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <title>穿梭框單選demo</title> <link href="https://cdn.staticfile.org/element-ui/2.12.0/theme-chalk/index.css" rel="stylesheet"> <script src="https://cdn.staticfile.org/vue/2.6.10/vue.min.js"></script> <script src="https://cdn.staticfile.org/element-ui/2.12.0/index.js"></script> <style> .ul-left { list-style: none; } .ul-left li { line-height: 30px; } .ul-left li:hover { background: red; } .pull-left li:active{ background: blue; } </style> </head> <body> <div id="app"> <el-card shadow="always"> <el-select v-model="value1" placeholder="請選擇"> <el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </el-card> <div style="display: flex"> <el-card shadow="always"> <ul class="ul-left"> <li @click="leftClick(index,item.name)" v-for="(item,index) in options2" :key="index" v-show="!item.selected">{{item.name}} </li> </ul> </el-card> <el-card shadow="always"> <ul class="ul-left"> <li @click="pushRight">>>>>>></li> <li @click="pushLeft"><<<<<<</li> </ul> </el-card> <el-card shadow="always"> <ul class="ul-left"> <li @click="rightClick(index)" v-for="(item,index) in options3">{{item.name}}</li> </ul> </el-card> </div> </div> <script> var app = new Vue({ el: '#app', data: { options1: [ { value: 'one', label: '選項1', children: [ { index: '1', selected: false, name: '選項1參數1' }, { index: '2', name: '選項1參數2' }, { index: '3', selected: false, name: '選項1參數3' }, { index: '4', selected: false, name: '選項1參數4' }, ] }, { value: 'two', label: '選項2', children: [ { index: '1', selected: false, name: '選項2參數1' }, { index: '2', selected: false, name: '選項2參數2' }, { index: '3', selected: false, name: '選項2參數3' }, { index: '4', selected: false, name: '選項2參數4' }, { index: '5', selected: false, name: '選項2參數5' }, ] }, { value: 'three', label: '選項3', children: [ { index: '1', selected: false, name: '選項3參數1' }, { index: '2', selected: false, name: '選項3參數2' }, { index: '3', selected: false, name: '選項3參數3' }, { index: '4', selected: false, name: '選項3參數4' }, { index: '5', selected: false, name: '選項3參數5' }, { index: '6', selected: false, name: '選項3參數6' }, ] }, ], options2: [], options3: [], value1: '', tempList: [], index1: '0' }, watch: { value1() { this.options1.forEach((obj, index) => { if (this.value1 == obj.value) { this.options2 = obj.children return } }) } }, methods: { leftClick(index, name) { this.tempList = { optionsIndex: this.value1, index: index, name: name } }, rightClick(index) { this.index1 = index this.value1 = this.options3[index].optionsIndex }, pushLeft() { this.options3.splice(this.index1, 1) this.options2.forEach((obj, index) => { obj.selected = false }) }, pushRight() { if (this.options3.length == 0) { this.options3.push(this.tempList) } else { let flag = false for (let i = 0; i < this.options3.length; i++) { if (this.options3[i].optionsIndex == this.tempList.optionsIndex) { this.options3[i].index = this.tempList.index this.options3[i].name = this.tempList.name flag = false break } else { flag = true } } if (flag) { this.options3.push(this.tempList) } } this.options2.forEach((obj, index) => { if (index == this.tempList.index) { obj.selected = true } else { obj.selected = false } }) } } }) </script> </body> </html> ~~~ 效果圖如下: ![](https://img.kancloud.cn/c2/bc/c2bc5cb6c3db8c766c296c4945d4a5c0_598x317.gif)
                  <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>

                              哎呀哎呀视频在线观看