chore(components): add validators to strategy and placement for popper

This commit is contained in:
Benjamin Canac
2021-12-10 17:13:54 +01:00
parent 8c5d78b2ea
commit 3c74aba4e5
2 changed files with 16 additions and 4 deletions

View File

@@ -60,11 +60,17 @@ export default {
}, },
placement: { placement: {
type: String, type: String,
default: 'bottom-end' default: 'bottom-end',
validator: (value) => {
return ['auto', 'auto-start', 'auto-end', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'].includes(value)
}
}, },
strategy: { strategy: {
type: String, type: String,
default: 'fixed' default: 'fixed',
validator: (value) => {
return ['absolute', 'fixed'].includes(value)
}
}, },
wrapperClass: { wrapperClass: {
type: String, type: String,

View File

@@ -36,11 +36,17 @@ export default {
}, },
placement: { placement: {
type: String, type: String,
default: 'bottom' default: 'bottom',
validator: (value) => {
return ['auto', 'auto-start', 'auto-end', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'].includes(value)
}
}, },
strategy: { strategy: {
type: String, type: String,
default: 'fixed' default: 'fixed',
validator: (value) => {
return ['absolute', 'fixed'].includes(value)
}
}, },
wrapperClass: { wrapperClass: {
type: String, type: String,