Commit 4997bd42dd8d288017de8e2ba3b2dd31f68094c5
1 parent
dcc06127
update Transfer
update Transfer
Showing
4 changed files
with
11 additions
and
9 deletions
Show diff stats
src/components/checkbox/checkbox.vue
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | v-model="checked" |
| 19 | 19 | @change="change"> |
| 20 | 20 | </span> |
| 21 | - <slot v-if="showSlot"><span v-el:slot style="display:none">{{ value }}</span></slot> | |
| 21 | + <slot v-if="showSlot"><span v-el:slot>{{ value }}</span></slot> | |
| 22 | 22 | </label> |
| 23 | 23 | </template> |
| 24 | 24 | <script> |
| ... | ... | @@ -78,8 +78,6 @@ |
| 78 | 78 | this.updateModel(); |
| 79 | 79 | if (this.$els.slot && this.$els.slot.innerHTML === '') { |
| 80 | 80 | this.showSlot = false; |
| 81 | - } else { | |
| 82 | - this.$els.slot.style.display = 'inline'; | |
| 83 | 81 | } |
| 84 | 82 | } |
| 85 | 83 | }, | ... | ... |
src/components/transfer/list.vue
| ... | ... | @@ -57,7 +57,8 @@ |
| 57 | 57 | return [ |
| 58 | 58 | `${this.prefixCls}-body`, |
| 59 | 59 | { |
| 60 | - [`${this.prefixCls}-body-with-search`]: this.filterable | |
| 60 | + [`${this.prefixCls}-body-with-search`]: this.filterable, | |
| 61 | + [`${this.prefixCls}-body-with-footer`]: this.showFooter | |
| 61 | 62 | } |
| 62 | 63 | ] |
| 63 | 64 | }, |
| ... | ... | @@ -100,7 +101,7 @@ |
| 100 | 101 | this.updateFilteredData(); |
| 101 | 102 | |
| 102 | 103 | }, |
| 103 | - ready () { | |
| 104 | + compiled () { | |
| 104 | 105 | this.showFooter = this.$els.footer.innerHTML !== ''; |
| 105 | 106 | }, |
| 106 | 107 | watch: { | ... | ... |
src/styles/components/transfer.less
| ... | ... | @@ -43,10 +43,14 @@ |
| 43 | 43 | border-top: none; |
| 44 | 44 | border-radius: 0 0 @border-radius-base @border-radius-base; |
| 45 | 45 | position: relative; |
| 46 | + overflow: hidden; | |
| 46 | 47 | |
| 47 | 48 | &-with-search{ |
| 48 | 49 | padding-top: 34px; |
| 49 | 50 | } |
| 51 | + &-with-footer{ | |
| 52 | + border-radius: 0; | |
| 53 | + } | |
| 50 | 54 | } |
| 51 | 55 | |
| 52 | 56 | &-content{ |
| ... | ... | @@ -90,7 +94,6 @@ |
| 90 | 94 | } |
| 91 | 95 | |
| 92 | 96 | &-footer{ |
| 93 | - margin: 0 -1px; | |
| 94 | 97 | border: 1px solid @border-color-base; |
| 95 | 98 | border-top: none; |
| 96 | 99 | border-radius: 0 0 @border-radius-base @border-radius-base; | ... | ... |
test/routers/transfer.vue
| ... | ... | @@ -12,9 +12,9 @@ |
| 12 | 12 | :operations="['向左移动','向右移动']" |
| 13 | 13 | :filter-method="filterMethod" |
| 14 | 14 | @on-change="change"> |
| 15 | - <!--<div :style="{float: 'right', margin: '5px'}">--> | |
| 16 | - <!--<i-button type="ghost" size="small" @click="getMock">刷新</i-button>--> | |
| 17 | - <!--</div>--> | |
| 15 | + <div :style="{float: 'right', margin: '5px'}"> | |
| 16 | + <i-button type="ghost" size="small" @click="getMock">刷新</i-button> | |
| 17 | + </div> | |
| 18 | 18 | </Transfer> |
| 19 | 19 | </div> |
| 20 | 20 | </template> | ... | ... |