update Transfer

update Transfer
This commit is contained in:
梁灏 2016-11-18 15:01:49 +08:00
parent 122e69ee97
commit dcc061279a
3 changed files with 15 additions and 10 deletions

View file

@ -23,9 +23,7 @@
<li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li> <li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li>
</ul> </ul>
</div> </div>
<div :class="prefixCls + '-footer'"> <div :class="prefixCls + '-footer'" v-if="showFooter" v-el:footer><slot></slot></div>
<slot></slot>
</div>
</div> </div>
</template> </template>
<script> <script>
@ -50,7 +48,8 @@
data () { data () {
return { return {
showItems: [], showItems: [],
query: '' query: '',
showFooter: true
} }
}, },
computed: { computed: {
@ -99,6 +98,10 @@
}, },
created () { created () {
this.updateFilteredData(); this.updateFilteredData();
},
ready () {
this.showFooter = this.$els.footer.innerHTML !== '';
}, },
watch: { watch: {
data () { data () {

View file

@ -11,17 +11,16 @@
height: 210px; height: 210px;
font-size: @font-size-small; font-size: @font-size-small;
vertical-align: middle; vertical-align: middle;
border: 1px solid @border-color-base;
border-radius: @border-radius-base @border-radius-base 0 0;
position: relative; position: relative;
padding-top: 35px; padding-top: 35px;
&-header { &-header {
padding: 8px 16px; padding: 8px 16px;
border-radius: @border-radius-base @border-radius-base 0 0;
background: @head-bg; background: @head-bg;
color: @text-color; color: @text-color;
border: 1px solid @border-color-base;
border-bottom: 1px solid @border-color-split; border-bottom: 1px solid @border-color-split;
border-radius: @border-radius-base @border-radius-base 0 0;
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
top: 0; top: 0;
@ -40,6 +39,9 @@
&-body{ &-body{
height: 100%; height: 100%;
border: 1px solid @border-color-base;
border-top: none;
border-radius: 0 0 @border-radius-base @border-radius-base;
position: relative; position: relative;
&-with-search{ &-with-search{

View file

@ -12,9 +12,9 @@
:operations="['向左移动','向右移动']" :operations="['向左移动','向右移动']"
:filter-method="filterMethod" :filter-method="filterMethod"
@on-change="change"> @on-change="change">
<div :style="{float: 'right', margin: '5px'}"> <!--<div :style="{float: 'right', margin: '5px'}">-->
<i-button type="ghost" size="small" @click="getMock">刷新</i-button> <!--<i-button type="ghost" size="small" @click="getMock">刷新</i-button>-->
</div> <!--</div>-->
</Transfer> </Transfer>
</div> </div>
</template> </template>