Merge branch '2.0' of https://github.com/iview/iview into 2.0

This commit is contained in:
mo.duan 2019-10-09 16:41:06 +08:00
commit ab7cf4f88e
3 changed files with 21 additions and 4 deletions

View file

@ -296,7 +296,11 @@
},
changePanelDate(panel, type, increment, updateOtherPanel = true){
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;
if (!updateOtherPanel) return;

View file

@ -490,13 +490,12 @@
},
validateOption({children, elm, propsData}){
const value = propsData.value;
const label = propsData.label || '';
const textContent = (elm && elm.textContent) || (children || []).reduce((str, node) => {
const nodeText = node.elm ? node.elm.textContent : node.text;
return `${str} ${nodeText}`;
}, '') || '';
const stringValues = JSON.stringify([value, label, textContent]);
const stringValues = JSON.stringify([label, textContent]);
const query = this.query.toLowerCase().trim();
return stringValues.toLowerCase().includes(query);
},

View file

@ -100,6 +100,13 @@
name: {
type: String
},
custContentClass: {
type: String,
default: ''
},
custContentStyle: {
type: Object,
}
},
data () {
return {
@ -133,7 +140,8 @@
`${prefixCls}-content`,
{
[`${prefixCls}-content-animated`]: this.animated
}
},
this.custContentClass
];
},
barClasses () {
@ -154,6 +162,12 @@
transform: `translateX(${p}) translateZ(0px)`
};
}
const { custContentStyle } = this;
if (custContentStyle) {
for (const key in custContentStyle){
style[key] = custContentStyle[key];
}
}
return style;
},
barStyle () {