Merge branch '2.0' of https://github.com/iview/iview into 2.0
This commit is contained in:
commit
ab7cf4f88e
3 changed files with 21 additions and 4 deletions
|
@ -296,7 +296,11 @@
|
||||||
},
|
},
|
||||||
changePanelDate(panel, type, increment, updateOtherPanel = true){
|
changePanelDate(panel, type, increment, updateOtherPanel = true){
|
||||||
const current = new Date(this[`${panel}PanelDate`]);
|
const current = new Date(this[`${panel}PanelDate`]);
|
||||||
current[`set${type}`](current[`get${type}`]() + increment);
|
if (panel === 'left') {
|
||||||
|
current[`set${type}`](current[`get${type}`](), 0);
|
||||||
|
} else {
|
||||||
|
current[`set${type}`](current[`get${type}`]() + increment);
|
||||||
|
}
|
||||||
this[`${panel}PanelDate`] = current;
|
this[`${panel}PanelDate`] = current;
|
||||||
|
|
||||||
if (!updateOtherPanel) return;
|
if (!updateOtherPanel) return;
|
||||||
|
|
|
@ -490,13 +490,12 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
validateOption({children, elm, propsData}){
|
validateOption({children, elm, propsData}){
|
||||||
const value = propsData.value;
|
|
||||||
const label = propsData.label || '';
|
const label = propsData.label || '';
|
||||||
const textContent = (elm && elm.textContent) || (children || []).reduce((str, node) => {
|
const textContent = (elm && elm.textContent) || (children || []).reduce((str, node) => {
|
||||||
const nodeText = node.elm ? node.elm.textContent : node.text;
|
const nodeText = node.elm ? node.elm.textContent : node.text;
|
||||||
return `${str} ${nodeText}`;
|
return `${str} ${nodeText}`;
|
||||||
}, '') || '';
|
}, '') || '';
|
||||||
const stringValues = JSON.stringify([value, label, textContent]);
|
const stringValues = JSON.stringify([label, textContent]);
|
||||||
const query = this.query.toLowerCase().trim();
|
const query = this.query.toLowerCase().trim();
|
||||||
return stringValues.toLowerCase().includes(query);
|
return stringValues.toLowerCase().includes(query);
|
||||||
},
|
},
|
||||||
|
|
|
@ -100,6 +100,13 @@
|
||||||
name: {
|
name: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
|
custContentClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
custContentStyle: {
|
||||||
|
type: Object,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -133,7 +140,8 @@
|
||||||
`${prefixCls}-content`,
|
`${prefixCls}-content`,
|
||||||
{
|
{
|
||||||
[`${prefixCls}-content-animated`]: this.animated
|
[`${prefixCls}-content-animated`]: this.animated
|
||||||
}
|
},
|
||||||
|
this.custContentClass
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
barClasses () {
|
barClasses () {
|
||||||
|
@ -154,6 +162,12 @@
|
||||||
transform: `translateX(${p}) translateZ(0px)`
|
transform: `translateX(${p}) translateZ(0px)`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
const { custContentStyle } = this;
|
||||||
|
if (custContentStyle) {
|
||||||
|
for (const key in custContentStyle){
|
||||||
|
style[key] = custContentStyle[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
barStyle () {
|
barStyle () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue