diff --git a/src/components/transfer/list.vue b/src/components/transfer/list.vue index 7fa2bde..4d6c9b1 100644 --- a/src/components/transfer/list.vue +++ b/src/components/transfer/list.vue @@ -23,9 +23,7 @@ <li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li> </ul> </div> - <div :class="prefixCls + '-footer'"> - <slot></slot> - </div> + <div :class="prefixCls + '-footer'" v-if="showFooter" v-el:footer><slot></slot></div> </div> </template> <script> @@ -50,7 +48,8 @@ data () { return { showItems: [], - query: '' + query: '', + showFooter: true } }, computed: { @@ -99,6 +98,10 @@ }, created () { this.updateFilteredData(); + + }, + ready () { + this.showFooter = this.$els.footer.innerHTML !== ''; }, watch: { data () { diff --git a/src/styles/components/transfer.less b/src/styles/components/transfer.less index 62f5429..bcaaaf6 100644 --- a/src/styles/components/transfer.less +++ b/src/styles/components/transfer.less @@ -11,17 +11,16 @@ height: 210px; font-size: @font-size-small; vertical-align: middle; - border: 1px solid @border-color-base; - border-radius: @border-radius-base @border-radius-base 0 0; position: relative; padding-top: 35px; &-header { padding: 8px 16px; - border-radius: @border-radius-base @border-radius-base 0 0; background: @head-bg; color: @text-color; + border: 1px solid @border-color-base; border-bottom: 1px solid @border-color-split; + border-radius: @border-radius-base @border-radius-base 0 0; overflow: hidden; position: absolute; top: 0; @@ -40,6 +39,9 @@ &-body{ height: 100%; + border: 1px solid @border-color-base; + border-top: none; + border-radius: 0 0 @border-radius-base @border-radius-base; position: relative; &-with-search{ diff --git a/test/routers/transfer.vue b/test/routers/transfer.vue index 5a1454c..8f6adb1 100644 --- a/test/routers/transfer.vue +++ b/test/routers/transfer.vue @@ -12,9 +12,9 @@ :operations="['向左移动','向右移动']" :filter-method="filterMethod" @on-change="change"> - <div :style="{float: 'right', margin: '5px'}"> - <i-button type="ghost" size="small" @click="getMock">刷新</i-button> - </div> + <!--<div :style="{float: 'right', margin: '5px'}">--> + <!--<i-button type="ghost" size="small" @click="getMock">刷新</i-button>--> + <!--</div>--> </Transfer> </div> </template> -- libgit2 0.21.4