Propagate type changes to panel
This commit is contained in:
parent
ccb6a76d90
commit
9ffdd6daea
2 changed files with 55 additions and 1 deletions
|
@ -23,6 +23,17 @@ export default {
|
|||
},
|
||||
value: {}
|
||||
},
|
||||
watch: {
|
||||
type(value){
|
||||
const typeMap = {
|
||||
year: 'year',
|
||||
month: 'month',
|
||||
date: 'day'
|
||||
};
|
||||
const validType = oneOf(value, Object.keys(typeMap));
|
||||
if (validType) this.Panel.selectionMode = typeMap[value];
|
||||
}
|
||||
},
|
||||
created () {
|
||||
if (!this.currentValue) {
|
||||
if (this.type === 'daterange' || this.type === 'datetimerange') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue