update table example
This commit is contained in:
commit
408b695046
7 changed files with 27 additions and 17 deletions
|
@ -92,7 +92,8 @@
|
||||||
{
|
{
|
||||||
title: 'Postcode',
|
title: 'Postcode',
|
||||||
key: 'zip',
|
key: 'zip',
|
||||||
width: 100
|
width: 100,
|
||||||
|
fixed: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Action',
|
title: 'Action',
|
||||||
|
|
|
@ -295,9 +295,7 @@
|
||||||
const otherPanel = panel === 'left' ? 'right' : 'left';
|
const otherPanel = panel === 'left' ? 'right' : 'left';
|
||||||
const otherCurrent = new Date(this[`${otherPanel}PanelDate`]);
|
const otherCurrent = new Date(this[`${otherPanel}PanelDate`]);
|
||||||
otherCurrent[`set${type}`](otherCurrent[`get${type}`]() + increment);
|
otherCurrent[`set${type}`](otherCurrent[`get${type}`]() + increment);
|
||||||
if (current[`get${type}`]() !== otherCurrent[`get${type}`]()){
|
this[`${otherPanel}PanelDate`] = otherCurrent;
|
||||||
this[`${otherPanel}PanelDate`] = otherCurrent;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showYearPicker (panel) {
|
showYearPicker (panel) {
|
||||||
|
|
|
@ -334,7 +334,7 @@
|
||||||
if (typeof val === 'string') {
|
if (typeof val === 'string') {
|
||||||
val = parser(val, format);
|
val = parser(val, format);
|
||||||
} else if (type === 'timerange') {
|
} else if (type === 'timerange') {
|
||||||
val = parser(val, format);
|
val = parser(val, format).map(v => v || '');
|
||||||
} else {
|
} else {
|
||||||
val = val.map(date => new Date(date)); // try to parse
|
val = val.map(date => new Date(date)); // try to parse
|
||||||
val = val.map(date => isNaN(date.getTime()) ? null : date); // check if parse passed
|
val = val.map(date => isNaN(date.getTime()) ? null : date); // check if parse passed
|
||||||
|
|
|
@ -97,6 +97,9 @@
|
||||||
transfer: {
|
transfer: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
popperClass: {
|
||||||
|
type: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -120,7 +123,8 @@
|
||||||
return [
|
return [
|
||||||
`${prefixCls}-popper`,
|
`${prefixCls}-popper`,
|
||||||
{
|
{
|
||||||
[`${prefixCls}-confirm`]: this.transfer && this.confirm
|
[`${prefixCls}-confirm`]: this.transfer && this.confirm,
|
||||||
|
[`${this.popperClass}`]: !!this.popperClass
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="classes" ref="cell">
|
<div :class="classes" ref="cell">
|
||||||
<template v-if="renderType === 'index'">{{naturalIndex + 1}}</template>
|
<template v-if="renderType === 'index'"><span>{{naturalIndex + 1}}</span></template>
|
||||||
<template v-if="renderType === 'selection'">
|
<template v-if="renderType === 'selection'">
|
||||||
<Checkbox :value="checked" @click.native.stop="handleClick" @on-change="toggleSelect" :disabled="disabled"></Checkbox>
|
<Checkbox :value="checked" @click.native.stop="handleClick" @on-change="toggleSelect" :disabled="disabled"></Checkbox>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
v-if="isPopperShow(column)"
|
v-if="isPopperShow(column)"
|
||||||
v-model="column._filterVisible"
|
v-model="column._filterVisible"
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
|
popper-class="ivu-table-popper"
|
||||||
|
transfer
|
||||||
@on-popper-hide="handleFilterHide(column._index)">
|
@on-popper-hide="handleFilterHide(column._index)">
|
||||||
<span :class="[prefixCls + '-filter']">
|
<span :class="[prefixCls + '-filter']">
|
||||||
<i class="ivu-icon ivu-icon-funnel" :class="{on: column._isFiltered}"></i>
|
<i class="ivu-icon ivu-icon-funnel" :class="{on: column._isFiltered}"></i>
|
||||||
|
|
|
@ -357,15 +357,13 @@
|
||||||
&-footer{
|
&-footer{
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
border-top: 1px solid @border-color-split;
|
border-top: 1px solid @border-color-split;
|
||||||
}
|
overflow: hidden;
|
||||||
}
|
button:first-child{
|
||||||
.ivu-poptip-popper{
|
float: left;
|
||||||
min-width: 0;
|
}
|
||||||
text-align: left;
|
button:last-child{
|
||||||
}
|
float: right;
|
||||||
thead .ivu-poptip-popper{
|
}
|
||||||
.ivu-poptip-body{
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,3 +381,10 @@
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ivu-table-popper{
|
||||||
|
min-width: 0;
|
||||||
|
text-align: left;
|
||||||
|
.ivu-poptip-body{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue