diff --git a/src/components/transfer/list.vue b/src/components/transfer/list.vue
index 17cb3ce..784f3ce 100644
--- a/src/components/transfer/list.vue
+++ b/src/components/transfer/list.vue
@@ -11,13 +11,13 @@
:query.sync="query"
:placeholder="filterPlaceholder">
-
+
- {{ showLabel(item) }}
+ - {{ notFoundText }}
- {{ notFoundText }}
@@ -30,7 +30,6 @@
export default {
components: { Search, Checkbox },
-// filters: { filterData: this.filterData },
props: {
prefixCls: String,
data: Array,
diff --git a/src/styles/components/transfer.less b/src/styles/components/transfer.less
index 7921b40..c5bf038 100644
--- a/src/styles/components/transfer.less
+++ b/src/styles/components/transfer.less
@@ -53,6 +53,15 @@
white-space: nowrap;
text-overflow: ellipsis;
}
+
+ &-not-found{
+ display: none;
+ text-align: center;
+ color: @btn-disable-color;
+ }
+ li&-not-found:only-child{
+ display: block;
+ }
}
&-body-with-search &-content{
padding: 0;
diff --git a/test/routers/transfer.vue b/test/routers/transfer.vue
index 8d4c73b..a80d29d 100644
--- a/test/routers/transfer.vue
+++ b/test/routers/transfer.vue
@@ -9,7 +9,6 @@
:data="data"
filterable
:target-keys.sync="targetKeys"
- :selected-keys="selectedKeys"
:operations="['向左移动','向右移动']"
@on-change="change">
@@ -35,6 +34,10 @@
change (newTargetKeys, direction, moveKeys) {
// console.log(newTargetKeys)
this.targetKeys = newTargetKeys;
+ },
+ filterMethod (data, query) {
+ if (query === '') return true;
+ return data.label === query;
}
}
}
--
libgit2 0.21.4