Commit dcc061279ac8bf6442286bd3aad94119dc3f815a
1 parent
122e69ee
update Transfer
update Transfer
Showing
3 changed files
with
15 additions
and
10 deletions
Show diff stats
src/components/transfer/list.vue
| @@ -23,9 +23,7 @@ | @@ -23,9 +23,7 @@ | ||
| 23 | <li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li> | 23 | <li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li> |
| 24 | </ul> | 24 | </ul> |
| 25 | </div> | 25 | </div> |
| 26 | - <div :class="prefixCls + '-footer'"> | ||
| 27 | - <slot></slot> | ||
| 28 | - </div> | 26 | + <div :class="prefixCls + '-footer'" v-if="showFooter" v-el:footer><slot></slot></div> |
| 29 | </div> | 27 | </div> |
| 30 | </template> | 28 | </template> |
| 31 | <script> | 29 | <script> |
| @@ -50,7 +48,8 @@ | @@ -50,7 +48,8 @@ | ||
| 50 | data () { | 48 | data () { |
| 51 | return { | 49 | return { |
| 52 | showItems: [], | 50 | showItems: [], |
| 53 | - query: '' | 51 | + query: '', |
| 52 | + showFooter: true | ||
| 54 | } | 53 | } |
| 55 | }, | 54 | }, |
| 56 | computed: { | 55 | computed: { |
| @@ -99,6 +98,10 @@ | @@ -99,6 +98,10 @@ | ||
| 99 | }, | 98 | }, |
| 100 | created () { | 99 | created () { |
| 101 | this.updateFilteredData(); | 100 | this.updateFilteredData(); |
| 101 | + | ||
| 102 | + }, | ||
| 103 | + ready () { | ||
| 104 | + this.showFooter = this.$els.footer.innerHTML !== ''; | ||
| 102 | }, | 105 | }, |
| 103 | watch: { | 106 | watch: { |
| 104 | data () { | 107 | data () { |
src/styles/components/transfer.less
| @@ -11,17 +11,16 @@ | @@ -11,17 +11,16 @@ | ||
| 11 | height: 210px; | 11 | height: 210px; |
| 12 | font-size: @font-size-small; | 12 | font-size: @font-size-small; |
| 13 | vertical-align: middle; | 13 | vertical-align: middle; |
| 14 | - border: 1px solid @border-color-base; | ||
| 15 | - border-radius: @border-radius-base @border-radius-base 0 0; | ||
| 16 | position: relative; | 14 | position: relative; |
| 17 | padding-top: 35px; | 15 | padding-top: 35px; |
| 18 | 16 | ||
| 19 | &-header { | 17 | &-header { |
| 20 | padding: 8px 16px; | 18 | padding: 8px 16px; |
| 21 | - border-radius: @border-radius-base @border-radius-base 0 0; | ||
| 22 | background: @head-bg; | 19 | background: @head-bg; |
| 23 | color: @text-color; | 20 | color: @text-color; |
| 21 | + border: 1px solid @border-color-base; | ||
| 24 | border-bottom: 1px solid @border-color-split; | 22 | border-bottom: 1px solid @border-color-split; |
| 23 | + border-radius: @border-radius-base @border-radius-base 0 0; | ||
| 25 | overflow: hidden; | 24 | overflow: hidden; |
| 26 | position: absolute; | 25 | position: absolute; |
| 27 | top: 0; | 26 | top: 0; |
| @@ -40,6 +39,9 @@ | @@ -40,6 +39,9 @@ | ||
| 40 | 39 | ||
| 41 | &-body{ | 40 | &-body{ |
| 42 | height: 100%; | 41 | height: 100%; |
| 42 | + border: 1px solid @border-color-base; | ||
| 43 | + border-top: none; | ||
| 44 | + border-radius: 0 0 @border-radius-base @border-radius-base; | ||
| 43 | position: relative; | 45 | position: relative; |
| 44 | 46 | ||
| 45 | &-with-search{ | 47 | &-with-search{ |
test/routers/transfer.vue
| @@ -12,9 +12,9 @@ | @@ -12,9 +12,9 @@ | ||
| 12 | :operations="['向左移动','向右移动']" | 12 | :operations="['向左移动','向右移动']" |
| 13 | :filter-method="filterMethod" | 13 | :filter-method="filterMethod" |
| 14 | @on-change="change"> | 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 | </Transfer> | 18 | </Transfer> |
| 19 | </div> | 19 | </div> |
| 20 | </template> | 20 | </template> |