update Transfer
update Transfer
This commit is contained in:
parent
37ee153528
commit
122e69ee97
6 changed files with 44 additions and 13 deletions
|
@ -18,7 +18,7 @@
|
|||
v-model="checked"
|
||||
@change="change">
|
||||
</span>
|
||||
<slot v-if="showSlot"><span v-el:slot>{{ value }}</span></slot>
|
||||
<slot v-if="showSlot"><span v-el:slot style="display:none">{{ value }}</span></slot>
|
||||
</label>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -78,6 +78,8 @@
|
|||
this.updateModel();
|
||||
if (this.$els.slot && this.$els.slot.innerHTML === '') {
|
||||
this.showSlot = false;
|
||||
} else {
|
||||
this.$els.slot.style.display = 'inline';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<div :class="prefixCls" :style="style">
|
||||
<div :class="prefixCls + '-header'">
|
||||
<Checkbox :checked.sync="checkedAll" :disabled="checkedAllDisabled" @on-change="toggleSelectAll">{{ title }}</Checkbox>
|
||||
<Checkbox :checked.sync="checkedAll" :disabled="checkedAllDisabled" @on-change="toggleSelectAll"></Checkbox>
|
||||
<span>{{ title }}</span>
|
||||
<span :class="prefixCls + '-header-count'">{{ count }}</span>
|
||||
</div>
|
||||
<div :class="bodyClasses">
|
||||
|
@ -15,7 +16,10 @@
|
|||
<li
|
||||
v-for="item in showItems | filterBy filterData"
|
||||
:class="[prefixCls + '-content-item', {[prefixCls + '-content-item-disabled']: item.disabled}]"
|
||||
@click.prevent="select(item)"><Checkbox :checked="isCheck(item)" :disabled="item.disabled">{{ showLabel(item) }}</Checkbox></li>
|
||||
@click.prevent="select(item)">
|
||||
<Checkbox :checked="isCheck(item)" :disabled="item.disabled"></Checkbox>
|
||||
<span>{{ showLabel(item) }}</span>
|
||||
</li>
|
||||
<li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -82,9 +86,7 @@
|
|||
index > -1 ? this.checkedKeys.splice(index, 1) : this.checkedKeys.push(item.key);
|
||||
},
|
||||
updateFilteredData () {
|
||||
this.showItems = this.data.map(item => {
|
||||
return item;
|
||||
})
|
||||
this.showItems = this.data;
|
||||
},
|
||||
toggleSelectAll (status) {
|
||||
this.checkedKeys = status ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue