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