Commit 3fd978800fb1d3e9d84c15cac13271836ed868cb

Authored by 梁灏
1 parent 8f48491a

Transfer renderFormat support html element

Transfer renderFormat support html element
src/components/transfer/list.vue
... ... @@ -18,7 +18,7 @@
18 18 :class="itemClasses(item)"
19 19 @click.prevent="select(item)">
20 20 <Checkbox :checked="isCheck(item)" :disabled="item.disabled"></Checkbox>
21   - <span>{{ showLabel(item) }}</span>
  21 + <span>{{{ showLabel(item) }}}</span>
22 22 </li>
23 23 <li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li>
24 24 </ul>
... ...
test/routers/transfer.vue
... ... @@ -3,6 +3,7 @@
3 3 :data="data2"
4 4 :target-keys="targetKeys2"
5 5 filterable
  6 + :render-format="rf"
6 7 :filter-method="filterMethod"
7 8 @on-change="handleChange2"></Transfer>
8 9 </template>
... ... @@ -37,6 +38,9 @@
37 38 },
38 39 filterMethod (data, query) {
39 40 return data.label.indexOf(query) > -1;
  41 + },
  42 + rf (data) {
  43 + return '<i class="ivu-icon ivu-icon-alert"></i>' + data.label;
40 44 }
41 45 }
42 46 }
... ...