Commit bf0203db3d617862f66a0ea4b75f53f9dc3c35e5

Authored by 梁灏
1 parent 967e8e43

update Transfer

update Transfer
src/components/transfer/list.vue
1 <template> 1 <template>
2 - <div :class="prefixCls" :style="style"> 2 + <div :class="classes" :style="style">
3 <div :class="prefixCls + '-header'"> 3 <div :class="prefixCls + '-header'">
4 <Checkbox :checked.sync="checkedAll" :disabled="checkedAllDisabled" @on-change="toggleSelectAll"></Checkbox> 4 <Checkbox :checked.sync="checkedAll" :disabled="checkedAllDisabled" @on-change="toggleSelectAll"></Checkbox>
5 <span>{{ title }}</span> 5 <span>{{ title }}</span>
@@ -53,6 +53,14 @@ @@ -53,6 +53,14 @@
53 } 53 }
54 }, 54 },
55 computed: { 55 computed: {
  56 + classes () {
  57 + return [
  58 + `${this.prefixCls}`,
  59 + {
  60 + [`${this.prefixCls}-with-footer`]: this.showFooter
  61 + }
  62 + ]
  63 + },
56 bodyClasses () { 64 bodyClasses () {
57 return [ 65 return [
58 `${this.prefixCls}-body`, 66 `${this.prefixCls}-body`,
src/styles/common/article.less
@@ -33,11 +33,11 @@ @@ -33,11 +33,11 @@
33 font-size: 14px; 33 font-size: 14px;
34 } 34 }
35 35
36 - ul{ 36 + ul:not([class^="ivu-"]){
37 padding-left: 40px; 37 padding-left: 40px;
38 list-style-type: disc; 38 list-style-type: disc;
39 } 39 }
40 - li{ 40 + li:not([class^="ivu-"]){
41 margin-bottom: 5px; 41 margin-bottom: 5px;
42 font-size: 14px; 42 font-size: 14px;
43 } 43 }
src/styles/common/index.less
1 @import "base"; 1 @import "base";
2 @import "iconfont/ionicons"; 2 @import "iconfont/ionicons";
3 -@import "layout";  
4 \ No newline at end of file 3 \ No newline at end of file
  4 +@import "layout";
  5 +@import "article";
5 \ No newline at end of file 6 \ No newline at end of file
src/styles/components/transfer.less
@@ -14,6 +14,10 @@ @@ -14,6 +14,10 @@
14 position: relative; 14 position: relative;
15 padding-top: 35px; 15 padding-top: 35px;
16 16
  17 + &-with-footer{
  18 + padding-bottom: 35px;
  19 + }
  20 +
17 &-header { 21 &-header {
18 padding: 8px 16px; 22 padding: 8px 16px;
19 background: @head-bg; 23 background: @head-bg;
@@ -97,6 +101,10 @@ @@ -97,6 +101,10 @@
97 border: 1px solid @border-color-base; 101 border: 1px solid @border-color-base;
98 border-top: none; 102 border-top: none;
99 border-radius: 0 0 @border-radius-base @border-radius-base; 103 border-radius: 0 0 @border-radius-base @border-radius-base;
  104 + position: absolute;
  105 + bottom: 0;
  106 + left: 0;
  107 + right: 0;
100 108
101 .clearfix(); 109 .clearfix();
102 } 110 }
test/routers/transfer.vue
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 } 4 }
5 </style> 5 </style>
6 <template> 6 <template>
7 - <div style="margin: 50px;"> 7 + <div class="ivu-article" style="margin: 50px;">
8 <Transfer 8 <Transfer
9 :data="data" 9 :data="data"
10 filterable 10 filterable