diff --git a/src/components/checkbox/checkbox.vue b/src/components/checkbox/checkbox.vue index 4ff2c82..15aa16f 100644 --- a/src/components/checkbox/checkbox.vue +++ b/src/components/checkbox/checkbox.vue @@ -18,7 +18,7 @@ v-model="checked" @change="change"> </span> - <slot v-if="showSlot"><span v-el:slot style="display:none">{{ value }}</span></slot> + <slot v-if="showSlot"><span v-el:slot>{{ value }}</span></slot> </label> </template> <script> @@ -78,8 +78,6 @@ this.updateModel(); if (this.$els.slot && this.$els.slot.innerHTML === '') { this.showSlot = false; - } else { - this.$els.slot.style.display = 'inline'; } } }, diff --git a/src/components/transfer/list.vue b/src/components/transfer/list.vue index 4d6c9b1..099f91f 100644 --- a/src/components/transfer/list.vue +++ b/src/components/transfer/list.vue @@ -57,7 +57,8 @@ return [ `${this.prefixCls}-body`, { - [`${this.prefixCls}-body-with-search`]: this.filterable + [`${this.prefixCls}-body-with-search`]: this.filterable, + [`${this.prefixCls}-body-with-footer`]: this.showFooter } ] }, @@ -100,7 +101,7 @@ this.updateFilteredData(); }, - ready () { + compiled () { this.showFooter = this.$els.footer.innerHTML !== ''; }, watch: { diff --git a/src/styles/components/transfer.less b/src/styles/components/transfer.less index bcaaaf6..2d08ca0 100644 --- a/src/styles/components/transfer.less +++ b/src/styles/components/transfer.less @@ -43,10 +43,14 @@ border-top: none; border-radius: 0 0 @border-radius-base @border-radius-base; position: relative; + overflow: hidden; &-with-search{ padding-top: 34px; } + &-with-footer{ + border-radius: 0; + } } &-content{ @@ -90,7 +94,6 @@ } &-footer{ - margin: 0 -1px; border: 1px solid @border-color-base; border-top: none; border-radius: 0 0 @border-radius-base @border-radius-base; diff --git a/test/routers/transfer.vue b/test/routers/transfer.vue index 8f6adb1..5a1454c 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