Commit c6659c80 by 姜雷

修改穿梭框中选择全部时功能错误

parent 2e004b3d
<template>
<list-layout>
<ks-transfer
v-model="value"
:list="list"
/>
<ks-transfer v-model="value" :list="list" />
</list-layout>
</template>
......@@ -30,9 +27,8 @@ export default {
label: '3223',
},
],
value: [],
value: [1, 3],
};
},
};
</script>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "rym-element-ui",
"version": "0.1.47",
"version": "0.1.48",
"description": "任意门组件库",
"main": "lib/rymUi.common.js",
"scripts": {
......
......@@ -2,7 +2,7 @@
<div class="transfer-wrap">
<div class="transfer-allData">
<div class="transfer-allData-filter">
<span>{{titles&&titles[0]?titles[0]:'全部'}}</span>
<span>{{ titles && titles[0] ? titles[0] : '全部' }}</span>
<div class="transfer-filter-input">
<el-input
v-model="filters.all"
......@@ -12,71 +12,48 @@
></el-input>
</div>
<div>
<el-button
size="mini"
@click="filterAllData"
>查询</el-button>
<el-button size="mini" @click="filterAllData">查询</el-button>
</div>
</div>
<div class="transfer-allData-box">
<select
class="transfer-allData-select"
multiple
v-model="selected.all"
>
<select class="transfer-allData-select" multiple v-model="selected.all">
<option
v-for="(item, index) in allDataOptions"
:key="index"
:value="getValue('key',item)"
@dblclick="() => addClickValue(getValue('key',item))"
>{{getValue('label',item)}}</option>
:value="getValue('key', item)"
@dblclick="() => addClickValue(getValue('key', item))"
>{{ getValue('label', item) }}</option
>
</select>
</div>
</div>
<div class="transfer-btnBox">
<div class="cancel-btn-box">
<div
class="transfer-btnBox-btn"
@click="removeSelectedValue(true)"
>
<div class="transfer-btnBox-btn" @click="removeSelectedValue(true)">
<i class="el-icon-d-arrow-left"></i>
</div>
<div
class="transfer-btnBox-btn"
@click="removeSelectedValue()"
>
<div class="transfer-btnBox-btn" @click="removeSelectedValue()">
<i class="el-icon-arrow-left"></i>
</div>
</div>
<div class="selected-btn-box">
<div
class="transfer-btnBox-btn"
@click="addSelectedValue()"
>
<div class="transfer-btnBox-btn" @click="addSelectedValue()">
<i class="el-icon-arrow-right"></i>
</div>
<div
class="transfer-btnBox-btn"
@click="addSelectedValue(true)"
>
<div class="transfer-btnBox-btn" @click="addSelectedValue(true)">
<i class="el-icon-d-arrow-right"></i>
</div>
</div>
<el-button
size="mini"
type="primary"
@click="submitHandle"
>确定</el-button>
<br>
<br>
<el-button
size="mini"
@click="cancelHandle"
>取消</el-button>
<el-button size="mini" type="primary" @click="submitHandle"
>确定</el-button
>
<br />
<br />
<el-button size="mini" @click="cancelHandle">取消</el-button>
</div>
<div class="transfer-selectData">
<div class="transfer-selectData-filter">
<span>{{titles&&titles[1]?titles[1]:'已选'}}</span>
<span>{{ titles && titles[1] ? titles[1] : '已选' }}</span>
<div class="transfer-filter-input">
<el-input
v-model.trim="filters.selected"
......@@ -86,10 +63,7 @@
></el-input>
</div>
<div>
<el-button
size="mini"
@click="filterSelectedData"
>查询</el-button>
<el-button size="mini" @click="filterSelectedData">查询</el-button>
</div>
</div>
<div class="transfer-selectData-box">
......@@ -101,9 +75,10 @@
<option
v-for="(item, index) in selectDataOptions"
:key="index"
:value="getValue('key',item)"
@dblclick="() => removeClickValue(getValue('key',item))"
>{{getValue('label',item)}}</option>
:value="getValue('key', item)"
@dblclick="() => removeClickValue(getValue('key', item))"
>{{ getValue('label', item) }}</option
>
</select>
</div>
</div>
......@@ -194,7 +169,7 @@ export default {
},
addSelectedValue(flag) {
this.trueValue = flag
? this.allDataOptions.map(i => i.id)
? this.list.map(i => i.id)
: [...this.trueValue, ...this.selected.all];
},
removeSelectedValue(flag) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment