合并原作者更新
This commit is contained in:
parent
1594942f2c
commit
2404849c30
5 changed files with 29 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iview",
|
"name": "iview",
|
||||||
"version": "0.9.17",
|
"version": "1.0.0",
|
||||||
"title": "iView",
|
"title": "iView",
|
||||||
"description": "A high quality UI components Library with Vue.js",
|
"description": "A high quality UI components Library with Vue.js",
|
||||||
"homepage": "http://www.iviewui.com",
|
"homepage": "http://www.iviewui.com",
|
||||||
|
|
|
@ -548,12 +548,16 @@
|
||||||
this.data.forEach((row, index) => {
|
this.data.forEach((row, index) => {
|
||||||
const newRow = deepCopy(row);// todo 直接替换
|
const newRow = deepCopy(row);// todo 直接替换
|
||||||
newRow._isHover = false;
|
newRow._isHover = false;
|
||||||
if(newRow.checked){// 传checked:true 可以设置该行为默认选中状态
|
if (newRow._checked) {
|
||||||
newRow._isChecked = newRow.checked;
|
newRow._isChecked = newRow._checked;
|
||||||
}else{
|
} else {
|
||||||
newRow._isChecked = false;
|
newRow._isChecked = false;
|
||||||
}
|
}
|
||||||
newRow._isHighlight = false;
|
if (newRow._highlight) {
|
||||||
|
newRow._isHighlight = newRow._highlight;
|
||||||
|
} else {
|
||||||
|
newRow._isHighlight = false;
|
||||||
|
}
|
||||||
data[index] = newRow;
|
data[index] = newRow;
|
||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
:class="itemClasses(item)"
|
:class="itemClasses(item)"
|
||||||
@click.prevent="select(item)">
|
@click.prevent="select(item)">
|
||||||
<Checkbox :checked="isCheck(item)" :disabled="item.disabled"></Checkbox>
|
<Checkbox :checked="isCheck(item)" :disabled="item.disabled"></Checkbox>
|
||||||
<span>{{ showLabel(item) }}</span>
|
<span>{{{ showLabel(item) }}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li>
|
<li :class="prefixCls + '-content-not-found'">{{ notFoundText }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<i-table border :content="self" :columns="columns7" :data="data6"></i-table>
|
<i-table highlight-row border :content="self" :columns="columns7" :data="data6"></i-table>
|
||||||
|
|
||||||
默认选中行
|
|
||||||
<i-table border :content="self" :columns="columns8" :data="data8"></i-table>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
@ -10,6 +7,11 @@
|
||||||
return {
|
return {
|
||||||
self: this,
|
self: this,
|
||||||
columns7: [
|
columns7: [
|
||||||
|
{
|
||||||
|
type: 'selection',
|
||||||
|
width: 60,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
key: 'name',
|
key: 'name',
|
||||||
|
@ -50,22 +52,27 @@
|
||||||
{
|
{
|
||||||
name: '王小明',
|
name: '王小明',
|
||||||
age: 18,
|
age: 18,
|
||||||
address: '北京市朝阳区芍药居'
|
address: '北京市朝阳区芍药居',
|
||||||
|
_highlight: true,
|
||||||
|
_checked: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '张小刚',
|
name: '张小刚',
|
||||||
age: 25,
|
age: 25,
|
||||||
address: '北京市海淀区西二旗'
|
address: '北京市海淀区西二旗',
|
||||||
|
_checked: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '李小红',
|
name: '李小红',
|
||||||
age: 30,
|
age: 30,
|
||||||
address: '上海市浦东新区世纪大道'
|
address: '上海市浦东新区世纪大道',
|
||||||
|
_checked: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '周小伟',
|
name: '周小伟',
|
||||||
age: 26,
|
age: 26,
|
||||||
address: '深圳市南山区深南大道'
|
address: '深圳市南山区深南大道',
|
||||||
|
_checked: true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
columns8:[
|
columns8:[
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
:data="data2"
|
:data="data2"
|
||||||
:target-keys="targetKeys2"
|
:target-keys="targetKeys2"
|
||||||
filterable
|
filterable
|
||||||
|
:render-format="rf"
|
||||||
:filter-method="filterMethod"
|
:filter-method="filterMethod"
|
||||||
@on-change="handleChange2"></Transfer>
|
@on-change="handleChange2"></Transfer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -37,6 +38,9 @@
|
||||||
},
|
},
|
||||||
filterMethod (data, query) {
|
filterMethod (data, query) {
|
||||||
return data.label.indexOf(query) > -1;
|
return data.label.indexOf(query) > -1;
|
||||||
|
},
|
||||||
|
rf (data) {
|
||||||
|
return '<i class="ivu-icon ivu-icon-alert"></i>' + data.label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue