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 | 23 | <li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li> |
24 | 24 | </ul> |
25 | 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 | 27 | </div> |
30 | 28 | </template> |
31 | 29 | <script> |
... | ... | @@ -50,7 +48,8 @@ |
50 | 48 | data () { |
51 | 49 | return { |
52 | 50 | showItems: [], |
53 | - query: '' | |
51 | + query: '', | |
52 | + showFooter: true | |
54 | 53 | } |
55 | 54 | }, |
56 | 55 | computed: { |
... | ... | @@ -99,6 +98,10 @@ |
99 | 98 | }, |
100 | 99 | created () { |
101 | 100 | this.updateFilteredData(); |
101 | + | |
102 | + }, | |
103 | + ready () { | |
104 | + this.showFooter = this.$els.footer.innerHTML !== ''; | |
102 | 105 | }, |
103 | 106 | watch: { |
104 | 107 | data () { | ... | ... |
src/styles/components/transfer.less
... | ... | @@ -11,17 +11,16 @@ |
11 | 11 | height: 210px; |
12 | 12 | font-size: @font-size-small; |
13 | 13 | vertical-align: middle; |
14 | - border: 1px solid @border-color-base; | |
15 | - border-radius: @border-radius-base @border-radius-base 0 0; | |
16 | 14 | position: relative; |
17 | 15 | padding-top: 35px; |
18 | 16 | |
19 | 17 | &-header { |
20 | 18 | padding: 8px 16px; |
21 | - border-radius: @border-radius-base @border-radius-base 0 0; | |
22 | 19 | background: @head-bg; |
23 | 20 | color: @text-color; |
21 | + border: 1px solid @border-color-base; | |
24 | 22 | border-bottom: 1px solid @border-color-split; |
23 | + border-radius: @border-radius-base @border-radius-base 0 0; | |
25 | 24 | overflow: hidden; |
26 | 25 | position: absolute; |
27 | 26 | top: 0; |
... | ... | @@ -40,6 +39,9 @@ |
40 | 39 | |
41 | 40 | &-body{ |
42 | 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 | 45 | position: relative; |
44 | 46 | |
45 | 47 | &-with-search{ | ... | ... |
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> | ... | ... |